LongCat API Platform
AI model proxy service for the LongCat series โ compatible with OpenAI and Anthropic API formats. Build agents, coding assistants, and enterprise workflows on a fast, open, agentic-first platform.
What's New
The latest release in the LongCat family โ a high-performance agentic model supporting both OpenAI and Anthropic API formats. Tool-calling, multi-step planning, and real-world task completion baked into the weights.
- 2026-05-29: Six legacy models retired (incl. Flash Thinking). LongCat-2.0-Preview is now the primary model.
- 2026-03-12: LongCat-Flash-Thinking upgraded for top-tier inference; auto-routed with no code changes.
- 2026-01-14: LongCat-Flash-Thinking-2601 released โ 560B MoE architecture, upgraded reasoning.
- 2025-09-22: LongCat Flash Thinking officially open-sourced.
API Endpoints
- Base URL:
https://api.longcat.chat - Auth:
Authorization: Bearer YOUR_API_KEY
| Method | Endpoint | Description |
|---|---|---|
| POST | /openai/v1/chat/completions | Chat completions (OpenAI format) |
| POST | /anthropic/v1/messages | Messages (Anthropic format) |
| GET | /openai/v1/models | List available models |
| GET | /openai/v1/models/{model} | Model details |
Key Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | e.g. LongCat-2.0-Preview |
messages | array | Yes | Chat messages array |
max_tokens | integer | No | Max output (up to 128K) |
stream | boolean | No | Enable SSE streaming |
temperature | number | No | Sampling temperature |
Coding Tools
Use LongCat with your favorite coding assistant. All tools support LongCat-2.0-Preview via OpenAI-compatible API format.
Configure ~/.claude/settings.json:
ANTHROPIC_BASE_URL=https://api.longcat.chat/anthropicANTHROPIC_AUTH_TOKEN= your API keyANTHROPIC_MODEL=LongCat-2.0-Preview
VS Code extension. Set API Provider to "OpenAI Compatible":
- Base URL:
https://api.longcat.chat/openai - Model:
LongCat-2.0-Preview
CLI tool. Configure ~/.config/opencode/opencode.json:
- Provider:
LongCat(OpenAI-compatible) - Base URL:
https://api.longcat.chat/openai - Model:
LongCat-2.0-Preview
Gateway-based agent platform. Install via npm, then configure:
- Base URL:
https://api.longcat.chat/openai - Model:
LongCat-2.0-Preview(200K context)
Run openclaw tui or openclaw dashboard.
OpenAI Codex CLI. Configure ~/.codex/config.toml and ~/.codex/auth.json:
- Model:
LongCat-2.0-Preview - Base URL:
https://api.longcat.chat/openai/v1 - Wire API:
responses
FAQ
Log in at longcat.chat/platform/api_keys and click "Create API Key." Keys are shown only once โ store securely. Up to 100 active keys per account.
/openai/native/chat/completions uses OpenAI format (system/user/assistant roles). /anthropic/v1/messages uses Claude format (separate system parameter). Same API key works for both.
LongCat-2.0-Preview outputs up to 128K tokens. 1M context window. Free tier: 5M tokens/day (up to 120M via feedback submissions).
Yes. For OpenAI: set openai.api_base = "https://api.longcat.chat/openai/". For Anthropic: configure client = anthropic.Anthropic(base_url="https://api.longcat.chat/anthropic"). Minimal code changes needed.
Set "stream": true in the request body. Responses return as Server-Sent Events (SSE).
Too many requests too quickly. Implement exponential backoff or reduce request rate. Limits are enforced per API Key.
Getting Started
Browse the rest of the Dump collection.