A token relay provider (API Relay) is a third-party API proxy service that offers the same AI model capabilities at lower prices through aggregated purchasing and optimized routing.
The following providers are OpenAI API compatible and can be added directly in AIGateway
暂无中转商数据
Submit your recommended provider. It will be displayed in the list after review.
Three steps to connect a relay provider — no AI tool config changes needed
Choose a provider, register and top up. Get the API Key and Base URL from the dashboard (typically like https://api.example.com/v1).
Open AIGateway → Providers page → Add custom provider → Enter Base URL and API Key → Select models to use.
Point the API address in ChatGPT / Claude Code to the AIGateway local gateway 127.0.0.1:15721 to start using.
# Provider Info
Name: "Relay A"
Base URL: "https://api.provider-a.com/v1"
API Key: "sk-xxxxxxxxxxxxx"
Format: "OpenAI Compatible"
# Available Models
Models:
- "gpt-4o"
- "claude-3-5-sonnet"
- "gemini-pro"
- "deepseek-chat"
{
"env": {
"OPENAI_API_KEY": "PROXY_MANAGED",
"OPENAI_BASE_URL": "http://127.0.0.1:15721"
}
}
More than just proxy forwarding — AIGateway makes relay usage safer and more flexible
AIGateway tracks token usage and costs per provider in real-time, helping you compare actual costs and make optimal choices.
Add multiple relay providers to a virtual model group. When one fails or rate-limits, automatically switch to backup — no workflow interruption.
All relay API keys stored in local SQLite database, never passed through third parties. AI tools don't need to expose keys.
Configure the relay provider once in AIGateway. ChatGPT, Claude Code, and all other tools share the same gateway entry.
OpenAI and Anthropic formats auto-adapted. Claude Code can directly use OpenAI-compatible relay providers.
Complete request logging for troubleshooting relay provider latency, error rates, and model availability.
Relay providers are third-party proxy services that offer lower pricing through aggregated purchasing and optimized routing. Functionally similar to official APIs, but may have latency fluctuations or availability differences. Recommended for development and non-sensitive use cases.
Relay providers are third-party services — your request content passes through their servers. Avoid processing sensitive data (personal privacy, trade secrets) through relays. AIGateway itself does not store or forward your request content to additional servers.
Go to AIGateway's Providers page, click "Add Custom Provider", enter the relay provider's Base URL and API Key, and select the models you want to use. Any OpenAI API compatible service can be added.
Yes. Add multiple relay providers and put them in the same virtual model group with priority settings. AIGateway will call them by priority and automatically switch to backup when the high-priority provider fails (429, timeout, etc.).
AIGateway is open-source software under the MIT license, completely free. You only pay for the relay provider's API call costs — AIGateway itself charges nothing.