LongCat officially provides a Claude Code configuration that uses LongCat-2.5 through an Anthropic-compatible API.
Suitable tasks: Connecting LongCat-2.5 to the Claude Code CLI.
Unsuitable tasks: Using this configuration to judge the model's performance on specific coding tasks.
Applicable model version: LongCat-2.5.
Applicable client, agent, or API: Claude Code CLI and LongCat's Anthropic-compatible API.
Recommended reasoning level and parameters: The source does not specify a reasoning level; the configuration example sets CLAUDE_CODE_MAX_OUTPUT_TOKENS to 262144.
Create or merge the following configuration in ~/.claude/settings.json, replacing the placeholder with your own LongCat API key:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "your_longcat_api_key",
"ANTHROPIC_BASE_URL": "https://api.longcat.chat/anthropic",
"ANTHROPIC_MODEL": "LongCat-2.5",
"ANTHROPIC_SMALL_FAST_MODEL": "LongCat-2.5",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "LongCat-2.5",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "LongCat-2.5",
"CLAUDE_CODE_MAX_OUTPUT_TOKENS": "262144",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": 1
},
"permissions": {
"allow": [],
"deny": []
}
}If you already have a configuration, merge the required fields to avoid overwriting existing settings or permission rules. Do not share a configuration file that contains a real key.
Create an account on the LongCat API Platform and manually create a key on the API Keys page.
Install Claude Code, configure it using the example above, and enter your key.
Run claude in the terminal and enter a simple test message, such as “Hello, please introduce yourself”.
Check whether you receive a response from the LongCat model.
The supported-model table in the official documentation lists LongCat-2.5, with OpenAI / Anthropic as the API formats.
The official configuration example sets the main model, fast model, and default Sonnet and Opus models all to LongCat-2.5; the API endpoint is https://api.longcat.chat/anthropic.
The documentation uses receipt of a model response as a basic configuration test, but provides neither the test output nor performance data.
This is an official integration configuration, not a complete prompt or an independent performance evaluation. The configuration and supported models may change as the service is updated; check the platform for availability, quotas, and fees at the time of use.
You need a LongCat API key and an installed copy of Claude Code. At collection time, the official documentation's configuration and supported-model table were checked; no API request was made with a real key, so an actual response was not verified.
LongCat 2.5