AI gateway for model teams
一个 API,调用所有前沿模型。
兼容 OpenAI、Codex Responses 和 Anthropic Messages API。配合 AG Switch,无需复制密钥或手改配置,一键启动 Claude Code 与 Codex。
gateway request
ready
POST
/v1/responses142 ms
01client OpenAI Responses
02model gpt-5.6-sol
03route account-pool / primary
04usage 1,284 input + 416 output
primaryAccount group A
fallbackarmed
ledgerrecorded
one key, multiple providersAPI compatible by design
三步完成接入,立即开始编码。
无需手动编辑配置。完成授权、选择工具,即可启动。
Connect AG Switch
Authorize this device with your AI Gateway account.
Gateway URLVerification code: AG7K-W2Q9
Workspace
ConnectedBalance9.32
Callable keys1Ready for routing
Active routeClaude / Not selectedCurrent desktop profile
Launch configuration
Application
Claude Code
Codex
API key
Select a key
Compression
Off
Launch
Refresh
Models
0
Select an API key to sync models
AIGateway
Authorize AG Switch
Connect this desktop to your account? The client can use only the API Key profile you select.
Device codeAG7K-W2Q9
Authorize desktop
Desktop connected
Authorization is complete. You can return to AG Switch.
PS C:\workspace> codex
AG Switch profile loaded
Connected through http://127.0.0.1:17653
Ready What would you like to build?
接口兼容,模型价格也能核对。
接入面保持熟悉,模型目录和费用规则放在控制台统一维护。
API SURFACEENDPOINTUSE
OpenAI Chat
POST /v1/chat/completionschatCodex Responses
POST /v1/responsesagentsImage Generation
POST /v1/images/generationsimagesAnthropic Messages
POST /v1/messagesmessagesToken Counting
POST /v1/messages/count_tokenstokensMODEL CATALOGLIVE PRICING
正在加载模型价格...
常见问题
关于 SDK、账号切换、费用记录和图片生成,先在这里找到直接答案。
需要改写现有 SDK 吗?
不需要。OpenAI、Codex 和 Anthropic 客户端只需要替换 Base URL 和 API Key。
账号池什么时候会切换?
网关会结合账号启用状态、模型映射和健康检查结果进行路由。主线路不可用时会接管到备用账号。
费用是如何记录的?
请求完成后会记录模型、Token、图片单位和价格快照,之后可以在用量日志和财务页面中追溯。
支持流式响应和图片生成吗?
支持。OpenAI、Codex 和 Anthropic 的流式响应以及 GPT Image 生成都通过对应接口转发。