One API key for all AI models
更新于2026年11月30日
One API key for all AI models is an OpenCheap key: 814 chat models from 84 labs, Anthropic, OpenAI, Google, DeepSeek, Moonshot and Qwen among them. The API stays OpenAI-compatible, so the SDK you already use keeps working: set the base URL to https://api.opencheap.si/v1, use the OpenCheap key, and pass any model id. Each request goes to the cheapest healthy provider of that model, and one prepaid balance pays for all of them.
Switch in two lines
The base URL and the key change; your prompts, tools and parsing stay the same.
from openai import OpenAI
import os
client = OpenAI(
base_url="https://api.opencheap.si/v1",
api_key=os.environ["OPENCHEAP_API_KEY"],
)
for model in ["claude-sonnet-5", "gemini-3.5-flash", "deepseek-v4-flash", "kimi-k3"]:
r = client.chat.completions.create(
model=model,
messages=[{"role": "user", "content": "One line: who made you?"}],
)
print(model, r.choices[0].message.content, r.usage.cost)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.opencheap.si/v1",
apiKey: process.env.OPENCHEAP_API_KEY,
});
const r = await client.chat.completions.create({
model: "gpt-5.5",
messages: [{ role: "user", content: "Hello" }],
});使用成本 in every answer is what that request was charged, in USD. Setup for Cursor, Claude Code, Codex, LangChain, LiteLLM, the Vercel AI SDK and others is in the integrations.
各实验室的模型
Live from the catalog. Each name opens the model's page with every provider's price, speed and uptime.
And 70 more labs. Every model is on one page.
What “OpenAI-compatible” covers here
| 端点 | For |
|---|---|
POST /v1/chat/completions | Any OpenAI SDK or tool, streaming included. |
POST /v1/responses | Tools built on the Responses API, such as Codex. |
POST /v1/messages | Tools built on Anthropic's API, such as Claude Code: point them at the host without /v1. |
GET /v1/models | The model list. |
Model ids are the plain name: 克劳德-十四行诗-5, gpt-oss-120b. The vendor/model spelling and a provider's own id are aliases of the same model, and opencheap/ in front works everywhere (Cursor needs it for names that start with claude-).
问题与解答
Is there one API key for all AI models?
Yes. One API key for all AI models is an OpenCheap key: it calls 814 chat models from 84 labs through one OpenAI-compatible API at https://api.opencheap.si/v1. Keep the OpenAI SDK, set the base URL, and pass any model id.
Is there one API key that works for Claude, Gemini, GPT and DeepSeek models?
Yes. One OpenCheap key calls 814 chat models from 84 labs, Anthropic, OpenAI, Google and DeepSeek among them, through one OpenAI-compatible API at https://api.opencheap.si/v1. You do not need an account with each model maker.
Can I keep using the OpenAI SDK?
Yes. Set the SDK's base URL to https://api.opencheap.si/v1, use your OpenCheap key as the API key, and pass any model id. Python, JavaScript and any other OpenAI client work the same way.
Which endpoints does it support?
Chat completions (with streaming), the Responses API for tools built on it such as Codex, and Anthropic's Messages API for tools built on that, such as Claude Code. The model list is at /v1/models.
How is this different from OpenRouter?
Both give you one OpenAI-compatible key for models from many labs. OpenCheap sends every request to the cheapest healthy provider of the model by default, and every answer reports what it cost in usage.cost.
Do OpenRouter-style model ids work?
Yes. The plain id (claude-sonnet-5) is the usual one; the vendor/model spelling (anthropic/claude-sonnet-5) and a provider's own id are accepted as aliases of the same model, and every id also works with opencheap/ in front.
What does it cost?
You pay per token, at the price of the provider that serves each request: every request goes to the cheapest healthy provider of the model. There is no monthly fee, and credits never expire. Each model's page shows its price.
Are there free models?
Yes, 4 rate-limited models right now: add :free to the model id, capped at 10 requests a minute and 200 a day per key. The same model without :free is billed per token, with no such cap.
More guides
热门模型的实时报价(按100万代币计价),由系统自动路由至最便宜且运行正常的提供商。一个兼容OpenAI的密钥。按需付费,无月费。
Official DeepSeek API prices next to live OpenCheap rates for V4.1 Flash, V4 Pro and other DeepSeek models. One OpenAI-compatible key. Prices move; the tables are dated.
OpenCheap routes each request to the cheapest healthy provider of your model, fails over before the first byte, and bills that provider's price.
An AI agent can pay OpenCheap for one completion in USDC on Base with x402: call with no key, read the 402 price, sign, and get the answer in the same request.
Give each OpenCheap key a daily, weekly, monthly or lifetime spend limit, so an agent left running overnight can't spend more than you allow.
Connect Cursor, LiteLLM and the OpenAI SDK to OpenCheap with a base URL, a key and a model id. Steps, env variables, code and common errors.
OpenCheap routes to the cheapest provider by default; OpenRouter balances price, speed and uptime. Compare live prices, failover and fees.
Anthropic's list prices next to live OpenCheap rates for Claude. One OpenAI-compatible key. Prices move; both tables are dated.
GPT API pricing per 1M tokens: OpenAI's list rates for GPT-6, GPT-5 and GPT-4 models next to live OpenCheap prices, on one OpenAI-compatible key.
Gemini chat models on OpenCheap, with today's price per million input and output tokens from the same book as the pricing page.
Qwen API pricing per 1M tokens: Alibaba Cloud's list rates next to live OpenCheap prices for Qwen4 Max, Qwen3 Coder and more. One OpenAI-compatible key.
Llama 4 Maverick、Scout、3.3 70B 和 3.1 8B 的 Llama API 定价(按 100 万个令牌计),来自最便宜且服务稳定的提供商。包含一个与 OpenAI 兼容的密钥。
Kimi API pricing per 1M tokens: Moonshot's list rates next to live OpenCheap prices for Kimi K3.1 Pro, K3 and K2.6. One OpenAI-compatible key.
Point Claude Code at OpenCheap and pick a model per task: Claude at the provider's price, or open models for a fraction, on one key with a spend limit.