cli2api

Models

The full catalog of supported models.

70+ models are registered. GET /v1/models returns the live catalog; below is the grouping by surface.

Image — /v1/images/generations

VendorModels
OpenAIgpt-image-2
Googlenano-banana, nano-banana-pro, nano-banana-2
Midjourneymidjourney
Alibaba Wanwan2.6-t2i, wan2.6-image, wan2.5-t2i-preview, wan2.5-i2i-preview

Image edit — /v1/images/edits

gpt-image-2-edit (supports mask), nano-banana-edit, nano-banana-pro-edit, nano-banana-2-edit, wan2.5-i2i-preview-edit.

Video — /v1/videos

See the Video endpoint for the full table (OpenAI Sora, Google Veo, Kling v2/v3/v3-omni, ByteDance Seedance, Alibaba Wan + happy-horse, MuleRouter spark, Midjourney).

Speech & Music

  • TTS: speech-2.8-hd, speech-2.8-turbo (MiniMax)
  • Music: music-2.0, music-2.5 (MiniMax)

Text (proxy)

The /v1/models endpoint advertises these chat models for client discovery. cli2api routes them across two upstream surfaces based on the model name shape — no client-side config needed.

VendorModelsRoutes via
OpenAI (legacy chat)gpt-5, gpt-5-mini, gpt-5-nano, gpt-4.1, gpt-4.1-mini, o4-mini/v1/chat/completions
OpenAI (code-plane)openai/gpt-5.5, openai/gpt-5.4-mini, openai/gpt-5.4-nano, openai/gpt-5.3-codex/vendors/openai/v1/chat/completions
DeepSeekdeepseek-v4-flash, deepseek-v4-pro/v1/chat/completions
Anthropicclaude-sonnet-4-6, claude-haiku-4-5, claude-opus-4-7/v1/chat/completions (with x-api-key for /v1/messages)

A vendor/ prefix on the model name flips cli2api to the code-plane surface (the path mulerun code / opencode uses for the newer GPT-5.x family). The prefix is stripped from the body before forwarding because the upstream path already encodes the vendor.

openai/gpt-5.3-codex is a Responses-API model — call it via /v1/responses, not /v1/chat/completions. cli2api proxies Responses calls to /vendors/openai/v1/responses automatically.

# OpenAI SDK pointed at cli2api — gpt-5.5 through the code-plane:
export OPENAI_BASE_URL=http://localhost:51222/v1
export OPENAI_API_KEY=<your-cli2api-inbound-key>
codex --model openai/gpt-5.5

GPT-5.x thinking-mode budget

The GPT-5.x family burns most of max_tokens on reasoning before producing any visible content. If message.content comes back empty with finish_reason: length, bump max_tokens to 500+ and check usage.completion_tokens_details.reasoning_tokens to see how much went to thinking.

Vendor routing edge cases

  • Anthropic models (anthropic/claude-* etc.) on /v1/messages are not yet routed to a code-plane surface — the corresponding upstream hasn't been verified. Use the unprefixed claude-opus-4-7 style for now.
  • Compressed requests (Content-Encoding: gzip/br/deflate) skip vendor routing because cli2api can't parse the body to inspect the model field. Disable client-side compression for vendor-prefixed requests.
  • Body > 64MB is rejected with HTTP 413 (request_too_large); the same cap that the global RequestSize middleware enforces.

No alias mapping

cli2api does not map OpenAI model names to MuleRun ones. Use MuleRun's real names (gpt-image-2, wan2.6-t2i, midjourney) — not dall-e-3. Aliases would make clients think they're calling OpenAI, and the behavior differences are hard to debug.

On this page