LongCat API Quick Start: OpenAI-Compatible Setup
A source-based introduction to creating a LongCat API key and sending a basic OpenAI-compatible chat completion request.
- Category: API setup
- Published: 2026-07-16
- Last verified: 2026-07-16
Independent third-party guide. Not affiliated with Meituan or LongCat.
This independent guide summarizes the documented setup flow for sending a basic request to the LongCat API through its OpenAI-compatible interface. Always review the cited primary documentation before using an API in production.
Before you begin
You need a LongCat API Platform account and an API key created from the platform.
API keys are sensitive credentials. Store them securely and do not place them in browser-side code or public repositories.
- Create an API key in the platform after registering and signing in.
- Copy the key when it is created and store it securely.
- Use environment variables or a secure secret manager in production.
This site does not issue, manage, or bill for LongCat API keys.
Choose the OpenAI-compatible endpoint
The LongCat API documentation lists an OpenAI-compatible base URL for chat completion requests.
The documented OpenAI-compatible base URL is shown below.
Example (bash)
https://api.longcat.chat/openaiSend a basic chat completion request
The documented chat completion endpoint uses the OpenAI-compatible path `/v1/chat/completions`.
Replace `YOUR_API_KEY` with your own secret value. Do not expose it in client-side code.
Example (bash)
curl https://api.longcat.chat/openai/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "LongCat-2.0",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}'Understand compatibility
LongCat documentation describes support for OpenAI-compatible and Anthropic-compatible API formats.
This guide uses the OpenAI-compatible format because it is widely supported by common SDKs and HTTP clients.
- OpenAI-compatible chat completions use `/openai/v1/chat/completions`.
- Anthropic-compatible messages use `/anthropic/v1/messages`.
- Review the current API documentation before selecting a model or deploying an integration.
Next steps
After a basic request works, review the API documentation for available models, request options, usage, and error handling.
For a source-based model overview, see the LongCat-2.0 page on this site.
API availability, models, limits, pricing, and terms can change. Confirm current details in the cited primary documentation.
Related model
LongCat-2.0
An open-source mixture-of-experts model from Meituan LongCat for agentic coding tasks.
View model overviewSources
- LongCat API Quick Startofficial
- Accessed: 2026-07-16
- Documentation for account setup, API key creation, and API compatibility.
- LongCat API Overviewofficial
- Accessed: 2026-07-16
- Documentation for base URL, Bearer authentication, and API endpoints.
Review primary documentation before making production, commercial, or legal decisions.