The official quick start provides OpenAI- and Anthropic-format connection endpoints for LongCat-2.5, along with Python SDK and cURL examples.
Suitable task: Sending LongCat-2.5 conversation requests through the API.
Unsuitable task: Evaluating the model's actual performance or inferring how to connect to other models.
Applicable model version: LongCat-2.5.
Applicable clients, agents, or APIs: OpenAI-format Chat Completions and Anthropic-format Messages; the documentation provides examples for the corresponding SDKs.
Recommended reasoning tier and parameters: The documentation example uses max_tokens=1000; the requests example also uses temperature=0.7. No recommended reasoning tier is specified.
| Configuration | Value |
|---|---|
| Model | LongCat-2.5 |
| OpenAI-format base URL | https://api.longcat.chat/openai |
| Anthropic-format base URL | https://api.longcat.chat/anthropic |
| OpenAI-format request path | /v1/chat/completions |
| Anthropic-format request path | /v1/messages |
Example using the OpenAI Python SDK; the key is read from an environment variable:
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["LONGCAT_API_KEY"],
base_url="https://api.longcat.chat/openai",
)
response = client.chat.completions.create(
model="LongCat-2.5",
messages=[{"role": "user", "content": "Hello!"}],
max_tokens=1000,
)
print(response.choices[0].message.content)The example above adapts the official SDK example to read the key from an environment variable.
Register and sign in to the LongCat API Platform, then create a key on the API Keys page and store it securely.
Install the OpenAI Python SDK and set the key in the local LONGCAT_API_KEY environment variable.
Run the example above and inspect the response; adjust the messages and parameters for your task.
If you receive HTTP 429, follow the retry information in the response and use exponential backoff.
The official supported models table lists LongCat-2.5 and says it supports OpenAI and Anthropic formats.
The official documentation states a 1M-token context window and a maximum output length of 256K tokens; these are platform documentation claims, not independently tested results.
The official documentation says the key is displayed only once when created; if it is lost, a new one must be created.
Configuration and limits may change; refer to the official documentation and the actual quota on your account.
This note summarizes the official documentation. No key was actually created and no API call was made; the example response and model quality have not been verified.
Visit the Supported Models, Endpoints, and Quick Integration Examples sections in the source. After creating a key as directed by the platform, reproduce the request using either the OpenAI or Anthropic format. Do not put a real key in code or commit it to the repository.
LongCat 2.5