Meituan: LongCat 2.0
LongCat 2.0 is Meituan’s text model for coding, repository-level changes, extended problem solving and application-controlled agent workflows. Its published context window is 1,048,756 tokens. Use the exact meituan/longcat-2.0 ID with Chat Completions, supplying the relevant code, documents and tool results as text.
About the model
This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.
LongCat 2.0 is a sparse mixture-of-experts language model from Meituan, with 48 billion active parameters out of 1.6 trillion total. Its published role includes coding, repository-level changes, long-horizon problem solving and agent workflows. Select meituan/longcat-2.0 with POST /v1/chat/completions using model and a messages array. This profile accepts text and produces text or function-call requests within the conversation.
For a repository change, supply the relevant files or excerpts, the behaviour that should change and the constraints the implementation must preserve. Ask for a concrete result, such as a patch, a proposed change sequence or an explanation of how a failure passes through the supplied modules. For document analysis, provide the actual source text and identify the questions the answer must resolve. Label different source passages so the response can connect its conclusions to the supplied material.
The published context window is 1,048,756 tokens, and the model profile lists up to 262,144 completion tokens. Plan the source material, conversation history, tool results and requested answer within the overall context budget. Set max_tokens for the requested output allowance. A large context can hold substantial text, but the task still benefits from explicit file boundaries, the current objective and a description of what a useful answer should contain.
The supported controls include tools and tool_choice for function calling. An application can declare functions for reading a selected file, running an approved check or obtaining a record, then supply the resulting data in subsequent conversation turns. The model can request a function call; your application validates its arguments, performs the permitted action and returns the result. Keep the request, tool result and next answer together when a task spans several steps.
Other published parameters include temperature, top_p, top_k, min_p, stop, seed, frequency_penalty, presence_penalty and repetition_penalty. reasoning and include_reasoning also appear in the supported parameter list. The model profile does not support response_format, so an instruction to produce JSON remains a prompt instruction. Parse and validate any structured text before passing it into code, a database or another workflow.
Use a complete Chat Completions response when the next step needs the assembled answer, or stream text when the application displays it as it arrives. Read message content and any tool calls from the returned choices, preserving usage and response information. Assemble streamed deltas before treating a proposed patch or structured answer as complete. For a code change, evaluate the completed proposal against the supplied requirements and actual checks before applying its result.
Ailoot Ultra · Chat Completions POST /v1/chat/completions meituan/longcat-2.0
meituan/longcat-2.0Overview
LongCat 2.0 is Meituan’s text model for coding, repository-level changes, extended problem solving and application-controlled agent workflows. Its published context window is 1,048,756 tokens. Use the exact meituan/longcat-2.0 ID with Chat Completions, supplying the relevant code, documents and tool results as text.
- Accepted inputs
- Text
- Results
- Text
Available in Ailoot · inputs & methods
Ailoot Ultra · Chat Completions POST /v1/chat/completions
- Input types
text- Output types
text- Context
- 1,048,756 tokens
- Output format
- JSON or supported SSE
| Field | Type | Requirement | Values & limits | Default |
|---|---|---|---|---|
Fieldmodel | Typestring | RequirementRequired | Values & limits meituan/longcat-2.0 | Default— |
Fieldmessages | Typearray | RequirementRequired | Values & limits | Default— |
Fieldstream | Typeboolean | RequirementOptional | Values & limits | Defaultfalse |
Fieldmax_tokens | Typeinteger | RequirementOptional | Values & limits Minimum: 1 | Default— |
Fieldmax_completion_tokens | Typeinteger | RequirementOptional | Values & limits Minimum: 1 | Default— |
Fieldn | Typeinteger | RequirementOptional | Values & limits Minimum: 1 | Default— |
Fieldtemperature | Typenumber | RequirementOptional | Values & limits | Default— |
Fieldtop_p | Typenumber | RequirementOptional | Values & limits | Default— |
Fieldseed | Typeinteger | RequirementOptional | Values & limits | Default— |
Fieldstop | Type | RequirementOptional | Values & limits | Default— |
Fieldfrequency_penalty | Typenumber | RequirementOptional | Values & limits | Default— |
Fieldpresence_penalty | Typenumber | RequirementOptional | Values & limits | Default— |
Fielduser | Typestring | RequirementOptional | Values & limits | Default— |
Method parameters and lifecycle
| Parameter | Contract |
|---|---|
Parametercontent_type | Contractapplication/json |
Parameterrequired | Contractmodel, messages |
Parameteroptional | Contractstream, max_tokens, max_completion_tokens, n, temperature, top_p, seed, stop, frequency_penalty, presence_penalty, user |
Parametermaterial_types | Contracttext |
Parameterconditions | Contract |
Lifecycle: synchronous_json_or_sse
Pricing
Tariff references do not add request options. Supported parameters are listed for the selected method.
- Fast mode
- Not specified When fast mode is selected
- Flex mode
- Not specified When flex mode is selected
- Maximum reasoning effort
- Not specified When maximum reasoning effort uses the default adjustment
Ailoot rates
Prices by configuration
| Configuration | Rate schedule | Charge |
|---|---|---|
| ConfigurationBase token rates | Rate scheduleBase rate | Charge Input · Input tokens $0.0015 / 1K tokens Output · Output tokens $0.006 / 1K tokens Input · Cache read $0.00003 / 1K tokens Input · Cache write — / 1K tokens Input · Cache write, 1 hour — / 1K tokens |
Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. How reservation and settlement work →
Example requests
Ailoot Ultra · Chat Completions
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "meituan/longcat-2.0", "messages": [{"role": "user", "content": "Summarize the supplied text in three concise points."}], "stream": false}')
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
-H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
--data-binary @request.json -D response-headers.txt -o result.json
# Submit once. Retain the complete result, original identifiers and every response header.
Receive and save results
Ailoot Ultra · Chat Completions
JSON or supported SSE
Keep all completed results
Keep every complete returned response, file and content part.
Retain the complete response, all actual results, original identifiers, usage and response headers.
If the original response needs checking
Preserve the original response, headers and X-Client-Request-ID. An uncertain outcome does not authorize another creation.
Aliases
Model aliases
Ailoot Ultra meituan/longcat-2.0
Method path aliases
Use the method paths shown above.
Related caller IDs
FAQ · Meituan: LongCat 2.0
- What inputs and results are available?
POST /v1/chat/completions·meituan/longcat-2.0:text→text- Which fields does the request use?
POST /v1/chat/completions·meituan/longcat-2.0:model,messages,stream,max_tokens,max_completion_tokens,n,temperature,top_p,seed,stop,frequency_penalty,presence_penalty,user- What limits apply?
POST /v1/chat/completions·meituan/longcat-2.0:ctx:1048756;max_tokens.minimum:1;max_completion_tokens.minimum:1;n.minimum:1