Same Models · Lower Cost · Global API 同源模型 · 更低成本 · 全球 API

AnAiApi API DocumentationAnAiApi API 文档

Integrate world-class AI models through one OpenAI-compatible endpoint. Change the base URL and keep your existing code.

通过统一的 OpenAI 兼容接口接入顶级大模型。只需修改 base_url,即可沿用你现有的代码。

/v1/api/anthropic/api/gemini

Quick Start快速开始

Three steps to your first response.

三步即可获得第一次响应。

  1. Get an API key. Register at www.anaiapi.com, top up, then create a key starting with sk- on the API Keys page.
  2. 获取 API 密钥。www.anaiapi.com 注册并充值后,于「API 密钥」页面创建以 sk- 开头的密钥。
  3. Point your SDK at our base URL. Set base_url = https://www.anaiapi.com/v1.
  4. 将 SDK 指向本站 base_url。 设置 base_url = https://www.anaiapi.com/v1
  5. Call any model. Use our model IDs (see table below) in your existing OpenAI-style requests.
  6. 调用任意模型。 在现有 OpenAI 风格请求中使用本站模型 ID(见下表)。

Endpoints接入端点

AnAiApi speaks three API dialects — pick the one your stack already uses.

AnAiApi 支持三种 API 协议——选用你现有技术栈已有的即可。

Interface接口类型Base URLBase URLWorks with适用 SDK
OpenAI CompatibleOpenAI 兼容https://www.anaiapi.com/v1openai / langchain
Claude CompatibleClaude 兼容https://www.anaiapi.com/api/anthropic@anthropic-ai/sdk
Gemini CompatibleGemini 兼容https://www.anaiapi.com/api/gemini@google/generative-ai

Supported Models支持的模型

All models are billed in USD per 1 million tokens. Prices reflect current rates.

所有模型按每百万 token 以美元计费,下表为当前费率。

Provider厂商Model ID模型 IDInput $/1M输入 $/1MOutput $/1M输出 $/1M
DeepSeekdeepseek-v4-flash$0.28$0.56
deepseek-v4-pro$0.88$1.76
Zhipu GLMglm-4.5$1.08$3.94
glm-4.5-air$0.34$1.98
glm-4.6$1.08$3.94
glm-4.7$1.08$3.94
glm-5$1.80$5.76
glm-5-turbo$2.14$7.28
glm-5.1$2.52$7.81
glm-5.2$2.20$7.04
Kimikimi-k2.6$2.21$9.17
kimi-k2.7-code$2.21$9.17
kimi-k2.7-code-highspeed$4.41$9.17
kimi-k3$6.79$33.95
MiniMaxMiniMax-M3$1.24$4.96
MiniMax-M2.7$0.62$2.48
MiniMax-M2.7-highspeed$1.24$4.96
MiniMax-M2.5$0.62$2.48
MiniMax-M2.5-highspeed$1.24$4.96
MiniMax-M2.1$0.62$2.48
MiniMax-M2.1-highspeed$1.24$4.96
MiniMax-M2$0.62$2.48

⚡ Save 50–88% vs. mainstream providers. Output tokens are priced higher than input per each model's ratio.

⚡ 相比主流厂商可节省 50–88%。各模型输出 token 按各自倍率高于输入计费。

Price Comparison价格对比

Same capability tier, a fraction of the cost. Official prices as of July 2026 (USD / 1M tokens).

同档能力,价格仅零头。官方价截至 2026 年 7 月(美元 / 百万 token)。

Western model海外官方模型 In $/1M输入 $/1M Out $/1M输出 $/1M AnAiApi model本站模型 In $/1M输入 $/1M Out $/1M输出 $/1M Save节省
GPT-5.6 Terra (GPT-class)$2.50$15.00 deepseek-v4-pro$0.88$1.76 88%
GPT-5.3-Codex (Codex)$1.75$14.00 MiniMax-M3$1.24$4.96 65%
Claude Sonnet 4.5$3.00$15.00 glm-5.1$2.52$7.81 48%
Gemini 2.5 Pro$1.25$10.00 glm-5.2$2.20$7.04 30%

⚡ Up to 88% lower on output tokens vs. GPT-class; coding & multimodal tiers save 30–65%. All AnAiApi models are domestic (DeepSeek / Zhipu / Kimi / MiniMax) with OpenAI-compatible APIs.

⚡ 输出 token 最高比 GPT 档低 88%;编程与多模态档节省 30–65%。本站模型均为国内模型(DeepSeek / 智谱 / Kimi / MiniMax),提供 OpenAI 兼容接口。

Code Examples代码示例

Drop-in replacement — only the base URL changes.

即插即用——只需修改 base_url。

curl https://www.anaiapi.com/v1/chat/completions \
  -H "Authorization: Bearer $ANAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-flash",
    "messages": [{"role": "user", "content": "Hello from AnAiApi!"}],
    "stream": true
  }

Billing & Quota计费与配额

Accounts use a prepaid quota. 1 USD = 500,000 quota points. Each call consumes:

账户采用预付费配额制。1 美元 = 500,000 配额点。每次调用消耗:

quota = (input + output × completion_ratio) × model_ratio × group_ratio

Cost is deducted in real time and you only pay for what you use. Check your balance and usage on the dashboard.

按实际用量实时扣费,用多少付多少。可在控制台查看余额与用量明细。

Error Codes错误码

401
Invalid or missing API key. Create a new sk- key on the API Keys page.
密钥无效或缺失。请在「API 密钥」页面创建新的 sk- 密钥。
429
Rate limit reached. Lower request frequency or upgrade your group.
触发限流。请降低请求频率或升级分组。
500
Upstream model error. Retry the request.
上游模型错误。请重试请求。
503
Channel temporarily unavailable. Retry after a short backoff.
上游渠道暂不可用。请稍后重试。

FAQ常见问题

Which SDKs are supported?

Any OpenAI-compatible SDK (Python openai, Node.js, etc.) works by changing base_url. Anthropic and Google GenAI SDKs are supported via the dedicated endpoints above.

支持哪些 SDK?

任何兼容 OpenAI 的 SDK(Python openai、Node.js 等)只需修改 base_url 即可;Anthropic 与 Google GenAI SDK 可通过上方对应端点使用。

Does streaming work?

Yes — set stream: true for OpenAI-compatible SSE streaming.

支持流式输出吗?

支持——设置 stream: true 即可获得兼容 OpenAI 的 SSE 流式响应。

How do I top up?

Go to the Wallet page, choose an amount, and pay via the enabled payment methods. New-user credits may apply.

如何充值?

进入「钱包」页面选择金额,通过已启用的支付方式付款,新用户��能有赠送额度。

Why are prices lower than OpenAI / Claude / Gemini?

AnAiApi resells domestic-tier models (DeepSeek, Zhipu, Kimi, MiniMax) through a unified OpenAI-compatible gateway, passing the cost advantage directly to you.

为什么比 OpenAI / Claude / Gemini 便宜?

AnAiApi 通过统一的 OpenAI 兼容网关转售国内档位模型(DeepSeek、智谱、Kimi、MiniMax),把成本优势直接让利给你。

www.anaiapi.com →