One gateway forevery major AI model
One-stop access to the world's top AI models, with transparent pay-as-you-go pricing.
- Great pricing
- Reliable service
- Easy integration
Integrated model providers
From text reasoning to video generation, one platform to choose from
Pick a route by model capability, cost, stability and use case. Popular models are actively maintained; unstable channels are demoted automatically.
OpenAI
gpt-5.6-sol
$5 / 1M input tokens
OpenAI
gpt-6-astra
$10 / 1M input tokens
Anthropic
claude-opus-5
$5 / 1M input tokens
gemini-3.7-flash
$1.5 / 1M input tokens
xAI
grok-4.6
$2 / 1M input tokens
Moonshot AI
kimi-k3
$20 / 1M input tokens
Chinese models
deepseek-v4-flash / glm-5.3-flash
$0.5 / 1M input tokens
Video
minimax-h3
$0.117 / call
Image
gpt-image-2 / nano-banana-2
$0.12 / call
Let AI coding tools understand your API integration in one read
Standardized context for Claude Code, Codex, Cursor, ChatGPT, Windsurf and your own agents. Paste the prompt and models generate code against WanAPIs endpoints, model names and task APIs — also works with ccswitch / cc-switch one-click switching.
# WanAPIs API conventions Base URL: https://api.wanapis.com/v1 OpenAI-SDK compatible: - chat.completions.create - responses.create - embeddings.create Recommended models: - Code / Agent: gpt-5.6-sol, claude-opus-5 - Reasoning: deepseek-v4-pro, kimi-k3 - Fast & cheap: gemini-3.7-flash Rules: 1. Never hardcode the API key 2. Use the async task API for long-running jobs 3. Log the request id for troubleshooting
Migrate your app to WanAPIs in three steps
Keep the OpenAI SDK and request format you already use — hand model selection, routing and cost control to the gateway.
Create an API key
Sign up, open the console and generate a key. Set group, quota and allowed models per project.
Swap base_url
Keep your existing OpenAI SDK — just point baseURL to https://api.wanapis.com/v1.
Ship & observe
See tokens, cost, channel, latency and failure reasons in the logs, and tune routing anytime.
01import OpenAI from 'openai';0203const client = new OpenAI({04 apiKey: process.env.WANAPIS_API_KEY,05 baseURL: 'https://api.wanapis.com/v1',06});0708const response = await client.chat.completions.create({09 model: 'deepseek-v4-pro',10 messages: [{ role: 'user', content: 'Explain the core flow of RAG' }],11});Not just a relay — a production-grade AI API gateway
From local debugging to production monitoring, the trickiest parts of multi-model integration are consolidated into one console.
One endpoint for every model
A single endpoint covering text, reasoning, code, image, video and audio models — no more juggling multiple auth schemes and SDKs.
Production-grade failover
Multi-channel health checks, auto-demotion, group routing and retry policies keep upstream hiccups away from your business.
Transparent billing & quotas
Logged per model, group, input, output and cache hit — easy to reconcile, control cost and distribute quota.
Global low-latency routing
Cloudflare Tunnel plus backend routing reduce unreachable, timeout and cross-border failures.
OpenAI-compatible
Supports OpenAI Chat Completions, Responses and common clients — migrate existing projects by changing base_url.
Async task hosting
Long jobs like video, image and Midjourney are handled by the WanAPIs facade, avoiding the 100s edge timeout.
More than an endpoint — a full console
Try models, read your bill and claim credit in one place, without writing code first.
Playground: four studios
Separate workspaces for chat, image, video and audio. Tune parameters in the browser, then copy the code once you like the result.
Open the playgroundVolume discounts up to 5% off
1% off from ¥100 per order, rising through ¥200 / ¥500 / ¥1000, up to 5% off at ¥2000. Pay by Alipay or credit card (USD).
See top-up tiers5% referral rebate
Both sides get ¥3 once a friend signs up with your code and makes their first API call. For 30 days after they register, every top-up they make earns you another 5%, up to ¥50 per friend.
Get your referral linkDaily check-in credit
Claim a free credit grant every day you sign in. It lands straight in your balance and works with any model.
Claim todayFrequently asked questions
The most common questions before integrating. For detailed model params, task APIs and error codes, see the docs.
Is it compatible with the OpenAI SDK?
Yes — compatible with common OpenAI Chat Completions, Responses and Embeddings calls. Most projects only need to swap base_url and the API key.
Does the model list get updated?
Yes. We continuously add GPT, Claude, Gemini, DeepSeek, Kimi, Qwen, image and video models based on upstream stability, cost and demand.
How do you handle unstable upstreams?
WanAPIs can configure multiple channels for the same model and fail over via priority, groups and automatic retries.
Is billing transparent?
The console logs prompt tokens, completion tokens, cache hits, model ratio, group ratio and the final charge for every request.
Can I use it with Claude Code, Codex, Cursor or my own agent?
Yes. Any tool that supports an OpenAI-compatible endpoint works with WanAPIs: Claude Code, Codex, Cursor, Windsurf, Cline, and switchers like ccswitch / cc-switch can all point base_url to WanAPIs. We recommend separate quotas for long-context and reasoning models.
Are wanapi.ai and wanapis.com the same service?
Yes — one service, one operator, one account system. wanapi.ai is the international (English) site and wanapis.com is the Chinese site. The console and API for both live at api.wanapis.com, and the same API key and balance work everywhere.
Do you train models on my request data?
No. WanAPIs only relays traffic and does not retain your prompts or completions for training. For synchronous calls the request body is released from memory once forwarded; usage logs record metadata only (model, token counts, latency, cost), not conversation content. The exception is async image/video generation: because those jobs are tracked across polls, the request (including the prompt) is stored temporarily while running, cleared when the job finishes, and kept 7 days at most. Note that upstream providers are mostly located outside mainland China, so prompts are processed on overseas servers. See our Privacy Policy and Data & Security page for the full statement.
Which payment methods do you support? Can I get an invoice?
Alipay (CNY) and credit card (via Creem, billed in USD). Every top-up is listed in the billing page of your console. For invoices or bank transfers, email [email protected] with your requirements.
Are there rate limits? How is reliability handled?
We do not impose a fixed RPM / TPM cap on API calls; effective throughput is bounded by upstream channel capacity. For reliability, each model is backed by several channels from different upstreams, and a 503, timeout or unresponsive upstream triggers an automatic switch. Streaming requests additionally have a response-header timeout so a silent upstream cannot hang the request. Console logs show which channel served each request and whether a failover happened.
Is my API key safe? What if it leaks?
Any key can be reset or deleted from the console and stops working immediately. More usefully, you can shrink the blast radius up front: each key can carry its own quota cap, allowed-model list, IP allowlist and expiry. Create one key per project so a leak stays boxed in by that key’s quota and allowlists.
Start now — one API key for every major model
New projects use the WanAPIs endpoint directly; existing projects migrate gradually by swapping base_url.