Meituan LongCat

LongCat-2.0 API

LongCat-2.0 is Meituan LongCat's agentic-coding route for tool use, multi-step agents, and large-context workflows. It is a practical option for developer teams that want to run an agent through a defined engineering process instead of asking a model for isolated code snippets.

The useful pattern is a constrained loop: inspect relevant files, make a plan, execute approved searches or tests, apply a small change, and report evidence. Long context helps when the project packet is substantial, but a disciplined tool contract is what keeps the work safe and reviewable.

This route can be evaluated in the same harness as other coding models because the gateway keeps the API consistent. That means a team can compare actual patches and test results, rather than choosing a model based on a generic coding label.

Agentic coding1M contextTool use

What LongCat-2.0 is good for

  • Tool-using agents that search a codebase before editing a targeted module.
  • Repository maintenance tasks with explicit tests and pull-request review.
  • Multi-step debugging that alternates between evidence collection and fixes.
  • Large-context code understanding for architecture and migration planning.
  • Agentic implementation workflows with bounded shell or project tools.

New to the gateway? Start with the quickstart, then review authentication before putting a key in an application.

Before a production launch, keep credentials server-side, record each selected model, token use, and validation result, and define a per-run budget. Those traces let you compare models on the workflow that matters, diagnose failures with evidence, and change a routing rule without guessing when product requirements or traffic change.

When to choose LongCat-2.0

Choose LongCat-2.0 when you need an agentic-coding route with tool use and a large-context workflow. Kimi K2.7 Code is a direct coding-agent comparison, while GLM-5.2 is worth testing when long-context reasoning is the central requirement.

Compare the current token rates on Pricing and test the nearest alternatives on your real prompts. The related models below are a useful starting set for that evaluation.

Pricing

USD per 1M tokens. No hidden markup.

Input

$1.35/ 1M

Output

$5.40/ 1M

Call LongCat-2.0 in seconds

It's OpenAI-compatible. Point your existing client athttps://api.glideflowai.com/v1and set the model tomeituan-longcat/LongCat-2.0.

curl https://api.glideflowai.com/v1/chat/completions \
  -H "Authorization: Bearer sk-xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "meituan-longcat/LongCat-2.0",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

FAQ

How do I use LongCat-2.0 in an agent?

Expose only the tools the task requires, state a clear completion condition, and keep edits in a branch or isolated workspace. Set model to meituan-longcat/LongCat-2.0 exactly, including the provider prefix and slash.

Why is tool validation important?

A model may produce an invalid or inappropriate argument even when its reasoning looks plausible. Your tool layer should enforce schemas, permissions, path restrictions, and confirmation for destructive operations.

Can it replace code review?

No. It can prepare a patch and explanation, but tests, diff review, and normal engineering ownership remain necessary. Treat an agent as a contributor operating under your existing quality controls.

How are long agent runs billed?

Each round has input and output tokens, including tool results returned to the model. Use the prices above with per-run token and step caps, then observe real traces before setting production budgets.