The unified LLM gateway built for production
Global model direct access · up to 90% off
Leading model families, one endpoint
One key for the OpenAI, Anthropic and Google model families — unified API, unified billing, switch anytime.
OpenAI · GPT family
GPT-4o and the o-series reasoning models balance chat, coding and multimodal understanding, backed by the most mature SDK ecosystem — the natural default for most applications.
GPT-4o · GPT-4o mini · o-series
Anthropic · Claude family
Opus / Sonnet / Haiku cover flagship to lightweight, with strong long-context understanding and code or writing quality — a common pick for coding assistants and content work.
Opus · Sonnet · Haiku
Google · Gemini family
Pro and Flash tiers, strong on long context and multimodal input. Flash stands out on value at its level for high-throughput workloads.
Gemini 2.5 Pro · Gemini 2.5 Flash
Live pricing · up to 90% off
All prices in USD per 1M tokens
- INPUT / 1M TOKENS
- 19.2
- OUTPUT / 1M TOKENS
- 96
- INPUT / 1M TOKENS
- 19.2
- OUTPUT / 1M TOKENS
- 96
- INPUT / 1M TOKENS
- 19.2
- OUTPUT / 1M TOKENS
- 96
- INPUT / 1M TOKENS
- 3.84
- OUTPUT / 1M TOKENS
- 19.2
- INPUT / 1M TOKENS
- 3.84
- OUTPUT / 1M TOKENS
- 19.2
- INPUT / 1M TOKENS
- 0.352
- OUTPUT / 1M TOKENS
- 1.408
Pay only for what you use
Billed in USD, priced automatically per model. No monthly fee, no subscription.
Buy creditsUSD billing · No minimum · Top up anytime · Alipay supported
Quick start
100% protocol compatible. Change one line — the Base URL — and you are production ready.
curl https://aiapigpt.com/v1/chat/completions \
-H "Authorization: Bearer $SUB2API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-4o", "messages": [{"role": "user", "content": "Hello"}]}'
export OPENAI_BASE_URL=https://aiapigpt.com/v1 export OPENAI_API_KEY=sk-your-sub2api-key codex "refactor this file"
# Claude Code 使用 Anthropic 协议(/v1/messages),本站目前只实现 OpenAI 的 # /v1/chat/completions,直接指过来会 404。 # # 要用 Claude 系列模型,请走支持自定义 OpenAI Base URL 的客户端: export OPENAI_BASE_URL=https://aiapigpt.com/v1 export OPENAI_API_KEY=sk-your-sub2api-key
export OPENAI_BASE_URL=https://aiapigpt.com/v1 export OPENAI_API_KEY=sk-your-sub2api-key # every OpenAI SDK call now goes through the gateway
from openai import OpenAI
client = OpenAI(
base_url="https://aiapigpt.com/v1",
api_key="sk-your-sub2api-key",
)
client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello"}],
)
Point the base URL at us, drop in your API key — the rest of your code stays the same.
Production-grade routing
Price
Routes to the cheapest healthy channel; discounts track upstream prices continuously.
Latency
Probes channel latency continuously and steers away from slow nodes.
Uptime
Fails over to standby accounts instantly so requests never break.
FAQ
- What is an LLM router?
- A routing layer between your app and many model providers. It picks the best upstream account in real time by price, latency and availability, fails over automatically, and your code only talks to one Base URL.
- Is it OpenAI-compatible?
- Yes. Change one line — the Base URL. Request and response shapes match the OpenAI API, so your SDK stays the same.
- How can prices be up to 90% off?
- We aggregate multiple upstream channels and route to whichever is cheapest right now, passing on prompt-cache discounts. Every request is billed at the discount in effect at that moment.
- Is my data used to train models?
- No. Requests are used only for forwarding and billing. Logs are masked by default and sensitive headers are never persisted.
- Do credits expire?
- No. Pay-as-you-go balance never expires. Use it whenever you like and top up at any time.