# KeepRouter — full reference > KeepRouter is a multi-model API gateway. The live catalog currently lists 118 canonical models with supported endpoints, public customer prices, and prepaid USD billing without a recurring subscription. Last updated: 2026-10-03. ## What KeepRouter is KeepRouter provides one account and API key for the models exposed in its live catalog. Choose an operation supported by the exact model: - **OpenAI-compatible:** `POST https://keeprouter.com/v1/chat/completions` with `Authorization: Bearer sk-kr-…` - **Anthropic-compatible:** `POST https://keeprouter.com/v1/messages` with `x-api-key` + `anthropic-version` — the same endpoint Claude Code and the Anthropic SDK use - **Responses:** `POST https://keeprouter.com/v1/responses` with `Authorization: Bearer sk-kr-…` for models with a configured Responses route. GPT-6.1 Sol function calling uses this operation; Chat Completions tools are not supported for that ID. Image, embedding, text-to-speech, and other specialized models use their route-specific endpoints listed on each model page and in the API docs. For compatible chat routes, the gateway can translate supported tool calls and streaming events between protocols. New accounts can call the published free model without a top-up; top up by credit or debit card (processed by Paddle as Merchant of Record). The site is bilingual (English and 简体中文); the service is not offered in mainland China. ## Base URLs - OpenAI-compatible: https://keeprouter.com/v1 - Anthropic-compatible: https://keeprouter.com ## Agent discovery - Installable KeepRouter Skill: https://keeprouter.com/SKILL.md — save as keeprouter/SKILL.md in your client's skill directory. - Well-known Skills manifest: https://keeprouter.com/.well-known/skills/index.json - Column-oriented live price CSV: https://keeprouter.com/models.csv - Public REST contract: https://keeprouter.com/api/openapi.json - Structured discovery: https://keeprouter.com/ai-index.json - Quickstart Markdown: https://keeprouter.com/docs/quickstart.md - MCP and A2A are currently unavailable. Use the Skill with the documented REST API. ## Billing - Prepaid, pay-as-you-go credits in USD — pay for the selected model's published token, image or duration units. - Published customer prices for every model, with no monthly fee or subscription. - Text models are billed per token (input / output / cached); image models use either per-image or token pricing, video is billed by generated seconds, and speech can combine input tokens with returned audio duration. ## Models and pricing (118 models) - **MiniMax M2.7** (`MiniMax-M2.7`) — MiniMax — Text — $0.2700 per 1M input tokens and $1.08 per 1M output tokens — https://keeprouter.com/models/MiniMax-M2.7.md - **MiniMax M3** (`MiniMax-M3`) — MiniMax — Text, vision, video — $0.3000 per 1M input tokens and $1.20 per 1M output tokens — https://keeprouter.com/models/MiniMax-M3.md - **Claude Fable 5** (`claude-fable-5`) — Anthropic — Text, vision — $10.00 per 1M input tokens and $50.00 per 1M output tokens — https://keeprouter.com/models/claude-fable-5.md - **Claude Fable 5.1** (`claude-fable-5-1`) — Anthropic — Text, vision — $20.00 per 1M input tokens and $50.00 per 1M output tokens — https://keeprouter.com/models/claude-fable-5-1.md - **Claude Haiku 4.5** (`claude-haiku-4-5`) — Anthropic — Text, vision — $1.00 per 1M input tokens and $5.00 per 1M output tokens — https://keeprouter.com/models/claude-haiku-4-5.md - **Claude Opus 4.5** (`claude-opus-4-5`) — Anthropic — Text, vision — $5.00 per 1M input tokens and $25.00 per 1M output tokens — https://keeprouter.com/models/claude-opus-4-5.md - **Claude Opus 4.6** (`claude-opus-4-6`) — Anthropic — Text, vision — $5.00 per 1M input tokens and $25.00 per 1M output tokens — https://keeprouter.com/models/claude-opus-4-6.md - **Claude Opus 4.7** (`claude-opus-4-7`) — Anthropic — Text, vision — $5.00 per 1M input tokens and $25.00 per 1M output tokens — https://keeprouter.com/models/claude-opus-4-7.md - **Claude Opus 4.8** (`claude-opus-4-8`) — Anthropic — Text, vision — $5.00 per 1M input tokens and $25.00 per 1M output tokens — https://keeprouter.com/models/claude-opus-4-8.md - **Claude Opus 5.5** (`claude-opus-5-5`) — Anthropic — Text, vision — $8.00 per 1M input tokens and $20.00 per 1M output tokens — https://keeprouter.com/models/claude-opus-5-5.md - **Claude Sonnet 4.6** (`claude-sonnet-4-6`) — Anthropic — Text, vision — $3.00 per 1M input tokens and $15.00 per 1M output tokens — https://keeprouter.com/models/claude-sonnet-4-6.md - **Claude Sonnet 5.5** (`claude-sonnet-5-5`) — Anthropic — Text, vision — $4.00 per 1M input tokens and $10.00 per 1M output tokens — https://keeprouter.com/models/claude-sonnet-5-5.md - **Codestral** (`codestral-latest`) — Mistral AI — Text — $0.3000 per 1M input tokens and $0.9000 per 1M output tokens — https://keeprouter.com/models/codestral-latest.md - **DeepSeek V4.1 Flash** (`deepseek-flash`) — DeepSeek — Text, vision — $0.3000 per 1M input tokens and $1.20 per 1M output tokens — https://keeprouter.com/models/deepseek-flash.md - **DeepSeek V3.1** (`deepseek-v3.1`) — DeepSeek — Text — $0.2100 per 1M input tokens and $0.7900 per 1M output tokens — https://keeprouter.com/models/deepseek-v3.1.md - **DeepSeek V3.2** (`deepseek-v3.2`) — DeepSeek — Text — $0.2288 per 1M input tokens and $0.3432 per 1M output tokens — https://keeprouter.com/models/deepseek-v3.2.md - **DeepSeek V4 Pro** (`deepseek-v4-pro`) — DeepSeek — Text — $1.32 per 1M input tokens and $3.96 per 1M output tokens — https://keeprouter.com/models/deepseek-v4-pro.md - **Devstral Medium** (`devstral-medium-latest`) — Mistral AI — Text — $0.4000 per 1M input tokens and $2.00 per 1M output tokens — https://keeprouter.com/models/devstral-medium-latest.md - **Doubao 2.0 Mini** (`doubao-2.0-mini`) — ByteDance — Text — $0.1500 per 1M input tokens and $1.50 per 1M output tokens — https://keeprouter.com/models/doubao-2.0-mini.md - **Doubao Seed 2.1 Pro** (`doubao-2.1-pro`) — ByteDance — Text, vision — $0.9000 per 1M input tokens and $4.48 per 1M output tokens — https://keeprouter.com/models/doubao-2.1-pro.md - **Doubao Seed 2.1 Turbo** (`doubao-2.1-turbo`) — ByteDance — Text, vision — $0.4500 per 1M input tokens and $2.24 per 1M output tokens — https://keeprouter.com/models/doubao-2.1-turbo.md - **Doubao Embedding Vision 250615** (`doubao-embedding-vision-250615`) — ByteDance — Multimodal embeddings — $0.0990 per 1M input tokens and $0.0990 per 1M output tokens — https://keeprouter.com/models/doubao-embedding-vision-250615.md - **Doubao Embedding Vision 251215** (`doubao-embedding-vision-251215`) — ByteDance — Multimodal embeddings — $0.0990 per 1M input tokens and $0.0990 per 1M output tokens — https://keeprouter.com/models/doubao-embedding-vision-251215.md - **Free** (`free`) — Text — $0 (free) — https://keeprouter.com/models/free.md - **Gemini 3 Flash (Preview)** (`gemini-3-flash-preview`) — Google DeepMind — Text, vision, audio, video, PDF — $1.00 per 1M input tokens and $3.00 per 1M output tokens — https://keeprouter.com/models/gemini-3-flash-preview.md - **Gemini 3.1 Flash-Lite** (`gemini-3.1-flash-lite`) — Google DeepMind — Text, vision, audio, video, PDF — $0.5000 per 1M input tokens and $1.50 per 1M output tokens — https://keeprouter.com/models/gemini-3.1-flash-lite.md - **Gemini 3.1 Flash TTS (Preview)** (`gemini-3.1-flash-tts-preview`) — Google DeepMind — Text-to-speech — $1.00 per 1M input tokens and $0.000500 per second of audio — https://keeprouter.com/models/gemini-3.1-flash-tts-preview.md - **Gemini 3.1 Pro (Preview)** (`gemini-3.1-pro-preview`) — Google DeepMind — Text, vision, audio, video, PDF — $4.00 per 1M input tokens and $18.00 per 1M output tokens — https://keeprouter.com/models/gemini-3.1-pro-preview.md - **Gemini 3.1 Pro Custom Tools (Preview)** (`gemini-3.1-pro-preview-customtools`) — Google DeepMind — Text, vision, audio, video, PDF — $4.00 per 1M input tokens and $18.00 per 1M output tokens — https://keeprouter.com/models/gemini-3.1-pro-preview-customtools.md - **Gemini 3.5 Flash** (`gemini-3.5-flash`) — Google DeepMind — Text, vision, audio, video, PDF — $1.50 per 1M input tokens and $9.00 per 1M output tokens — https://keeprouter.com/models/gemini-3.5-flash.md - **Gemini 3.5 Flash-Lite** (`gemini-3.5-flash-lite`) — Google DeepMind — Text, vision, audio, video, PDF — $0.3000 per 1M input tokens and $2.50 per 1M output tokens — https://keeprouter.com/models/gemini-3.5-flash-lite.md - **Gemini 3.6 Flash** (`gemini-3.6-flash`) — Google DeepMind — Text, vision, audio, video, PDF — $0.7500 per 1M input tokens and $3.75 per 1M output tokens — https://keeprouter.com/models/gemini-3.6-flash.md - **Gemini 3.7 Flash** (`gemini-3.7-flash`) — Google DeepMind — Text, vision, audio, video, PDF — $0.7500 per 1M input tokens and $3.75 per 1M output tokens — https://keeprouter.com/models/gemini-3.7-flash.md - **Gemini 3.8 Flash** (`gemini-3.8-flash`) — Google DeepMind — Text, vision, audio, video, PDF — $0.7500 per 1M input tokens and $3.75 per 1M output tokens — https://keeprouter.com/models/gemini-3.8-flash.md - **gemini-embedding-001** (`gemini-embedding-001`) — Google DeepMind — Text embeddings — $0.1500 per 1M input tokens and $0.6000 per 1M output tokens — https://keeprouter.com/models/gemini-embedding-001.md - **Gemma 4 26B A4B IT** (`gemma-4-26b-a4b-it`) — Google DeepMind — Text, vision — $0.1000 per 1M input tokens and $0.3000 per 1M output tokens — https://keeprouter.com/models/gemma-4-26b-a4b-it.md - **Gemma 4 31B** (`gemma-4-31B-it`) — Google DeepMind — Text — $0.1200 per 1M input tokens and $0.3500 per 1M output tokens — https://keeprouter.com/models/gemma-4-31B-it.md - **GLM-4.5** (`glm-4.5`) — Zhipu AI — Text — $0.6000 per 1M input tokens and $2.20 per 1M output tokens — https://keeprouter.com/models/glm-4.5.md - **GLM-4.5 Air** (`glm-4.5-air`) — Zhipu AI — Text — $0.2000 per 1M input tokens and $1.10 per 1M output tokens — https://keeprouter.com/models/glm-4.5-air.md - **GLM-4.6** (`glm-4.6`) — Zhipu AI — Text — $0.6000 per 1M input tokens and $2.20 per 1M output tokens — https://keeprouter.com/models/glm-4.6.md - **GLM-4.7** (`glm-4.7`) — Zhipu AI — Text — $0.6000 per 1M input tokens and $2.20 per 1M output tokens — https://keeprouter.com/models/glm-4.7.md - **GLM-5** (`glm-5`) — Zhipu AI — Text — $1.00 per 1M input tokens and $3.20 per 1M output tokens — https://keeprouter.com/models/glm-5.md - **GLM-5 Turbo** (`glm-5-turbo`) — Zhipu AI — Text — $1.20 per 1M input tokens and $4.00 per 1M output tokens — https://keeprouter.com/models/glm-5-turbo.md - **GLM-5.1** (`glm-5.1`) — Zhipu AI — Text — $1.40 per 1M input tokens and $4.40 per 1M output tokens — https://keeprouter.com/models/glm-5.1.md - **GLM-5.2** (`glm-5.2`) — Zhipu AI — Text — $1.40 per 1M input tokens and $4.40 per 1M output tokens — https://keeprouter.com/models/glm-5.2.md - **GLM 5.3** (`glm-5.3`) — Zhipu AI — Text — $1.40 per 1M input tokens and $4.40 per 1M output tokens — https://keeprouter.com/models/glm-5.3.md - **GLM 5.3 Flash** (`glm-5.3-flash`) — Zhipu AI — Text, vision, video — $0.1500 per 1M input tokens and $0.5000 per 1M output tokens — https://keeprouter.com/models/glm-5.3-flash.md - **GLM 5.3 FlashX** (`glm-5.3-flashx`) — Zhipu AI — Text, vision, video — $0.3700 per 1M input tokens and $1.25 per 1M output tokens — https://keeprouter.com/models/glm-5.3-flashx.md - **GLM-5V Turbo** (`glm-5v-turbo`) — Zhipu AI — Text, vision — $1.20 per 1M input tokens and $4.00 per 1M output tokens — https://keeprouter.com/models/glm-5v-turbo.md - **GPT-4o** (`gpt-4o`) — OpenAI — Text, vision — $2.50 per 1M input tokens and $10.00 per 1M output tokens — https://keeprouter.com/models/gpt-4o.md - **GPT-5.5** (`gpt-5.5`) — OpenAI — Text, vision — $5.00 per 1M input tokens and $30.00 per 1M output tokens — https://keeprouter.com/models/gpt-5.5.md - **GPT-6 Astra** (`gpt-6-astra`) — OpenAI — Text, vision — $25.00 per 1M input tokens and $75.00 per 1M output tokens — https://keeprouter.com/models/gpt-6-astra.md - **GPT-6 Luna** (`gpt-6-luna`) — OpenAI — Text, vision — $0.2500 per 1M input tokens and $0.7500 per 1M output tokens — https://keeprouter.com/models/gpt-6-luna.md - **GPT-6 Sol** (`gpt-6-sol`) — OpenAI — Text, vision — $5.00 per 1M input tokens and $15.00 per 1M output tokens — https://keeprouter.com/models/gpt-6-sol.md - **GPT-6.1 Sol** (`gpt-6.1-sol`) — OpenAI — Text, vision — $5.00 per 1M input tokens and $15.00 per 1M output tokens — https://keeprouter.com/models/gpt-6.1-sol.md - **GPT Image 1.5** (`gpt-image-1.5`) — OpenAI — Text-to-image — $8.00 per 1M input tokens and $32.00 per 1M output tokens — https://keeprouter.com/models/gpt-image-1.5.md - **GPT Image 2** (`gpt-image-2`) — OpenAI — Text-to-image — $8.00 per 1M input tokens and $30.00 per 1M output tokens — https://keeprouter.com/models/gpt-image-2.md - **GPT-OSS 120B** (`gpt-oss-120b`) — OpenAI — Text — $0.1500 per 1M input tokens and $0.6000 per 1M output tokens — https://keeprouter.com/models/gpt-oss-120b.md - **Grok 4.3** (`grok-4.3`) — xAI — Text, vision — $1.25 per 1M input tokens and $2.50 per 1M output tokens — https://keeprouter.com/models/grok-4.3.md - **Grok 4.7** (`grok-4.7`) — xAI — Text, vision — $4.00 per 1M input tokens and $12.00 per 1M output tokens — https://keeprouter.com/models/grok-4.7.md - **HappyHorse 1.0 Image-to-Video** (`happyhorse-1.0-i2v`) — Alibaba — Image-to-video — $0.1400 per second of video — https://keeprouter.com/models/happyhorse-1.0-i2v.md - **HappyHorse 1.0 Image-to-Video (1080p)** (`happyhorse-1.0-i2v-1080p`) — Alibaba — Image-to-video — $0.2400 per second of video — https://keeprouter.com/models/happyhorse-1.0-i2v-1080p.md - **HappyHorse 1.0 Reference-to-Video** (`happyhorse-1.0-r2v`) — Alibaba — Reference-to-video — $0.1400 per second of video — https://keeprouter.com/models/happyhorse-1.0-r2v.md - **HappyHorse 1.0 Reference-to-Video (1080p)** (`happyhorse-1.0-r2v-1080p`) — Alibaba — Reference-to-video — $0.2400 per second of video — https://keeprouter.com/models/happyhorse-1.0-r2v-1080p.md - **HappyHorse 1.0 Text-to-Video** (`happyhorse-1.0-t2v`) — Alibaba — Text-to-video — $0.1400 per second of video — https://keeprouter.com/models/happyhorse-1.0-t2v.md - **HappyHorse 1.0 Text-to-Video (1080p)** (`happyhorse-1.0-t2v-1080p`) — Alibaba — Text-to-video — $0.2400 per second of video — https://keeprouter.com/models/happyhorse-1.0-t2v-1080p.md - **HappyHorse 1.0 Video Edit** (`happyhorse-1.0-video-edit`) — Alibaba — Video-to-video — $0.1400 per second of video — https://keeprouter.com/models/happyhorse-1.0-video-edit.md - **HappyHorse 1.0 Video Edit (1080p)** (`happyhorse-1.0-video-edit-1080p`) — Alibaba — Video-to-video — $0.2400 per second of video — https://keeprouter.com/models/happyhorse-1.0-video-edit-1080p.md - **Kimi K2.6** (`kimi-k2.6`) — Moonshot AI — Text, vision, video — $0.9700 per 1M input tokens and $4.03 per 1M output tokens — https://keeprouter.com/models/kimi-k2.6.md - **Kimi K2.7 Code** (`kimi-k2.7-code`) — Moonshot AI — Text, vision, video — $0.9700 per 1M input tokens and $4.03 per 1M output tokens — https://keeprouter.com/models/kimi-k2.7-code.md - **Kimi K2.7 Code (High-Speed)** (`kimi-k2.7-code-highspeed`) — Moonshot AI — Text, vision, video — $1.94 per 1M input tokens and $8.06 per 1M output tokens — https://keeprouter.com/models/kimi-k2.7-code-highspeed.md - **Kimi K3** (`kimi-k3`) — Moonshot AI — Text, vision, video — $5.97 per 1M input tokens and $14.92 per 1M output tokens — https://keeprouter.com/models/kimi-k3.md - **Magistral Medium** (`magistral-medium-latest`) — Mistral AI — Text — $2.00 per 1M input tokens and $5.00 per 1M output tokens — https://keeprouter.com/models/magistral-medium-latest.md - **Magistral Small** (`magistral-small-latest`) — Mistral AI — Text — $0.5000 per 1M input tokens and $1.50 per 1M output tokens — https://keeprouter.com/models/magistral-small-latest.md - **MiMo v2 Flash** (`mimo-v2-flash`) — Xiaomi — Text — $0.1000 per 1M input tokens and $0.3000 per 1M output tokens — https://keeprouter.com/models/mimo-v2-flash.md - **MiMo v2.5** (`mimo-v2.5`) — Xiaomi — Text, vision, audio, video — $0.1100 per 1M input tokens and $0.2800 per 1M output tokens — https://keeprouter.com/models/mimo-v2.5.md - **MiMo v2.5 Pro** (`mimo-v2.5-pro`) — Xiaomi — Text — $0.4350 per 1M input tokens and $0.8700 per 1M output tokens — https://keeprouter.com/models/mimo-v2.5-pro.md - **MiMo V2.6 Flash** (`mimo-v2.6-flash`) — Xiaomi — Text, vision, audio, video — $0.1500 per 1M input tokens and $0.3000 per 1M output tokens — https://keeprouter.com/models/mimo-v2.6-flash.md - **MiMo V2.6 Pro** (`mimo-v2.6-pro`) — Xiaomi — Text, vision, audio, video — $0.4500 per 1M input tokens and $0.9000 per 1M output tokens — https://keeprouter.com/models/mimo-v2.6-pro.md - **MiMo V2.6 Pro UltraSpeed** (`mimo-v2.6-pro-ultraspeed`) — Xiaomi — Text, vision, audio, video — $4.48 per 1M input tokens and $8.95 per 1M output tokens — https://keeprouter.com/models/mimo-v2.6-pro-ultraspeed.md - **MiniMax H3 (1080P)** (`minimax-h3-1080p`) — MiniMax — Text-to-video — $0.1300 per second of video — https://keeprouter.com/models/minimax-h3-1080p.md - **MiniMax H3 (768P)** (`minimax-h3-768p`) — MiniMax — Text-to-video — $0.0900 per second of video — https://keeprouter.com/models/minimax-h3-768p.md - **Ministral 14B** (`ministral-14b-latest`) — Mistral AI — Text — $0.2000 per 1M input tokens and $0.2000 per 1M output tokens — https://keeprouter.com/models/ministral-14b-latest.md - **Ministral 3B** (`ministral-3b-latest`) — Mistral AI — Text — $0.1000 per 1M input tokens and $0.1000 per 1M output tokens — https://keeprouter.com/models/ministral-3b-latest.md - **Ministral 8B** (`ministral-8b-latest`) — Mistral AI — Text — $0.1500 per 1M input tokens and $0.1500 per 1M output tokens — https://keeprouter.com/models/ministral-8b-latest.md - **Mistral Large** (`mistral-large-latest`) — Mistral AI — Text — $0.5000 per 1M input tokens and $1.50 per 1M output tokens — https://keeprouter.com/models/mistral-large-latest.md - **Mistral Medium** (`mistral-medium-latest`) — Mistral AI — Text — $1.50 per 1M input tokens and $7.50 per 1M output tokens — https://keeprouter.com/models/mistral-medium-latest.md - **Mistral Small** (`mistral-small-latest`) — Mistral AI — Text — $0.1500 per 1M input tokens and $0.6000 per 1M output tokens — https://keeprouter.com/models/mistral-small-latest.md - **Mistral NeMo** (`open-mistral-nemo`) — Mistral AI — Text — $0.0200 per 1M input tokens and $0.0300 per 1M output tokens — https://keeprouter.com/models/open-mistral-nemo.md - **PixVerse v3.5 (360p)** (`pixverse-v3.5-360p`) — PixVerse — Text-to-video — $0.0450 per second of video — https://keeprouter.com/models/pixverse-v3.5-360p.md - **PixVerse v4 (360p)** (`pixverse-v4-360p`) — PixVerse — Text-to-video — $0.0450 per second of video — https://keeprouter.com/models/pixverse-v4-360p.md - **PixVerse v4.5 (360p)** (`pixverse-v4.5-360p`) — PixVerse — Text-to-video — $0.0450 per second of video — https://keeprouter.com/models/pixverse-v4.5-360p.md - **PixVerse v5 (360p)** (`pixverse-v5-360p`) — PixVerse — Text-to-video — $0.0450 per second of video — https://keeprouter.com/models/pixverse-v5-360p.md - **PixVerse v5.5 (360p)** (`pixverse-v5.5-360p`) — PixVerse — Text-to-video — $0.0450 per second of video — https://keeprouter.com/models/pixverse-v5.5-360p.md - **PixVerse v5.6 (360p)** (`pixverse-v5.6-360p`) — PixVerse — Text-to-video — $0.0350 per second of video — https://keeprouter.com/models/pixverse-v5.6-360p.md - **PixVerse v6 (360p)** (`pixverse-v6-360p`) — PixVerse — Text-to-video — $0.0250 per second of video — https://keeprouter.com/models/pixverse-v6-360p.md - **Qwen3.7 Max** (`qwen3.7-max`) — Alibaba — Text — $1.25 per 1M input tokens and $3.75 per 1M output tokens — https://keeprouter.com/models/qwen3.7-max.md - **Qwen 3.8 27B** (`qwen3.8-27b`) — Alibaba — Text, vision — $0.4500 per 1M input tokens and $3.20 per 1M output tokens — https://keeprouter.com/models/qwen3.8-27b.md - **Qwen3.8 Max 0902** (`qwen3.8-max-0902`) — Alibaba — Text, vision, video — $2.50 per 1M input tokens and $6.00 per 1M output tokens — https://keeprouter.com/models/qwen3.8-max-0902.md - **Seedream 4.5** (`seedream-4-5`) — ByteDance — Text-to-image — $0.0400 per image — https://keeprouter.com/models/seedream-4-5.md - **Seedream 5.0 Lite** (`seedream-5-0-lite`) — ByteDance — Text-to-image — $0.0350 per image — https://keeprouter.com/models/seedream-5-0-lite.md - **Text Embedding 004** (`text-embedding-004`) — Google — Text embeddings — $0.002000 per 1M input tokens and $0.002000 per 1M output tokens — https://keeprouter.com/models/text-embedding-004.md - **Veo 3.1** (`veo-3.1`) — Google DeepMind — Text-to-video — $0.4000 per second of video — https://keeprouter.com/models/veo-3.1.md - **Veo 3.1 (1080p)** (`veo-3.1-1080p`) — Google DeepMind — Text-to-video — $0.4000 per second of video — https://keeprouter.com/models/veo-3.1-1080p.md - **Veo 3.1 (4K)** (`veo-3.1-4k`) — Google DeepMind — Text-to-video — $0.6000 per second of video — https://keeprouter.com/models/veo-3.1-4k.md - **Veo 3.1 Fast** (`veo-3.1-fast`) — Google DeepMind — Text-to-video — $0.1000 per second of video — https://keeprouter.com/models/veo-3.1-fast.md - **Veo 3.1 Fast (1080p)** (`veo-3.1-fast-1080p`) — Google DeepMind — Text-to-video — $0.1200 per second of video — https://keeprouter.com/models/veo-3.1-fast-1080p.md - **Veo 3.1 Fast (4K)** (`veo-3.1-fast-4k`) — Google DeepMind — Text-to-video — $0.3000 per second of video — https://keeprouter.com/models/veo-3.1-fast-4k.md - **Veo 3.1 Lite** (`veo-3.1-lite`) — Google DeepMind — Text-to-video — $0.0500 per second of video — https://keeprouter.com/models/veo-3.1-lite.md - **Veo 3.1 Lite (1080p)** (`veo-3.1-lite-1080p`) — Google DeepMind — Text-to-video — $0.0800 per second of video — https://keeprouter.com/models/veo-3.1-lite-1080p.md - **Wan 2.7 Image-to-Video** (`wan2.7-i2v`) — Alibaba — Image-to-video — $0.1000 per second of video — https://keeprouter.com/models/wan2.7-i2v.md - **Wan 2.7 Image-to-Video (1080p)** (`wan2.7-i2v-1080p`) — Alibaba — Image-to-video — $0.1500 per second of video — https://keeprouter.com/models/wan2.7-i2v-1080p.md - **Wan 2.7 Reference-to-Video** (`wan2.7-r2v`) — Alibaba — Reference-to-video — $0.1000 per second of video — https://keeprouter.com/models/wan2.7-r2v.md - **Wan 2.7 Reference-to-Video (1080p)** (`wan2.7-r2v-1080p`) — Alibaba — Reference-to-video — $0.1500 per second of video — https://keeprouter.com/models/wan2.7-r2v-1080p.md - **Wan 2.7 Text-to-Video** (`wan2.7-t2v`) — Alibaba — Text-to-video — $0.1000 per second of video — https://keeprouter.com/models/wan2.7-t2v.md - **Wan 2.7 Text-to-Video (1080p)** (`wan2.7-t2v-1080p`) — Alibaba — Text-to-video — $0.1500 per second of video — https://keeprouter.com/models/wan2.7-t2v-1080p.md - **Wan 2.7 Video Edit** (`wan2.7-videoedit`) — Alibaba — Video-to-video — $0.0860 per second of video — https://keeprouter.com/models/wan2.7-videoedit.md - **Wan 2.7 Video Edit (1080p)** (`wan2.7-videoedit-1080p`) — Alibaba — Video-to-video — $0.1434 per second of video — https://keeprouter.com/models/wan2.7-videoedit-1080p.md ## Pages - Models & pricing: https://keeprouter.com/models - Quickstart: https://keeprouter.com/docs/quickstart - API errors: https://keeprouter.com/docs/errors - Security & data handling: https://keeprouter.com/security - Editorial policy & research method: https://keeprouter.com/editorial-policy - Changelog: https://keeprouter.com/changelog - Service status: https://keeprouter.com/status - API documentation: https://keeprouter.com/api/docs ## Cost planning - API cost calculator: [HTML](https://keeprouter.com/tools/api-cost-calculator) | [Markdown](https://keeprouter.com/tools/api-cost-calculator.md) - Formulas distinguish total input, cached input, output tokens, images, video seconds and audio duration. Estimates use current customer rates and exclude checkout fees and tax. ## Implementation guides - API migration checker: [HTML](https://keeprouter.com/tools/api-migration-checker) | [Markdown](https://keeprouter.com/tools/api-migration-checker.md). Local JSON checks, explicit model selection and a safe starter; no inference calls or compatibility certification. - Claude Code router config: [HTML](https://keeprouter.com/use-cases/claude-code) | [Markdown](https://keeprouter.com/use-cases/claude-code.md) - OpenAI SDK base URL: [HTML](https://keeprouter.com/use-cases/openai-sdk) | [Markdown](https://keeprouter.com/use-cases/openai-sdk.md) - Continue.dev config.yaml: [HTML](https://keeprouter.com/use-cases/continue-dev) | [Markdown](https://keeprouter.com/use-cases/continue-dev.md) ## Product, audience, comparison, and answer library - **A practical multi-model API, from first call to production:** https://keeprouter.com/features.md - [Unified LLM API](https://keeprouter.com/features/unified-llm-api.md) — A unified LLM API gives your application one account and authentication layer for multiple model makers. It does not mean every model has the same capability or endpoint; KeepRouter publishes the supported route on every model page. - [OpenAI-compatible API](https://keeprouter.com/features/openai-compatible-api.md) — An OpenAI-compatible API accepts familiar OpenAI SDK request shapes after you change the base URL, key, and model ID. Compatibility is operation-specific, so KeepRouter lists the supported endpoint on each model page. - [Anthropic-compatible API](https://keeprouter.com/features/anthropic-compatible-api.md) — KeepRouter exposes an Anthropic-compatible /v1/messages route for supported chat models. Claude Code and the Anthropic SDK can point at the same base URL, while model-specific capabilities still require testing. - [Model routing](https://keeprouter.com/features/model-routing.md) — KeepRouter routes a request from its public model ID to an eligible configured channel. The public response keeps the requested canonical identity, while route health and availability remain operational concerns rather than hidden marketing claims. - [Usage-based billing](https://keeprouter.com/features/usage-based-billing.md) — KeepRouter uses prepaid USD credit with no recurring subscription. The catalog publishes the current customer rate for each model, and successful requests record measured usage and the resulting charge. - [API observability](https://keeprouter.com/features/api-observability.md) — KeepRouter records the operational metadata needed to explain a request—model, route, status, token counts, cost, cache state, and latency—without writing prompt or completion bodies to the request log. - [Multimodal model APIs](https://keeprouter.com/features/multimodal-models.md) — KeepRouter presents multiple model modalities in one catalog while preserving the endpoint and price unit each operation requires. Unified discovery does not flatten unlike payloads into a misleading universal request. - **Built for teams that need model choice without gateway overhead:** https://keeprouter.com/built-for.md - [AI startups](https://keeprouter.com/built-for/ai-startups.md) — AI startups use KeepRouter when they need to evaluate and ship models through one managed account without pretending that model behavior is interchangeable. The live catalog, scoped keys, and measured usage turn vendor experiments into reviewable product decisions. - [agent builders](https://keeprouter.com/built-for/agent-builders.md) — Agent builders need more than an endpoint: long loops require model allowlists, spend limits, observable requests, and explicit retry rules. KeepRouter provides those gateway boundaries while your agent remains responsible for tool safety and task completion. - [developer tools](https://keeprouter.com/built-for/devtools.md) — Developer tools can expose a reviewed model shortlist through one gateway integration, while keeping protocol and capability differences explicit. Separate scoped keys make environments and product surfaces attributable without distributing provider credentials. - [engineering teams](https://keeprouter.com/built-for/engineering-teams.md) — Engineering teams can centralize authentication and prepaid usage while keeping model selection, evaluation, retries, and data policy under application ownership. The goal is a smaller integration surface and clearer evidence—not an invisible universal abstraction. - [AI prototyping](https://keeprouter.com/built-for/ai-prototyping.md) — A useful prototype separates plumbing from model evaluation. Prove authentication and response parsing with the free model, then run the same bounded task against paid candidates and compare the evidence your product actually needs. - [Retrieval and RAG applications](https://keeprouter.com/built-for/retrieval-applications.md) — A RAG application needs a stable relationship between its document vectors, query vectors, retrieval index, and answer model. KeepRouter can provide catalog-listed embedding and generation routes, but the application owns its index, relevance tests, citations, and the decision to re-embed when the vector model changes. - [Customer support agents](https://keeprouter.com/built-for/customer-support-agents.md) — A support agent succeeds when it resolves a permitted case correctly or hands it to a human with enough context. KeepRouter can provide model access, scoped keys and request usage evidence; the application must own customer permissions, knowledge freshness, tool execution, escalation rules and resolution measurement. - **Compare AI gateways: pricing, routing and migration:** https://keeprouter.com/compare.md - [Best AI gateways by use case](https://keeprouter.com/compare/best-ai-gateways.md) — Shortlist AI gateways by the work you need done: managed model access, controls for existing provider accounts, request observability or an API platform you already operate. Compare eight options using a concrete workload and cost per accepted task. - [OpenRouter alternatives](https://keeprouter.com/compare/openrouter-alternatives.md) — Shortlist managed APIs, BYOK gateways, self-hosted proxies or dedicated inference by the problem you need to solve. Includes a practical partial-migration example. - [Managed vs self-hosted AI gateways](https://keeprouter.com/compare/managed-vs-self-hosted-ai-gateways.md) — A managed AI gateway gives the service operator responsibility for gateway deployment, scaling and much of the incident path. A self-hosted gateway puts infrastructure, credentials, storage, upgrades and availability in your team's hands. Managed access is usually the shorter path to production. Self-hosting is justified when infrastructure location, custom policy or provider-account control is worth the ongoing operations. - [AI gateway vs direct provider APIs](https://keeprouter.com/compare/direct-provider-apis.md) — Direct provider APIs give the shortest path to provider-native features, contracts and support. An AI gateway earns its extra hop when several applications need shared credentials, model access, routing, spend policy or request evidence. Use direct integration for one stable provider or unique native capability. Use a gateway when duplicated integration and governance work has become a real operating cost. - [KeepRouter vs OpenRouter](https://keeprouter.com/compare/openrouter.md) — KeepRouter is a managed, prepaid model catalog with public customer prices, OpenAI- and Anthropic-compatible routes for supported chat models, and private operator-managed upstream routing. OpenRouter is a multi-provider API whose current documentation exposes request-level provider selection, sorting, fallback, data-policy, and BYOK controls. Choose KeepRouter for a bounded catalog and a simpler purchasing path; choose OpenRouter when your application must control provider routing directly. - [KeepRouter vs Portkey](https://keeprouter.com/compare/portkey.md) — KeepRouter sells managed access to models in its public catalog through prepaid credit and KeepRouter keys. Portkey's current documentation says its former Virtual Keys flow has migrated to Model Catalog, where teams add provider credentials and manage organization-level budgets, rate limits, model allowlists, and access. KeepRouter fits teams that want the model purchasing layer managed; Portkey fits teams that want to govern provider relationships they control. - [KeepRouter vs LiteLLM](https://keeprouter.com/compare/litellm.md) — KeepRouter is a hosted model-access service with a bounded public catalog, prepaid customer billing, and no proxy infrastructure for customers to operate. LiteLLM is software available as a Python SDK or Proxy Server; its official docs describe provider translation, retry and fallback routing, virtual keys, budgets, logging, cost tracking, and rate limiting. Choose KeepRouter to buy a managed path; choose LiteLLM when owning the gateway and provider configuration is the requirement. - [KeepRouter vs Cloudflare AI Gateway](https://keeprouter.com/compare/cloudflare-ai-gateway.md) — Compare managed model access with Cloudflare traffic controls, including Unified Billing fees, current endpoints and the caching behavior a migration must preserve. - [KeepRouter vs Together AI](https://keeprouter.com/compare/together-ai.md) — KeepRouter is a managed, prepaid catalog for supported models from several makers, with published customer routes and prices. Together AI focuses on serving open-weight models through serverless and dedicated inference, and also offers a training path. Choose by required model, deployment control, billing account and workload, then test the exact route rather than assuming the shared OpenAI client shape makes responses equivalent. - [KeepRouter vs Fireworks AI](https://keeprouter.com/compare/fireworks-ai.md) — KeepRouter offers prepaid access to the exact models and routes in its public catalog. Fireworks AI offers open-model inference through serverless and on-demand deployments, with training and serving controls beyond a gateway catalog. If you need a specific deployment shape or tuned model, test Fireworks directly; if you need listed multi-maker routes under one managed account, evaluate KeepRouter against the same application workload. - [KeepRouter vs Vercel AI Gateway](https://keeprouter.com/compare/vercel-ai-gateway.md) — Compare KeepRouter and Vercel AI Gateway by supported models, provider options, BYOK budget behavior and concrete migration work, including AI SDK applications. - [KeepRouter vs Helicone](https://keeprouter.com/compare/helicone.md) — Choose KeepRouter when the main requirement is managed model access through a focused API and catalog. Choose Helicone when routing must sit beside detailed request observability, cost tracking, sessions, prompt operations, caching, and custom rate limits. Helicone now has a managed AI Gateway as well as its open-source observability platform, so it should not be described as only a logging proxy. - [KeepRouter vs Kong AI Gateway](https://keeprouter.com/compare/kong-ai-gateway.md) — Choose KeepRouter when you want a hosted model-access service without operating an enterprise gateway or arranging each upstream provider integration. Choose Kong AI Gateway when your organization already runs Kong or needs self-hosted or hybrid deployment, centralized credentials, traffic policies, AI plugins, and governance for model, MCP, or A2A traffic. The products occupy different layers. - [KeepRouter vs Amazon Bedrock](https://keeprouter.com/compare/amazon-bedrock.md) — Choose KeepRouter when you want a managed model catalog, one KeepRouter account, and a smaller integration surface. Choose Amazon Bedrock when AWS IAM, regional deployment, model and agent services, and AWS-native governance are part of the requirement. Bedrock now documents several inference API patterns, including Responses, Messages, Chat Completions, Converse, and Invoke, but support still varies by model and endpoint. - [KeepRouter vs Gemini Enterprise Agent Platform](https://keeprouter.com/compare/gemini-enterprise-agent-platform.md) — KeepRouter is the narrower choice for managed model access through a public catalog and KeepRouter credentials. Gemini Enterprise Agent Platform is the current Google Cloud product name for the platform that now includes former Vertex AI capabilities, Model Garden, Agent Studio, Agent Runtime, evaluation, tuning, and cloud governance. Existing Vertex AI users should check the current resource and SDK documentation before migrating. - [KeepRouter vs Microsoft Foundry](https://keeprouter.com/compare/microsoft-foundry.md) — KeepRouter fits teams that want a managed model API with KeepRouter credentials and a bounded public catalog. Microsoft Foundry, formerly Azure AI Foundry, is an Azure platform for models, agents, tools, projects, evaluation, tracing, monitoring, and enterprise policy. Foundry has several endpoint families, so an OpenAI SDK example should not be read as one universal endpoint for every workload. - [KeepRouter vs Hugging Face Inference Providers](https://keeprouter.com/compare/hugging-face-inference-providers.md) — KeepRouter is a focused managed model API with its own public catalog, routes, credentials, and prepaid ledger. Hugging Face Inference Providers is a proxy integrated with the Hub, one HF token, provider selection policies, centralized billing or custom provider keys, and APIs for several inference tasks. Its OpenAI-compatible endpoint is documented for chat, while broader tasks use Hugging Face clients or task-specific HTTP calls. - [Vercel AI Gateway vs OpenRouter](https://keeprouter.com/compare/vercel-ai-gateway-vs-openrouter.md) — Compare provider restrictions, fallback, BYOK budgets and SDK migration. Both offer configurable routing; choose with the exact policies and task costs your app needs. - **Straight answers about multi-model APIs:** https://keeprouter.com/answers.md - [What is an AI gateway?](https://keeprouter.com/answers/what-is-an-ai-gateway.md) — An AI gateway sits between an application and one or more model APIs. It can centralize authentication, expose compatible request formats, select eligible routes, measure usage, and enforce access or spend boundaries. It does not make different models equivalent or remove the need for application-level evaluation and error handling. - [What is an OpenAI-compatible API?](https://keeprouter.com/answers/what-is-an-openai-compatible-api.md) — An OpenAI-compatible API implements one or more HTTP routes and response shapes used by OpenAI clients, so an application can often change the base URL, API key, and model ID instead of replacing its SDK. Compatibility is operation-specific: supporting Chat Completions does not automatically imply Responses, embeddings, images, tools, or every parameter. - [How do I use one API for multiple LLMs?](https://keeprouter.com/answers/how-to-use-one-api-for-multiple-llms.md) — Connect an OpenAI- or Anthropic-compatible client to an AI gateway, authenticate with a gateway key, and set the model to a canonical ID from its live catalog. Keep the endpoint family and model ID configurable, because specialized modalities and model-specific features may require different routes. - [How can I switch LLM models without changing application code?](https://keeprouter.com/answers/how-to-switch-llm-models-without-changing-code.md) — Keep the SDK and gateway base URL stable, and store the canonical model ID in environment or deployment configuration. You can then promote or roll back an ID without a code release—provided both models support the same route and your evaluation has verified their required behavior. - [How does LLM API pricing work?](https://keeprouter.com/answers/how-does-llm-api-pricing-work.md) — LLM APIs usually multiply measured usage by published rates: input tokens, output tokens, cached input tokens, or a per-request unit such as an image. Total workload cost depends on the exact model, prompt size, generated output, cache behavior, retries, and failed-request billing rules. - [Can Claude Code use non-Claude models?](https://keeprouter.com/answers/can-claude-code-use-non-claude-models.md) — A third-party gateway can technically translate Claude Code's Anthropic-shaped requests to a compatible non-Claude route, but Anthropic explicitly says it does not support routing Claude Code to non-Claude models through any gateway. Treat such use as a third-party compatibility experiment, not an Anthropic-supported configuration. Tools, MCP tool search, Remote Control, streaming, caching, and future Claude Code protocol changes need separate verification. - [What is LLM routing?](https://keeprouter.com/answers/what-is-llm-routing.md) — LLM routing is the policy that chooses which approved model and serving path receives a request. A route can be fixed by model ID, selected by task rules, or chosen from several eligible providers. Good routing is bounded: it defines allowed candidates, retry conditions, cost limits, and evidence for the final choice instead of sending traffic to any available model. - [What is the difference between an AI gateway and an API gateway?](https://keeprouter.com/answers/ai-gateway-vs-api-gateway.md) — An API gateway manages general service traffic through authentication, routing, rate limits, policy and observability. An AI gateway applies similar controls to model calls, then adds model-aware concerns such as canonical model IDs, provider selection, token usage, streaming events, tool-call continuity, multimodal payloads and AI-specific failover. Some products combine both layers; others place a focused AI gateway behind an existing API gateway. - [Does an AI gateway add latency?](https://keeprouter.com/answers/does-ai-gateway-add-latency.md) — Yes. An AI gateway adds at least a network and processing hop, so its own overhead cannot be zero. Whether users notice it depends on geography, connection reuse, request size, gateway work, provider time to first token, output length, retries and streaming. Measure the full request path with the same payload and report gateway overhead separately from provider generation time. - [Is an AI gateway secure?](https://keeprouter.com/answers/is-an-ai-gateway-secure.md) — An AI gateway can improve security by centralizing provider credentials, model allowlists, spend controls and request evidence. It also becomes a sensitive intermediary that may see prompts, files, tool arguments and outputs. Security depends on the deployed architecture, identity controls, logging policy, data retention, encryption, tenant isolation, upstream contracts and the customer's own prompt and tool design. - [What is LLM API failover?](https://keeprouter.com/answers/what-is-llm-api-failover.md) — LLM API failover is a controlled attempt to complete a request through another approved serving route after the first route fails, times out or becomes unavailable. It is not the same as an unlimited retry, and it should not silently choose an unevaluated model. Safe failover defines eligible routes, retryable conditions, timeout budgets, side-effect protections and evidence for every attempt. - [How do I choose an AI gateway?](https://keeprouter.com/answers/how-to-choose-an-ai-gateway.md) — Choose an AI gateway by deciding who should own provider accounts, credentials, deployment, routing policy, billing and incident response. Then test the exact endpoint, model, streaming, tools, errors, usage and data policy your application needs. A long feature list is less useful than a short proof that the gateway fits your operating model and production payload. - [What is a BYOK AI gateway?](https://keeprouter.com/answers/what-is-byok-ai-gateway.md) — A BYOK AI gateway uses model-provider credentials supplied by the customer instead of, or alongside, gateway-funded access. The gateway can centralize routing, logs, limits and policy while the provider account remains yours. BYOK changes who bills inference and who owns the contract, but it does not remove gateway fees, credential risk, logging decisions or provider-specific limits unless the product explicitly says so. - [When should you use an AI gateway?](https://keeprouter.com/answers/when-should-you-use-an-ai-gateway.md) — Use an AI gateway when several services need shared model access, when credentials and spend controls should be centralized, when teams switch or evaluate models often, or when routing and request evidence should follow one policy. A direct provider integration is often simpler for one stable workload that needs provider-native features and has no shared governance requirement. - [How to use OpenRouter with Python](https://keeprouter.com/answers/how-to-use-openrouter-with-python.md) — To call OpenRouter with the OpenAI Python SDK, install openai, set OPENROUTER_API_KEY, and use base_url="https://openrouter.ai/api/v1". Choose an exact chat model ID from OpenRouter’s current catalog, then call client.chat.completions.create. The SDK appends /chat/completions; attribution headers are optional. The native openrouter package is a separate option for OpenRouter-specific resources. - [Does OpenRouter store prompts?](https://keeprouter.com/answers/does-openrouter-store-prompts.md) — OpenRouter says it does not store prompt or response bodies by default, unless the account opts into input/output logging or OpenRouter use of that content. It does store request metadata such as model, token counts, and latency. The selected provider endpoint, enabled tools or plugins, optional logging, and ZDR settings each have separate retention rules, so a gateway-level default is not proof that the complete request path retains nothing. ## Editorial guides - **Blog index:** https://keeprouter.com/blog.md - [AI gateway guide: what it controls, when to use one, and how to adopt it](https://keeprouter.com/blog/ai-gateway-guide.md) — A practical guide to AI gateways: responsibilities, operating models, adoption tests, boundaries, and a production checklist. - [OpenAI-compatible API migration checklist](https://keeprouter.com/blog/openai-compatible-api-migration-checklist.md) — Migrate an OpenAI-style client safely with endpoint, model, streaming, tool, error, usage, rollout, and rollback checks. - [LLM routing vs load balancing: four policies teams often confuse](https://keeprouter.com/blog/llm-routing-vs-load-balancing.md) — Separate LLM routing, load balancing, failover, and retries, then define safe eligibility and evidence for each policy. - [How to reduce LLM API costs: a task-level cost worksheet](https://keeprouter.com/blog/control-multi-model-api-costs.md) — Calculate cost per accepted task with a worked example. Find when caching, shorter context, model changes and retry limits can reduce your LLM API bill. - [Responses API vs Chat Completions: choose by contract, not novelty](https://keeprouter.com/blog/responses-api-vs-chat-completions.md) — Compare Responses and Chat Completions by object model, tools, state, streaming, storage, migration work, and gateway support. - [How to evaluate an AI gateway: tests, costs and a filled scorecard](https://keeprouter.com/blog/evaluate-ai-gateway.md) — Use a filled scorecard to compare AI gateways by required features, accepted tasks, complete costs and latency. Includes a practical rollout sequence. - [Migrating from OpenRouter: choose the destination operating model first](https://keeprouter.com/blog/openrouter-alternatives-for-developers.md) — Plan an OpenRouter migration by mapping provider policy, model IDs, protocols, evidence, data controls, canary rollout, and rollback to the new operating model. - [Kimi K3 on KeepRouter: working with a 1M-token context window](https://keeprouter.com/blog/kimi-k3-1m-context.md) — Call kimi-k3 through the OpenAI SDK or Claude Code, then reason about long-context cost from measured usage instead of estimates. - [Compare Claude Code model costs without a static price snapshot](https://keeprouter.com/blog/cut-claude-code-costs.md) — Compare Claude Code-compatible model IDs using current endpoints, rates, eligibility, and measured tokens from the same repository task. - [AI gateway security checklist: map the data path before trusting the control plane](https://keeprouter.com/blog/ai-gateway-security-checklist.md) — A production AI gateway security review covering identity, provider keys, prompt data, logging, retention, routing, tenant isolation, tools and incident evidence. - [AI gateway latency guide: measure the hop, the provider and the rescued request](https://keeprouter.com/blog/ai-gateway-latency-guide.md) — Measure AI gateway latency with time to first token, total completion, gateway processing, provider generation, retries, caching and percentile-based test design. - [LLM failover design guide: recover requests without hiding unsafe retries](https://keeprouter.com/blog/llm-failover-design-guide.md) — Design bounded LLM retries and provider or model failover with error classification, deadlines, streaming state, idempotency, cost evidence and rollback tests. - [Async video generation API: submit, poll, and pay per second](https://keeprouter.com/blog/async-video-generation-api.md) — How an asynchronous video generation API works: submit a task, poll for the clip, and pay per second of video rather than per token. Failure modes included. - [Choosing a video model tier: cost per second, resolution, and input type](https://keeprouter.com/blog/choosing-a-video-model-tier.md) — How to choose among published video tiers: per-second cost math, what resolution tiers actually change, and which input types each model accepts. - [Text-to-speech billing: input tokens plus audio seconds](https://keeprouter.com/blog/text-to-speech-per-second-billing.md) — Estimate KeepRouter TTS costs from text-input tokens and generated audio seconds. Includes a worked Gemini example, WAV measurement and billing limits. - [Multimodal embeddings: one vector space for text, images, and video](https://keeprouter.com/blog/multimodal-embeddings-guide.md) — Embedders that accept images and video live on their own endpoint. How the request shape works, how media tokens are counted, and when to reach for one. - [Webhooks for long-running AI jobs: signed, retried, never the only path](https://keeprouter.com/blog/long-running-job-webhooks.md) — How completion webhooks work for long-running AI jobs: the signed event contract, the retry ladder, idempotency, and why the poll stays the source of truth. - [Image-to-video and video editing APIs: the media contract](https://keeprouter.com/blog/image-to-video-api-guide.md) — How image-to-video, reference-to-video and video editing take their input: the media array per model, fetchable URLs, input length rules, and per-second rates. - [Prompt caching cost: calculate reads, writes and real savings](https://keeprouter.com/blog/llm-cache-pricing-audit.md) — Calculate prompt caching costs with worked examples, separate cache reads and writes, avoid double-counting tokens, and test savings on real usage. - [DeepSeek API pricing: estimate cache hits without counting input twice](https://keeprouter.com/blog/deepseek-api-pricing-cache-estimation.md) — Calculate DeepSeek request costs from uncached input, cache hits and output. Includes a worked example, usage parser and a repeatable cache experiment. - [Claude API cost: plan prompt caching around writes, reads and reuse](https://keeprouter.com/blog/claude-api-cost-prompt-caching.md) — Build a Claude prompt-cache budget with separate write and read costs, a break-even example, usage fields and route-specific verification. - [GPT API pricing and SDK migration: keep the request contract visible](https://keeprouter.com/blog/gpt-api-pricing-sdk-migration.md) — Move an existing GPT client to a compatible API with separate checks for model IDs, Chat Completions, Responses, cached input and measured usage. - [Gemini with the OpenAI SDK: compare the native, compatible and gateway paths](https://keeprouter.com/blog/gemini-openai-compatible-api-differences.md) — Choose a Gemini API path with a concrete request matrix for text, tools, images, streaming and provider-specific fields, plus Python setup and cost checks. - [Doubao multimodal embeddings: build a small image-and-text retrieval test](https://keeprouter.com/blog/doubao-multimodal-embedding-retrieval.md) — Call the Doubao multimodal embedding route, validate a returned vector, keep documents separate and evaluate retrieval before building a larger index. - [OpenRouter to KeepRouter migration: map URLs, model IDs and routing fields](https://keeprouter.com/blog/openrouter-to-keeprouter-migration.md) — A concrete OpenRouter migration runbook with client configuration, namespace mapping, provider-field inventory, acceptance cases and rollback steps. - [KeepRouter API key setup: from the free model to a controlled paid request](https://keeprouter.com/blog/keeprouter-api-key-free-to-paid.md) — Create a scoped KeepRouter key, make a free-model request, diagnose common setup errors, then verify balance, model scope and measured paid usage. - [OpenRouter vs LiteLLM: compare operating cost for your actual workload](https://keeprouter.com/blog/openrouter-vs-litellm-operating-cost.md) — Compare managed model access and a self-operated LiteLLM proxy using an explicit cost worksheet, three workload scenarios and a bounded evaluation plan. - [Embedding model migration: reindex without losing retrieval quality](https://keeprouter.com/blog/embedding-model-migration-reindex-checklist.md) — A production embedding migration runbook: preserve source data, build a parallel index, dual-write updates, test recall and permissions, cut over and roll back. - [Support agent cost per resolution: a measurement worksheet](https://keeprouter.com/blog/support-agent-cost-per-resolution.md) — Measure support-agent economics by verified resolution and correct escalation, with model calls, retries, human review, failure rates and a worked hypothetical example. - [Gemini API on KeepRouter: choose a model, connect and check costs](https://keeprouter.com/blog/gemini-api-models-pricing-guide.md) — Compare nine Gemini model IDs on KeepRouter, connect with the OpenAI SDK, check current token prices and review verified streaming, JSON and tool-call examples. - [n8n OpenAI-Compatible API: Connect and Debug a Workflow](https://keeprouter.com/blog/n8n-openai-compatible-api.md) — Connect n8n to an OpenAI-compatible API, choose the right endpoint, isolate item-mapping errors, and test a workflow before enabling agent tools. - [Dify Custom Model Setup with an OpenAI-Compatible API](https://keeprouter.com/blog/dify-openai-compatible-model.md) — Configure Dify model credentials, endpoint mode and capabilities; separate chat from embeddings and diagnose validation failures before publishing an app. - [LangChain Custom Base URL: An OpenAI-Compatible API Guide](https://keeprouter.com/blog/langchain-openai-compatible-api.md) — Set ChatOpenAI base_url correctly, test streaming and tools separately, and avoid losing provider-specific fields when changing an LLM endpoint. - [LlamaIndex OpenAILike: Change the LLM, Keep the RAG Index](https://keeprouter.com/blog/llamaindex-openai-like-rag.md) — Configure LlamaIndex OpenAILike without silently changing embeddings. Test generation and retrieval separately with a small, reproducible RAG fixture. - [Cline OpenAI-Compatible Setup: Models, Tools and Cost](https://keeprouter.com/blog/cline-openai-compatible-api.md) — Configure Cline with a custom API, choose honest model limits, and evaluate a small code change by accepted patch cost instead of chat price. - [Roo Code Migration: Keep Your API, Replace the Client](https://keeprouter.com/blog/roo-code-migration.md) — Roo Code is archived. Map its API settings, native tools and permissions to a replacement client, then validate a small task before moving a repository. - [Continue API Setup: Chat and Autocomplete Roles](https://keeprouter.com/blog/continue-chat-autocomplete-models.md) — Configure Continue model roles and an OpenAI-compatible endpoint. Keep chat, edit and autocomplete separate, and debug unexpected Responses API requests. - [Aider with an OpenAI-Compatible API: Setup and Edit Tests](https://keeprouter.com/blog/aider-openai-compatible-api.md) — Point Aider at a custom API, understand the openai/ model prefix, handle model metadata warnings, and measure the cost of an accepted code edit. - [Open WebUI Custom API: Connect Models Without Surprises](https://keeprouter.com/blog/open-webui-openai-compatible-api.md) — Add an OpenAI-compatible connection to Open WebUI, distinguish model discovery from generation, and keep chat, embeddings and extra tools correctly scoped. - [LibreChat Custom Endpoint: Models, Titles and API Costs](https://keeprouter.com/blog/librechat-custom-endpoint.md) — Add a LibreChat custom endpoint with a small model allowlist, keep credentials server-side, and account for title generation and other background calls. - [Cursor Custom OpenAI Base URL: Setup, Models and Debug](https://keeprouter.com/blog/cursor-custom-openai-base-url.md) — Connect Cursor to an OpenAI-compatible API with https://keeprouter.com/v1, scope custom model IDs, isolate Verify errors, and reconcile coding task spend. - [OpenAI Codex CLI Custom Provider: Responses Config Guide](https://keeprouter.com/blog/codex-cli-openai-compatible-provider.md) — Configure OpenAI Codex CLI with a custom model_providers entry in config.toml, choose wire_api responses or chat, keep env_key off disk, and test patch loops. - [Seedream 5.0 Lite, 4.5 and GPT Image 2 API: Billing Guide](https://keeprouter.com/blog/seedream-gpt-image-api-pricing-guide.md) — Call Seedream 5.0 Lite, Seedream 4.5 and GPT Image 2 on POST /v1/images/generations, compare per-image vs token billing, and avoid retry waste. - [Cherry Studio Custom Provider: API Host, Models and Cost](https://keeprouter.com/blog/cherry-studio-openai-compatible-api.md) — Connect Cherry Studio to KeepRouter, understand how trailing slashes change /v1 URL assembly, separate vision and embedding models, and track spend. - [Structured Outputs vs JSON Mode: Validate Real Data](https://keeprouter.com/blog/structured-outputs-json-mode.md) — Choose JSON mode or schema-constrained output, validate business rules beyond syntax, and compare extraction models using missing and ambiguous fields. - [LLM Tool Calling: Build the Full Request-Result Loop](https://keeprouter.com/blog/llm-tool-calling-loop.md) — Build a tool-calling loop that preserves call IDs, validates arguments, handles streamed fragments, and stops repeated actions before they become costly. - [OpenAI-Compatible API 429 Errors: Limits, Quota and Retry](https://keeprouter.com/blog/openai-compatible-api-429-errors.md) — Diagnose API 429 errors by their origin and error body, estimate safe throughput from token limits, and prevent retry storms across workers and SDKs. - [LLM Streaming Stops Early: Diagnose SSE and Completion](https://keeprouter.com/blog/llm-streaming-interrupted.md) — Debug interrupted LLM streams without treating partial text as success. Separate network chunks, protocol events, finish reasons and final usage records. - [Context Window Exceeded: Budget Prompts Before Retrying](https://keeprouter.com/blog/context-window-exceeded-fix.md) — Fix context-window errors by budgeting history, tools, retrieved text and output. Preserve relevant evidence instead of blindly truncating conversations. - [RAG Cost per Query: A Worksheet Beyond Token Prices](https://keeprouter.com/blog/rag-api-cost-per-query.md) — Calculate RAG cost across indexing, retrieval, generation and retries. Use a worked example to compare cost per accepted answer instead of price per token. - [Reasoning Token Costs: Read Usage Without Double Counting](https://keeprouter.com/blog/reasoning-tokens-api-cost.md) — Understand reasoning-token billing across API contracts. Reconcile visible output, usage details and failed attempts with a reproducible cost example. - [GPT vs Claude vs Gemini for Document Extraction: Test Plan](https://keeprouter.com/blog/gpt-claude-gemini-document-extraction.md) — Compare GPT, Claude and Gemini for document extraction using the same fixtures, evidence rules and cost ledger. Separate PDF support from extraction accuracy. - [Batch API vs Real-Time: When the Discount Is Worth It](https://keeprouter.com/blog/batch-api-vs-realtime-cost.md) — Compare native batch APIs, application queues and real-time inference. Calculate savings, reconcile unordered results and account for deadlines and retries. - [Ollama vs Hosted APIs: Cost, Capacity and Break-Even](https://keeprouter.com/blog/ollama-vs-hosted-api-cost.md) — Compare local Ollama inference with hosted model APIs using hardware, power, operations and accepted-task costs. Include capacity before trusting break-even math. - [GPT-6.1 Sol API: Responses, tools and a reliable migration](https://keeprouter.com/blog/gpt-6-1-sol-api-tools-pricing.md) — Connect GPT-6.1 Sol with Responses, preserve tool history, compare Luna and Sol, and reconcile reasoning, cached input and fixed KeepRouter prices. - [Claude Sonnet 5.5 and Opus 5.5: API migration and cache costs](https://keeprouter.com/blog/claude-sonnet-opus-5-5-api-migration.md) — Migrate Claude 5.5 with Messages, adaptive thinking, preserved tool blocks and honest cache accounting. Evaluate Sonnet and Opus before switching agents. - [MiMo V2.6 API: Flash, Pro, UltraSpeed and the V2.5 migration](https://keeprouter.com/blog/mimo-v2-6-api-pricing-migration.md) — Choose an exact MiMo V2.6 ID, preserve reasoning in tool history, compare serving variants, and migrate before Xiaomi’s October 21 V2.5 retirement. - [GLM 5.3 vs Flash vs FlashX: inputs, reasoning and API costs](https://keeprouter.com/blog/glm-5-3-flash-flashx-api-guide.md) — Compare exact GLM 5.3 model IDs, text versus multimodal input, always-on reasoning and real usage. Avoid Coding Plan and pay-as-you-go entitlement confusion. - [Grok 4.7, Qwen 3.8, Gemma 4 and Doubao 2.1: choose by task](https://keeprouter.com/blog/grok-qwen-gemma-doubao-model-selection.md) — Compare exact Grok, Qwen, Gemma and Doubao model IDs by modality, deployment limits and accepted-result cost. Includes a reproducible selection worksheet. ## 简体中文内容库 - **从第一次调用到生产环境的多模型 API:** https://keeprouter.com/zh/features.md - [统一 LLM API](https://keeprouter.com/zh/features/unified-llm-api.md) — 统一 LLM API 让应用用一个账户和认证层访问多家模型,但不代表所有模型能力或端点完全相同。KeepRouter 会在每个模型页公开支持的调用路径。 - [OpenAI 兼容 API](https://keeprouter.com/zh/features/openai-compatible-api.md) — OpenAI 兼容 API 允许你在修改 Base URL、Key 和模型 ID 后继续使用熟悉的 OpenAI SDK 请求格式。兼容性取决于具体操作,因此 KeepRouter 会在每个模型页标出支持端点。 - [Anthropic 兼容 API](https://keeprouter.com/zh/features/anthropic-compatible-api.md) — KeepRouter 为受支持聊天模型提供 Anthropic 兼容的 /v1/messages 路由。Claude Code 与 Anthropic SDK 可指向同一 Base URL,但模型专有能力仍需逐项测试。 - [模型路由](https://keeprouter.com/zh/features/model-routing.md) — KeepRouter 将公共模型 ID 的请求路由到符合条件的配置线路。公共响应保留请求的 canonical 身份,而线路健康与可用性被当作可观测的运行问题,而不是隐藏的营销承诺。 - [按用量计费](https://keeprouter.com/zh/features/usage-based-billing.md) — KeepRouter 使用预付美元额度,不收取周期订阅费。目录公开每个模型当前用户费率,成功请求会记录实测用量与对应费用。 - [API 可观测性](https://keeprouter.com/zh/features/api-observability.md) — KeepRouter 记录解释请求所需的运行元数据——模型、路由、状态、token、费用、缓存状态和延迟——但不会把 prompt 或 completion 正文写入请求日志。 - [多模态模型 API](https://keeprouter.com/zh/features/multimodal-models.md) — KeepRouter 在一个目录中呈现多种模型模态,同时保留每种操作所需的端点和价格单位。统一发现并不会把不同 payload 强行压成误导性的万能请求。 - **为需要模型选择、但不想自建网关的团队而做:** https://keeprouter.com/zh/built-for.md - [AI 创业团队](https://keeprouter.com/zh/built-for/ai-startups.md) — AI 创业团队可用 KeepRouter 在一个托管账户中评估并上线不同模型,同时不把模型行为误认为完全等价。实时目录、限定 Key 和实测用量让供应商实验变成可审查的产品决策。 - [Agent 构建者](https://keeprouter.com/zh/built-for/agent-builders.md) — Agent 构建者需要的不只是端点:长循环需要模型白名单、消费上限、可观测请求和明确重试规则。KeepRouter 提供这些网关边界,工具安全与任务完成仍由 Agent 负责。 - [开发者工具团队](https://keeprouter.com/zh/built-for/devtools.md) — 开发者工具可通过一次网关接入开放经过审查的模型候选,同时显式保留协议与能力差异。独立限定 Key 让环境和产品入口可归因,也无需分发供应商凭证。 - [工程团队](https://keeprouter.com/zh/built-for/engineering-teams.md) — 工程团队可集中认证与预付用量,同时继续由应用拥有模型选择、评估、重试和数据政策。目标是更小的集成面和更清晰的证据,而不是不可见的万能抽象。 - [AI 原型团队](https://keeprouter.com/zh/built-for/ai-prototyping.md) — 有效原型会把链路验证与模型评估分开。先用 free 模型证明认证和响应解析,再用同一个有边界的任务测试付费候选,比较产品真正需要的证据。 - [检索与 RAG 应用](https://keeprouter.com/zh/built-for/retrieval-applications.md) — RAG 应用必须让文档向量、查询向量、检索索引与回答模型保持明确关系。KeepRouter 可提供目录中已公布的向量与生成路由,但索引、相关性测试、引用依据,以及更换向量模型后的重新生成工作仍由应用负责。 - [客服 Agent](https://keeprouter.com/zh/built-for/customer-support-agents.md) — 客服 Agent 的成功是正确解决被允许的问题,或带着足够上下文转交人工。KeepRouter 可提供模型访问、限定 Key 和请求用量证据;客户权限、知识更新、工具执行、升级规则与解决率测量仍由应用负责。 - **AI 网关对比:费用、路由与迁移:** https://keeprouter.com/zh/compare.md - [按场景选择 AI Gateway](https://keeprouter.com/zh/compare/best-ai-gateways.md) — 按要完成的工作筛选 AI Gateway:托管模型访问、已有供应商账户的统一控制、请求可观测,或现有 API 平台。用同一项具体任务和每项合格结果的成本,比较八个候选。 - [OpenRouter 替代选项](https://keeprouter.com/zh/compare/openrouter-alternatives.md) — 按要解决的问题筛选托管 API、BYOK 网关、自托管代理或专用推理,并通过一个例子判断是否只需部分迁移。 - [托管与自托管 AI Gateway](https://keeprouter.com/zh/compare/managed-vs-self-hosted-ai-gateways.md) — 托管 AI Gateway 由服务运营方负责网关部署、扩缩容和大部分故障链路;自托管则把基础设施、凭证、存储、升级和可用性放到团队自己手中。托管访问通常更快进入生产;只有基础设施位置、自定义策略或供应商账户控制值得持续运维时,自托管才更合理。 - [AI Gateway 对比供应商直连 API](https://keeprouter.com/zh/compare/direct-provider-apis.md) — 供应商直连 API 提供到原生能力、合同与支持的最短路径。只有多个应用需要共享凭证、模型访问、路由、消费策略或请求证据时,AI Gateway 增加的一跳才值得。单一稳定供应商或独有原生能力适合直连;重复接入与治理已经成为实际运行成本时,适合使用网关。 - [KeepRouter 对比 OpenRouter](https://keeprouter.com/zh/compare/openrouter.md) — KeepRouter 是带公开用户价格的托管预付费模型目录,受支持聊天模型可走 OpenAI 与 Anthropic 兼容路由,上游路由由运营方管理且不公开。OpenRouter 是多供应商 API,其当前文档提供请求级供应商选择、排序、fallback、数据策略与 BYOK 控制。需要边界明确的目录和更简单采购路径时更适合 KeepRouter;必须由应用直接控制供应商路由时更适合 OpenRouter。 - [KeepRouter 对比 Portkey](https://keeprouter.com/zh/compare/portkey.md) — KeepRouter 通过预付额度和 KeepRouter Key 销售公开目录中的托管模型访问。Portkey 当前文档说明原 Virtual Keys 已迁移到 Model Catalog,团队可添加供应商凭据,并管理组织级预算、限流、模型白名单与访问权限。希望模型采购层也被托管时更适合 KeepRouter;希望治理自己掌控的供应商关系时更适合 Portkey。 - [KeepRouter 对比 LiteLLM](https://keeprouter.com/zh/compare/litellm.md) — KeepRouter 是托管模型访问服务,提供边界明确的公开目录和预付费用户计费,用户无需运营代理基础设施。LiteLLM 是可作为 Python SDK 或 Proxy Server 使用的软件;官方文档记录了供应商协议转换、重试与 fallback 路由、Virtual Key、预算、日志、成本追踪和限流。需要购买一条托管路径时选 KeepRouter;必须自行掌控网关与供应商配置时评估 LiteLLM。 - [KeepRouter 对比 Cloudflare AI Gateway](https://keeprouter.com/zh/compare/cloudflare-ai-gateway.md) — 比较托管模型访问与 Cloudflare 流量控制,重点看 Unified Billing 费用、当前端点,以及迁移时必须保留的缓存行为。 - [KeepRouter 对比 Together AI](https://keeprouter.com/zh/compare/together-ai.md) — KeepRouter 是覆盖多个厂商已支持模型的托管预付目录,公开用户路由和价格。Together AI 侧重开放权重模型的 Serverless 与专用推理,并提供训练路径。应按所需模型、部署控制、付款账户与实际负载选型,再测试准确线路;共同支持 OpenAI 客户端格式不等于响应行为相同。 - [KeepRouter 对比 Fireworks AI](https://keeprouter.com/zh/compare/fireworks-ai.md) — KeepRouter 对公开目录中的准确模型与路由提供预付访问。Fireworks AI 提供开放模型的 Serverless 与按需部署推理,以及超出网关目录的训练和服务控制。需要特定部署形态或微调模型时应直接评估 Fireworks;需要一个托管账户访问已列出的多厂商路由时,应以相同应用负载评估 KeepRouter。 - [KeepRouter 对比 Vercel AI Gateway](https://keeprouter.com/zh/compare/vercel-ai-gateway.md) — 从受支持模型、供应商选项、BYOK 预算行为和实际迁移工作比较 KeepRouter 与 Vercel AI Gateway,覆盖 AI SDK 应用。 - [KeepRouter 对比 Helicone](https://keeprouter.com/zh/compare/helicone.md) — 主要需求是通过聚焦 API 与目录获得托管模型访问时,选择 KeepRouter。路由必须与详细请求可观测性、成本追踪、sessions、prompt operations、缓存和自定义限流放在一起时,选择 Helicone。Helicone 当前既有托管 AI Gateway,也有开源 observability 平台,不能再把它只描述成日志代理。 - [KeepRouter 对比 Kong AI Gateway](https://keeprouter.com/zh/compare/kong-ai-gateway.md) — 希望使用托管模型访问服务,而且不想运维企业 Gateway 或分别配置每个上游 provider 时,选择 KeepRouter。组织已经运行 Kong,或需要自托管与 hybrid、集中凭证、流量策略、AI plugins,以及模型、MCP 或 A2A 流量治理时,选择 Kong AI Gateway。两者位于不同产品层。 - [KeepRouter 对比 Amazon Bedrock](https://keeprouter.com/zh/compare/amazon-bedrock.md) — 如果你需要托管模型目录、一个 KeepRouter 账户和更小的接入面,选择 KeepRouter。若 AWS IAM、区域部署、模型与 Agent 服务以及 AWS 原生治理属于硬性要求,则选择 Amazon Bedrock。Bedrock 当前记录了 Responses、Messages、Chat Completions、Converse 与 Invoke 等多种推理接口,但具体支持仍随模型和端点而变。 - [KeepRouter 对比 Gemini Enterprise Agent Platform](https://keeprouter.com/zh/compare/gemini-enterprise-agent-platform.md) — KeepRouter 更聚焦于通过公开目录和 KeepRouter 凭证提供托管模型访问。Gemini Enterprise Agent Platform 是 Google Cloud 当前产品名称,现已包含原 Vertex AI 能力、Model Garden、Agent Studio、Agent Runtime、评估、调优与云治理。已有 Vertex AI 应用应先核对当前资源与 SDK 文档,再决定迁移范围。 - [KeepRouter 对比 Microsoft Foundry](https://keeprouter.com/zh/compare/microsoft-foundry.md) — KeepRouter 适合需要 KeepRouter 凭证和边界明确公开目录的托管模型 API 团队。Microsoft Foundry 原名 Azure AI Foundry,是覆盖模型、Agents、Tools、Projects、评估、Tracing、Monitoring 与企业策略的 Azure 平台。Foundry 存在多种端点族,不能把一个 OpenAI SDK 示例理解成适用于所有工作负载的通用端点。 - [KeepRouter 对比 Hugging Face Inference Providers](https://keeprouter.com/zh/compare/hugging-face-inference-providers.md) — KeepRouter 是聚焦的托管模型 API,拥有自己的公开目录、路由、凭证与预付账本。Hugging Face Inference Providers 是集成在 Hub 中的代理,使用一个 HF token,提供供应商选择策略、统一计费或自定义供应商 Key,并覆盖多种推理任务。其 OpenAI 兼容端点明确用于 chat,更广任务则使用 Hugging Face client 或任务专属 HTTP 调用。 - [Vercel AI Gateway 对比 OpenRouter](https://keeprouter.com/zh/compare/vercel-ai-gateway-vs-openrouter.md) — 比较供应商限制、回退、BYOK 预算和 SDK 迁移。两者都有可配置路由,应按应用的具体策略与任务费用选择。 - **关于多模型 API 的直接答案:** https://keeprouter.com/zh/answers.md - [什么是 AI Gateway?](https://keeprouter.com/zh/answers/what-is-an-ai-gateway.md) — AI Gateway 位于应用与一个或多个模型 API 之间,可集中认证、提供兼容请求格式、选择合格线路、计量用量并执行访问或消费边界。它不会让不同模型变得等价,也不能替代应用级评估与错误处理。 - [什么是 OpenAI 兼容 API?](https://keeprouter.com/zh/answers/what-is-an-openai-compatible-api.md) — OpenAI 兼容 API 实现 OpenAI 客户端使用的一个或多个 HTTP 路由与响应格式,因此应用通常只需修改 Base URL、API Key 和模型 ID,而不必替换 SDK。兼容性取决于具体操作:支持 Chat Completions 不代表自动支持 Responses、向量、图像、工具或所有参数。 - [如何用一个 API 调用多个 LLM?](https://keeprouter.com/zh/answers/how-to-use-one-api-for-multiple-llms.md) — 把 OpenAI 或 Anthropic 兼容客户端连接到 AI Gateway,用网关 Key 认证,并把 model 设为实时目录中的 canonical ID。端点族和模型 ID 都应可配置,因为专用模态与模型特性可能需要不同路由。 - [如何不改应用代码切换 LLM 模型?](https://keeprouter.com/zh/answers/how-to-switch-llm-models-without-changing-code.md) — 保持 SDK 与网关 Base URL 稳定,把 canonical 模型 ID 放在环境或部署配置中。只要两个模型支持相同路由且评测验证了必要行为,就能在不发布代码的情况下提升或回滚 ID。 - [LLM API 如何计费?](https://keeprouter.com/zh/answers/how-does-llm-api-pricing-work.md) — LLM API 通常把实测用量乘以公开费率:输入 token、输出 token、缓存输入 token,或图像等按请求单位。总工作负载成本取决于准确模型、提示词大小、生成输出、缓存行为、重试和失败请求计费规则。 - [Claude Code 可以使用非 Claude 模型吗?](https://keeprouter.com/zh/answers/can-claude-code-use-non-claude-models.md) — 第三方 Gateway 可以在技术上把 Claude Code 的 Anthropic 形态请求转换到兼容的非 Claude 线路,但 Anthropic 明确说明,它不支持通过任何 Gateway 将 Claude Code 路由到非 Claude 模型。应把这种用法视为第三方兼容实验,而不是 Anthropic 官方支持配置。Tools、MCP tool search、Remote Control、streaming、caching 与未来 Claude Code 协议变化都需要分别验证。 - [什么是 LLM 路由?](https://keeprouter.com/zh/answers/what-is-llm-routing.md) — LLM 路由是一套选择策略,用来决定某个请求由哪个已批准模型和服务线路处理。路由可以固定到模型 ID,也可以按任务规则选择,或在多个合格供应商线路中选路。可靠的路由必须有边界:明确候选范围、重试条件、成本上限,并记录最终选择依据,而不是把请求发给任意可用模型。 - [AI Gateway 与 API Gateway 有什么区别?](https://keeprouter.com/zh/answers/ai-gateway-vs-api-gateway.md) — API Gateway 通过认证、路由、限流、策略和可观测管理通用服务流量。AI Gateway 把类似控制用于模型调用,并增加 canonical 模型 ID、供应商选择、token 用量、流式事件、工具续轮、多模态载荷和 AI 专用故障切换等模型感知能力。有些产品把两层合在一起,另一些团队会把专用 AI Gateway 放在现有 API Gateway 之后。 - [AI Gateway 会增加延迟吗?](https://keeprouter.com/zh/answers/does-ai-gateway-add-latency.md) — 会。AI Gateway 至少增加一次网络和处理跳转,因此自身开销不可能为零。用户是否能感知,取决于地理位置、连接复用、请求大小、网关处理、供应商首 token 时间、输出长度、重试和流式传输。应使用相同载荷测量完整链路,并把网关开销与供应商生成时间分开报告。 - [AI Gateway 安全吗?](https://keeprouter.com/zh/answers/is-an-ai-gateway-secure.md) — AI Gateway 可以通过集中管理供应商凭证、模型白名单、消费控制和请求证据来改善安全性,但它也会成为可能看到提示词、文件、工具参数和输出的敏感中间层。安全性取决于部署架构、身份控制、日志策略、数据保留、加密、租户隔离、上游合同,以及客户自己的提示词与工具设计。 - [什么是 LLM API 故障切换?](https://keeprouter.com/zh/answers/what-is-llm-api-failover.md) — LLM API 故障切换是指首次线路失败、超时或不可用后,通过另一条已批准服务线路完成请求的受控尝试。它不是无限重试,也不应悄悄选择未经评估的模型。安全的故障切换会明确合格线路、可重试条件、超时预算、副作用保护,并为每次尝试留下证据。 - [如何选择 AI Gateway?](https://keeprouter.com/zh/answers/how-to-choose-an-ai-gateway.md) — 选择 AI Gateway 时,先决定谁负责供应商账户、凭证、部署、路由策略、计费和故障响应,再测试应用真正需要的端点、模型、流式、工具、错误、用量和数据策略。与其比较很长的功能清单,不如用一组短而真实的证据证明网关适合团队的运行模式与生产载荷。 - [什么是 BYOK AI Gateway?](https://keeprouter.com/zh/answers/what-is-byok-ai-gateway.md) — BYOK AI Gateway 使用客户提供的模型供应商凭证,而不是只使用网关自有额度。网关可以集中处理路由、日志、限额与策略,但供应商账户仍属于客户。BYOK 会改变推理费用由谁结算、供应商合同由谁持有,却不会自动消除网关费用、凭证风险、日志决策或供应商限制,除非产品明确说明。 - [什么时候应该使用 AI Gateway?](https://keeprouter.com/zh/answers/when-should-you-use-an-ai-gateway.md) — 当多个服务需要共享模型访问、凭证与消费控制需要集中、团队经常切换或评估模型,或路由与请求证据必须遵循同一策略时,适合使用 AI Gateway。只有一个稳定工作负载、依赖供应商原生能力且没有共享治理要求时,直连供应商通常更简单。 - [如何用 Python 调用 OpenRouter](https://keeprouter.com/zh/answers/how-to-use-openrouter-with-python.md) — 使用 OpenAI Python SDK 调用 OpenRouter:安装 openai,设置 OPENROUTER_API_KEY,将 base_url 设为 https://openrouter.ai/api/v1,再选择当前目录中的准确聊天模型 ID。调用 client.chat.completions.create 时,SDK 会自动追加 /chat/completions;应用归属 headers 为可选项。需要 OpenRouter 专属资源时,也可以使用独立的原生 openrouter 包。 - [OpenRouter 会保存提示词吗?](https://keeprouter.com/zh/answers/does-openrouter-store-prompts.md) — OpenRouter 说明,默认不保存 prompt 与 response 正文,除非账户主动打开 input/output logging 或允许 OpenRouter 使用这些内容;它会保存 model、token count、latency 等请求 metadata。所选 provider endpoint、启用的 tool 或 plugin、可选日志与 ZDR 设置各有独立 retention 规则,因此 Gateway 默认不保存正文,不能证明完整请求链路没有任何保留。 ## 简体中文编辑指南 - **博客索引:** https://keeprouter.com/zh/blog.md - [AI Gateway 指南:它控制什么、何时需要,以及如何落地](https://keeprouter.com/zh/blog/ai-gateway-guide.md) — 一份实用的 AI Gateway 指南:职责、运行模式、采用测试、能力边界与上线清单。 - [OpenAI 兼容 API 迁移清单](https://keeprouter.com/zh/blog/openai-compatible-api-migration-checklist.md) — 用端点、模型、流式、工具、错误、用量、灰度与回滚检查,安全迁移 OpenAI 风格客户端。 - [LLM 路由与负载均衡:团队最常混淆的四种策略](https://keeprouter.com/zh/blog/llm-routing-vs-load-balancing.md) — 区分 LLM 路由、负载均衡、故障切换与重试,并为每种策略定义安全资格与证据。 - [如何降低 LLM API 成本:按任务复算费用与优化收益](https://keeprouter.com/zh/blog/control-multi-model-api-costs.md) — 通过完整算例计算每个合格任务的费用,判断何时应优化缓存、上下文、模型选择或重试次数,降低实际 LLM API 账单。 - [Responses API 与 Chat Completions:按契约选择,而不是追新](https://keeprouter.com/zh/blog/responses-api-vs-chat-completions.md) — 按对象模型、工具、状态、流式、存储、迁移工作量与 Gateway 支持比较 Responses 和 Chat Completions。 - [如何评估 AI Gateway:测试方法、费用与完整评分表示例](https://keeprouter.com/zh/blog/evaluate-ai-gateway.md) — 用完整评分表示例比较 AI Gateway 的必需功能、任务质量、全部费用和延迟,并按清晰步骤完成试用与小规模发布。 - [从 OpenRouter 迁移:先选择目标运行模式](https://keeprouter.com/zh/blog/openrouter-alternatives-for-developers.md) — 按供应商策略、模型 ID、协议、证据、数据控制、灰度与回滚,把 OpenRouter 工作负载迁移到新的运行模式。 - [KeepRouter 上的 Kimi K3:使用 1M token 上下文窗口](https://keeprouter.com/zh/blog/kimi-k3-1m-context.md) — 通过 OpenAI SDK 或 Claude Code 调用 kimi-k3,并用实测用量而不是估算判断长上下文成本。 - [不用静态价格快照,比较 Claude Code 模型成本](https://keeprouter.com/zh/blog/cut-claude-code-costs.md) — 用当前端点、费率、资格和同一仓库任务的实测 token,比较 Claude Code 兼容模型 ID。 - [AI Gateway 安全清单:信任控制面之前,先画清数据路径](https://keeprouter.com/zh/blog/ai-gateway-security-checklist.md) — 一份生产级 AI Gateway 安全审查,覆盖身份、供应商 Key、提示词数据、日志、保留、路由、租户隔离、工具与故障证据。 - [AI Gateway 延迟指南:分别测量网关、供应商与获救请求](https://keeprouter.com/zh/blog/ai-gateway-latency-guide.md) — 使用首 token、总完成时间、网关处理、供应商生成、重试、缓存与分位数测试设计,正确测量 AI Gateway 延迟。 - [LLM 故障切换设计指南:恢复请求,同时避免不安全重试](https://keeprouter.com/zh/blog/llm-failover-design-guide.md) — 用错误分类、截止时间、流式状态、幂等性、费用证据与回滚测试,设计有边界的 LLM 重试和供应商或模型故障切换。 - [异步视频生成 API:任务 ID、轮询与按秒计费](https://keeprouter.com/zh/blog/async-video-generation-api.md) — 异步视频生成 API 如何工作:提交任务、轮询取回视频,并按视频秒数而非 token 计费。文中包含失败处理方式。 - [如何选择视频模型档位:每秒成本、分辨率与输入类型](https://keeprouter.com/zh/blog/choosing-a-video-model-tier.md) — 如何在已发布的视频档位之间做选择:每秒成本计算、分辨率档位到底改变了什么,以及各模型接受的输入类型。 - [文本转语音计费:输入 token 加音频秒数](https://keeprouter.com/zh/blog/text-to-speech-per-second-billing.md) — 按文本输入 token 与生成音频秒数估算 KeepRouter TTS 费用,包含 Gemini 算例、WAV 时长测量与计费边界。 - [多模态向量:把文本、图片与视频放进同一个向量空间](https://keeprouter.com/zh/blog/multimodal-embeddings-guide.md) — 支持图片与视频的向量模型位于独立端点。本文说明请求结构、媒体 token 如何计数,以及什么时候该用它。 - [长任务完成回调:签名、重试,以及为什么它不是唯一路径](https://keeprouter.com/zh/blog/long-running-job-webhooks.md) — 长任务完成回调如何工作:签名事件契约、重试阶梯、幂等处理,以及为什么轮询仍然是事实来源。 - [图生视频与视频编辑 API:media 输入契约](https://keeprouter.com/zh/blog/image-to-video-api-guide.md) — 图生视频、参考生视频与视频编辑如何接收输入:各模型的 media 数组、可被上游抓取的 URL、输入长度规则,以及每秒费率。 - [提示词缓存成本:算清读取、写入与实际节省](https://keeprouter.com/zh/blog/llm-cache-pricing-audit.md) — 通过完整算例核算提示词缓存费用,区分读取与写入,避免重复计算输入 token,并用实际使用间隔检查缓存是否省钱。 - [DeepSeek API 价格:缓存命中后,怎样不重复计算输入费用](https://keeprouter.com/zh/blog/deepseek-api-pricing-cache-estimation.md) — 按未缓存输入、缓存命中和输出估算 DeepSeek API 费用,包含算例、usage 解析代码与可复现的缓存实验。 - [Claude API 费用:按写入、读取和复用次数规划 Prompt Caching](https://keeprouter.com/zh/blog/claude-api-cost-prompt-caching.md) — 分别核算 Claude 提示词缓存写入与读取费用,用盈亏平衡算例、usage 字段和具体线路验证建立预算。 - [GPT API 价格与 SDK 迁移:把请求契约和费用一起核对](https://keeprouter.com/zh/blog/gpt-api-pricing-sdk-migration.md) — 迁移 GPT 客户端时,分别检查模型 ID、Chat Completions、Responses、缓存输入与实测用量,附 Python 请求和验收表。 - [用 OpenAI SDK 调用 Gemini:区分原生、兼容端点和网关路径](https://keeprouter.com/zh/blog/gemini-openai-compatible-api-differences.md) — 用文本、工具、图片、流式和专有字段的请求矩阵选择 Gemini API 路径,附 Python 配置与费用核对方法。 - [Doubao 多模态 Embedding:建立一个图文检索小样本](https://keeprouter.com/zh/blog/doubao-multimodal-embedding-retrieval.md) — 调用 Doubao 多模态向量端点,校验返回向量、避免把独立文档合并,在扩大索引前验证图文检索质量与成本。 - [从 OpenRouter 迁移到 KeepRouter:核对 URL、模型 ID 与路由字段](https://keeprouter.com/zh/blog/openrouter-to-keeprouter-migration.md) — 一份具体的 OpenRouter 迁移手册,涵盖客户端配置、模型命名空间、provider 字段、验收案例与完整回滚步骤。 - [KeepRouter API Key 配置:从免费模型走到一次受控付费请求](https://keeprouter.com/zh/blog/keeprouter-api-key-free-to-paid.md) — 创建有范围的 KeepRouter Key,运行免费模型请求并定位配置错误,再核对余额、模型范围与付费调用用量。 - [OpenRouter 与 LiteLLM:按实际工作负载比较总运行成本](https://keeprouter.com/zh/blog/openrouter-vs-litellm-operating-cost.md) — 用成本工作表、三种工作负载与有边界的验证计划,比较托管模型访问与自行运行 LiteLLM 代理的实际成本。 - [向量模型迁移:重建索引时如何保住检索质量](https://keeprouter.com/zh/blog/embedding-model-migration-reindex-checklist.md) — 生产环境向量模型迁移指南:保存源数据、建立并行索引、双写更新、验证召回与权限、灰度切换并保留回滚。 - [客服 Agent 每件解决成本:一份可复用的测量表](https://keeprouter.com/zh/blog/support-agent-cost-per-resolution.md) — 按已验证解决与正确转人工衡量客服 Agent 经济性,纳入模型调用、重试、人工审核、失败率与标明假设的算例。 - [KeepRouter Gemini API:模型选择、接入与费用核对](https://keeprouter.com/zh/blog/gemini-api-models-pricing-guide.md) — 在 KeepRouter 选择九个 Gemini 型号,使用 OpenAI SDK 接入,查看实时 token 价格与流式、JSON、工具调用的验证范围,按合格结果评估成本。 - [n8n 接入 OpenAI 兼容 API:配置与工作流排障](https://keeprouter.com/zh/blog/n8n-openai-compatible-api.md) — 从一个可检查的分类工作流开始,配置 n8n 的 OpenAI 兼容 API,区分端点、凭证和多条数据映射问题,再决定是否启用 Agent 工具。 - [Dify 自定义模型:接入 OpenAI 兼容 API](https://keeprouter.com/zh/blog/dify-openai-compatible-model.md) — 配置 Dify 自定义模型的凭证、API 模式与能力,区分聊天和知识库向量模型,并通过一个小工作流定位验证失败。 - [LangChain 自定义 Base URL:兼容 API 接入指南](https://keeprouter.com/zh/blog/langchain-openai-compatible-api.md) — 正确设置 ChatOpenAI 的 base_url,分开验证普通调用、流式输出与工具调用,并识别更换端点时可能丢失的供应商扩展字段。 - [LlamaIndex OpenAILike:更换 LLM,保留 RAG 索引](https://keeprouter.com/zh/blog/llamaindex-openai-like-rag.md) — 使用 OpenAILike 更换 LlamaIndex 的生成模型,保留向量模型与索引,通过可复现的文档样本分别验证检索、回答和引用。 - [Cline 接入 OpenAI 兼容 API:模型、工具与费用](https://keeprouter.com/zh/blog/cline-openai-compatible-api.md) — 为 Cline 配置兼容 API,正确填写模型限制,并用一个可检查的小补丁验证读文件、改代码和运行测试的完整过程。 - [Roo Code 停运后迁移:保留 API,替换代码客户端](https://keeprouter.com/zh/blog/roo-code-migration.md) — Roo Code 已归档。为现有用户梳理 API 配置、原生工具和权限的迁移方法,通过小任务验证替代客户端,而非继续推荐旧扩展。 - [Continue API 配置:分清聊天与自动补全角色](https://keeprouter.com/zh/blog/continue-chat-autocomplete-models.md) — 在 Continue 中分别配置聊天、编辑和自动补全角色,接入兼容端点,并检查 Responses API 选择、模型限制与真实调用费用。 - [Aider 接入 OpenAI 兼容 API:配置与编辑验证](https://keeprouter.com/zh/blog/aider-openai-compatible-api.md) — 配置 Aider 自定义 API,区分 openai/ 客户端前缀与服务端模型 ID,处理模型元数据警告,并核算合格代码修改的成本。 - [Open WebUI 自定义 API:连接模型与排查功能差异](https://keeprouter.com/zh/blog/open-webui-openai-compatible-api.md) — 在 Open WebUI 添加兼容 API,区分模型发现与真实生成,分别核对聊天、向量、附件和后台任务,避免误判连接成功。 - [LibreChat 自定义端点:模型、标题与 API 费用](https://keeprouter.com/zh/blog/librechat-custom-endpoint.md) — 为 LibreChat 添加自定义端点,使用小范围模型列表、服务端凭证,并检查标题生成与其他后台调用,准确评估完整对话费用。 - [Cursor 自定义 OpenAI Base URL:配置、模型选择与排错](https://keeprouter.com/zh/blog/cursor-custom-openai-base-url.md) — 在 Cursor 中配置 https://keeprouter.com/v1 自定义地址,区分订阅特性与自定义 API Key 适用范围,排查 Verify 报错并核算完整任务费用。 - [OpenAI Codex CLI 自定义 Provider:Responses 配置与工具验证](https://keeprouter.com/zh/blog/codex-cli-openai-compatible-provider.md) — 在 ~/.codex/config.toml 中配置自定义 model_providers,区分 wire_api 的 responses 与 chat 线路,通过 env_key 隔离凭证并验证补丁循环。 - [Seedream 5.0 Lite、4.5 与 GPT Image 2 API:计费与接入](https://keeprouter.com/zh/blog/seedream-gpt-image-api-pricing-guide.md) — 通过 POST /v1/images/generations 调用 Seedream 5.0 Lite、4.5 与 GPT Image 2,对比按张计费与按 token 计费差异并控制重试成本。 - [Cherry Studio 自定义服务商:API 地址、模型与费用核对](https://keeprouter.com/zh/blog/cherry-studio-openai-compatible-api.md) — 在 Cherry Studio 中配置 KeepRouter 自定义服务商,理清末尾斜杠对 /v1 路径拼接的影响,区分视觉与向量模型并核对账单。 - [Structured Outputs 与 JSON Mode:如何验证真实数据](https://keeprouter.com/zh/blog/structured-outputs-json-mode.md) — 区分 JSON Mode 与 Schema 约束输出,用缺失字段、冲突金额和拒答样本验证抽取质量,并把业务正确性纳入模型选择。 - [LLM 工具调用:实现完整的请求与结果循环](https://keeprouter.com/zh/blog/llm-tool-calling-loop.md) — 保留工具调用 ID,校验参数,处理流式片段与重复动作,搭建可验证的工具往返流程,并统计完整任务成本。 - [OpenAI 兼容 API 的 429 错误:限流、额度与重试](https://keeprouter.com/zh/blog/openai-compatible-api-429-errors.md) — 按错误来源与响应体区分 429,结合请求和 token 配额计算吞吐,并限制 SDK、队列和工作流的重试叠加。 - [LLM 流式输出中断:区分 SSE、超时和完成状态](https://keeprouter.com/zh/blog/llm-streaming-interrupted.md) — 排查 LLM 流式输出提前停止,区分网络分片、协议事件、结束原因和用量记录,避免把部分文字当成成功答案。 - [上下文超限怎么办:先核算提示词,再决定重试](https://keeprouter.com/zh/blog/context-window-exceeded-fix.md) — 把历史、工具定义、检索片段和输出预留放进同一 token 预算,解决上下文超限,同时保留回答真正需要的证据。 - [RAG 每次查询多少钱:别只计算生成 token](https://keeprouter.com/zh/blog/rag-api-cost-per-query.md) — 把建库、检索、生成、重试和人工复核放进同一张成本表,用可复算的示例比较每个合格答案的费用,而不只看 token 单价。 - [推理 token 怎么计费:避免重复计算与短回答误判](https://keeprouter.com/zh/blog/reasoning-tokens-api-cost.md) — 区分可见回答、推理 token 与不同 API 的 usage 口径,用可复算示例避免重复计费统计,并衡量真正完成任务的成本。 - [GPT、Claude、Gemini 文档提取选型:样本与评分方法](https://keeprouter.com/zh/blog/gpt-claude-gemini-document-extraction.md) — 用统一样本、证据规则和成本账本比较 GPT、Claude、Gemini 的文档提取能力,分开验证 PDF 接入、字段准确度和人工复核成本。 - [Batch API 与实时请求:什么时候批处理更划算](https://keeprouter.com/zh/blog/batch-api-vs-realtime-cost.md) — 比较原生 Batch、应用队列和实时推理,计算折扣是否覆盖工程成本,并正确处理乱序结果、截止时间和失败重试。 - [Ollama 本地模型与托管 API:成本、容量与盈亏平衡](https://keeprouter.com/zh/blog/ollama-vs-hosted-api-cost.md) — 把硬件、电费、运维、质量与容量放进同一成本模型,比较 Ollama 本地推理和托管 API,避免仅凭免费软件判断哪个更便宜。 - [GPT-6.1 Sol API:Responses、工具调用与可靠迁移](https://keeprouter.com/zh/blog/gpt-6-1-sol-api-tools-pricing.md) — 使用 Responses 接入 GPT-6.1 Sol,保留工具历史,比较 Luna 与 Sol,并核对思考、缓存输入和 KeepRouter 固定费率。 - [Claude Sonnet 5.5 与 Opus 5.5:API 迁移与缓存成本](https://keeprouter.com/zh/blog/claude-sonnet-opus-5-5-api-migration.md) — 用 Messages、自适应思考、完整工具块和准确缓存核算迁移 Claude 5.5,切换 Agent 前比较 Sonnet 与 Opus。 - [MiMo V2.6 API:Flash、Pro、UltraSpeed 与 V2.5 迁移](https://keeprouter.com/zh/blog/mimo-v2-6-api-pricing-migration.md) — 选择确切 MiMo V2.6 ID,保留工具历史中的思考,比较服务变体,并在小米 10 月 21 日停用 V2.5 前完成迁移。 - [GLM 5.3、Flash 与 FlashX:输入、思考与 API 成本](https://keeprouter.com/zh/blog/glm-5-3-flash-flashx-api-guide.md) — 比较准确 GLM 5.3 ID、文字与多模态输入、持续思考和实际用量,避免混淆 Coding Plan 权益与按量计费。 - [Grok 4.7、Qwen 3.8、Gemma 4 与 Doubao 2.1:按任务选型](https://keeprouter.com/zh/blog/grok-qwen-gemma-doubao-model-selection.md) — 按模态、部署限制与合格结果成本比较准确 Grok、Qwen、Gemma、Doubao ID,提供可复现选型表和验收方法。 ## Contact - support@keeprouter.com