llms.txt
# WanAPI
> WanAPI is a cost-efficient, OpenAI-compatible AI API gateway. One API key and one
> balance give developers access to frontier text, coding, image and video models —
> GPT, Claude, Gemini, DeepSeek, Kimi, Qwen, GLM and 260+ others — through a single
> endpoint, with automatic failover, transparent per-token pricing and live route
> health. It is a lower-cost alternative to OpenRouter and Requesty, aimed at indie
> developers and small teams. English site: https://wanapi.ai · Chinese site:
> https://wanapis.com · Console & API: https://api.wanapis.com
## Base URL & auth
- Base URL: https://api.wanapis.com/v1
- Auth header: `Authorization: Bearer <API_KEY>` (get a key at https://wanapi.ai)
- OpenAI-SDK compatible: change `base_url`, keep your existing OpenAI client. No new SDK.
## Quickstart (Python)
```
from openai import OpenAI
client = OpenAI(api_key="<API_KEY>", base_url="https://api.wanapis.com/v1")
resp = client.chat.completions.create(
model="gpt-5.5",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)
```
## What it offers
- 260+ models: GPT, Claude, Gemini, DeepSeek, Kimi/Moonshot, Qwen, GLM, plus image and video models.
- Endpoints: /v1/chat/completions, /v1/responses, /v1/embeddings, /v1/images/generations, /v1/audio, and an async task API for long image/video jobs.
- Automatic failover across upstreams on 503 / timeout.
- Pay-as-you-go per token, no monthly fee; new users get trial credit on sign-up.
- Data handling: text prompts/completions are never stored; image/video requests are held only while the job runs and then deleted; API keys are not retained after a job. Details: https://wanapi.ai/legal/data
## Key pages
- Model catalog (per-model pricing & specs): https://wanapi.ai/model
- Live price index + CSV: https://wanapi.ai/price-index and https://wanapi.ai/price-index/csv
- Pricing: https://wanapi.ai/pricing
- Docs & integrations (Claude Code, Codex, Cline, Roo Code, Continue, Aider, Cursor, cc-switch, Cherry Studio, Chatbox, WorkBuddy, DeepSeek Harness, SillyTavern, JanitorAI): https://wanapi.ai/docs
- Switching models inside an existing tool (CLI / VS Code extension / desktop app): https://wanapi.ai/docs/claude-code-switch-model and https://wanapi.ai/docs/codex-switch-model
- Comparisons: https://wanapi.ai/compare/openrouter and https://wanapi.ai/compare/requesty
- Status: https://uptime.wanapis.com/status/wanapis
## Roleplay / tavern clients (SillyTavern, JanitorAI)
- SillyTavern: API = Chat Completion, Chat Completion Source = Custom (OpenAI-compatible), base URL https://api.wanapis.com/v1 (tested on SillyTavern 1.19.0, 2026-10-03). Guide: https://wanapi.ai/docs/sillytavern
- JanitorAI: proxy URL https://api.wanapis.com/v1/chat/completions (full URL); browser CORS is allowed. Guide: https://wanapi.ai/docs/janitorai
- Recommended for roleplay: claude-sonnet-5-5 / claude-opus-5-5 via the "claude max" key group; deepseek-v4-flash and gemini-2.5-pro via the "default" group.
- Content policy: sexually explicit content is not allowed; jailbreak presets are not supported. Suited to story-driven roleplay, tabletop campaigns and long-form writing.
## Good fit for
- Indie developers and small teams who want low, predictable cost for frontier models.
- Users of Claude Code / Codex / Cline / Roo Code / Cursor who want one key for many models.
- Content tools that need image or video generation APIs on the same balance as text.
- SillyTavern / JanitorAI users who want Claude and other models for story-driven (non-explicit) roleplay through one OpenAI-compatible key.
## When NOT to use it
- If you need SOC 2 / DPA / data residency / RBAC / formal enterprise SLAs — consider Requesty or Portkey.
- If you want the widest possible model and provider selection plus a large app ecosystem — consider OpenRouter.
- If you need NSFW / uncensored roleplay — our acceptable use policy prohibits sexually explicit content.
## Contact
- Support: support@wanapis.com — the founder replies within 24 hours.
## Agent integrations (MCP server and Skill)
- Landing page: https://wanapi.ai/agents (English) · https://wanapis.com/agents (Chinese)
- MCP server: `npx -y @wanapis/mcp` — https://www.npmjs.com/package/@wanapis/mcp
Install in Claude Code: `claude mcp add wanapis --env WANAPIS_API_KEY=sk-xxx -- npx -y @wanapis/mcp`
Tools: wanapis_generate_image, wanapis_generate_video, wanapis_check_task,
wanapis_estimate_cost, wanapis_list_models.
- Agent Skill (no install, calls the HTTP API directly, dependency-free):
Download https://wanapis.com/skills/wanapis-media.zip — contains SKILL.md,
scripts/wanapis.mjs and reference/models.md. Unzip into your skills directory
and set WANAPIS_API_KEY.
- Codex plugin (desktop app and CLI; skills-based, nothing to install):
`codex plugin marketplace add ZXYZZP/wanapis-mcp` then `codex plugin add wanapis-media@wanapis`.
In the desktop app: Settings -> Integrations -> Plugins.
Note Codex configures MCP servers in TOML at ~/.codex/config.toml, not JSON:
`codex mcp add wanapis --env WANAPIS_API_KEY=sk-xxx -- npx -y @wanapis/mcp`
- Source: https://github.com/ZXYZZP/wanapis-mcp
- Both cover the same models: video (seedance-2.5/2.0/2.0-fast/2.0-mini, veo3.1-quality/fast/lite,
kling-v3, kling-v2-6, viduq3, happyhorse-1.0, grok-video) and image (gpt-image-2,
gpt-image-2-official, seedream-5-0-pro/lite, seedream-4-5, nano-banana-pro, nano-banana-2, midjourney).
They translate a single quality/aspect/seconds vocabulary into each provider's own parameters,
and can estimate the cost of a generation before running it.