Vani AI API
The Vani AI API: one key for Claude, GPT, Gemini, Grok, GLM and more.
Prepaid credit, no subscription. 37 language models from 11 labs, plus 12 image and video models, through OpenAI- and Anthropic-compatible endpoints. Keep your SDK, change the base URL to https://api.vani.ai/v1 and pick a model.
- Base URL
- https://api.vani.ai/v1
- Endpoints
- /chat/completions · /responses · /messages
- Images and video
- /images/generations · /images/edits · /videos
- Billing
- Prepaid, per request; eligible models 30% below official rates
Quickstart
Set VANI_API_KEY to a vani_ key, then send a request in the format your code already uses. Model ids come from GET https://api.vani.ai/v1/models.
Python · OpenAI SDK · Chat Completions
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.vani.ai/v1",
api_key=os.environ["VANI_API_KEY"], # a vani_ key
)
reply = client.chat.completions.create(
model="anthropic/claude-sonnet-5.5",
messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)curl · Chat Completions
curl https://api.vani.ai/v1/chat/completions \
-H "Authorization: Bearer $VANI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"anthropic/claude-sonnet-5.5","messages":[{"role":"user","content":"Hello"}]}'Anthropic format · Messages
curl https://api.vani.ai/v1/messages \
-H "x-api-key: $VANI_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{"model":"openai/gpt-6.1-sol","max_tokens":256,"thinking":{"type":"disabled"},"messages":[{"role":"user","content":"Hello"}]}'OpenAI-compatible API
Chat Completions and stateless Responses take OpenAI's request and answer formats, so the official OpenAI SDKs connect by changing the base URL, and tools such as Codex, OpenCode, Cursor and Cline have setup guides. One key reaches every model, not only OpenAI's: send anthropic/claude-haiku-5.5 or x-ai/grok-4.7 the same way.
OpenAI-compatible API: what works and what does notOpenAI and Anthropic SDK guide
Anthropic-compatible API
The Messages endpoint takes Anthropic's format, so the Anthropic SDKs and Claude Code work with https://api.vani.ai as the base URL (without /v1) and a Vani key, with tool use, streaming and MCP servers. Any model in the catalogue can answer there, not only Claude.
Anthropic-compatible API: what works and what does notClaude Code and other client guides
Models on the API
Prepaid prices per 1M tokens, from the live catalogue. Each model has its own page with what it is best for.
| Model | API model id | Context | Input | Output | Cached input |
|---|---|---|---|---|---|
| Claude Haiku 5.5Anthropic | anthropic/claude-haiku-5.5 | 1M | $0.07 | $0.35 | Same as input |
| Claude Opus 5.5Anthropic | anthropic/claude-opus-5.5 | 1M | $2.80 | $14.00 | Same as input |
| Claude Sonnet 5.5Anthropic | anthropic/claude-sonnet-5.5 | 1M | $1.40 | $7.00 | $0.14 |
| Claude Fable 5.1Anthropic | anthropic/claude-fable-5.1 | 1M | $7.00 | $35.00 | $0.175 |
| GPT-6 AstraOpenAI | openai/gpt-6-astra | 1M | $7.00 | $35.00 | $0.70 |
| GPT-6.1 SolOpenAI | openai/gpt-6.1-sol | 1M | $1.40 | $7.00 | $0.07 |
| Claude Opus 5Anthropic | anthropic/claude-opus-5 | 1M | $3.50 | $17.50 | Same as input |
| Claude Fable 5Anthropic | anthropic/claude-fable-5 | 1M | $7.00 | $35.00 | Same as input |
| GPT-6 SolOpenAI | openai/gpt-6-sol | 1M | $1.40 | $7.00 | $0.14 |
| GPT-5.6 SolOpenAI | openai/gpt-5.6-sol | 1M | $2.80 | $14.00 | $0.28 |
| Grok 4.7xAI | x-ai/grok-4.7 | 500K | $1.40 | $4.20 | $0.35 |
| MiMo V2.6 ProXiaomi | xiaomi/mimo-v2.6-pro | 1M | $0.348 | $0.696 | $0.00288 |
| Qwen3.8 MaxQwen | qwen/qwen3.8-max | 1M | $1.40 | $4.20 | Same as input |
| GLM 5.3 DeriskedDe-riskedZ.AI | zhipu/glm-5.3-derisked | 1M | $3.00 | $5.00 | Same as input |
| GLM-5.3Z.AI | zhipu/glm-5.3 | 1M | $0.98 | $3.08 | $0.182 |
| Grok 4.6xAI | x-ai/grok-4.6 | 500K | $1.40 | $4.20 | $0.35 |
| Kimi K3Moonshot AI | moonshotai/kimi-k3 | 1M | $2.10 | $10.50 | $0.21 |
| GPT-5.6 TerraOpenAI | openai/gpt-5.6-terra | 1M | $1.40 | $8.40 | $0.14 |
| Claude Opus 4.8Anthropic | anthropic/claude-opus-4.8 | 1M | $3.50 | $17.50 | Same as input |
| GLM 5.3 FlashZ.AI | zhipu/glm-5.3-flash | 1M | $0.105 | $0.35 | $0.021 |
| Gemini 3.8 FlashGoogle | google/gemini-3.8-flash | 1M | $0.525 | $2.625 | $0.0525 |
| Claude Opus 4.7Anthropic | anthropic/claude-opus-4.7 | 1M | $3.50 | $17.50 | Same as input |
| DeepSeek V4.1 FlashDeepSeek | deepseek/deepseek-v4.1-flash | 1M | $0.105 | $0.42 | $0.0021 |
| Grok 4.5xAI | x-ai/grok-4.5 | 500K | $1.40 | $4.20 | $0.21 |
| GPT-5.5OpenAI | openai/gpt-5.5 | 1M | $3.50 | $21.00 | $0.35 |
| Claude Sonnet 5Anthropic | anthropic/claude-sonnet-5 | 1M | $1.40 | $7.00 | Same as input |
| GPT-6 LunaOpenAI | openai/gpt-6-luna | 1M | $0.07 | $0.35 | $0.007 |
| MiMo V2.6 FlashXiaomi | xiaomi/mimo-v2.6-flash | 1M | $0.112 | $0.224 | $0.00224 |
| GPT-5.6 LunaOpenAI | openai/gpt-5.6-luna | 1M | $0.14 | $0.84 | $0.014 |
| Claude Opus 4.6Anthropic | anthropic/claude-opus-4.6 | 1M | $3.50 | $17.50 | Same as input |
| Gemini 3.1 ProGoogle | google/gemini-3.1-pro | 1M | $1.40 | $8.40 | $0.14 |
| MiniMax M3MiniMax | minimax/minimax-m3 | 1M | $0.21 | $0.84 | $0.042 |
| Kimi K2.7 CodeMoonshot AI | moonshotai/kimi-k2.7-code | 262K | $0.665 | $2.80 | $0.133 |
| MiMo V2.5Xiaomi | xiaomi/mimo-v2.5 | 1M | $0.098 | $0.196 | $0.00196 |
| Hy4 PreviewTencent | tencent/hy4-preview | 1M | $0.5838 | $1.7507 | $0.0294 |
| Kimi K2.8 PreviewMoonshot AI | moonshotai/kimi-k2.8-preview | 1M | $0.665 | $2.80 | $0.133 |
| Qwen3.8 FlashQwen | qwen/qwen3.8-flash | 1M | $0.105 | $0.329 | Same as input |
Image and video models
- GPT Image 2OpenAI · image · $0.05 per image
- GPT Image 2.5OpenAI · image · $0.025 per image
- GPT Image 2.5 FlareOpenAI · image · $0.05 per image
- GPT Image 2.5 SunburstOpenAI · image · $0.05 per image
- Grok Imagine ImagexAI · image · $0.05 per image
- Grok Imagine Image 2xAI · image · $0.028 per image
- Seedream 4.0ByteDance · image · $0.025 per image
- Grok Imagine VideoxAI · video · $0.169 per 6-second clip
- Grok Imagine Video 1.5xAI · video · $0.056 per second of video
- Seedance 2.0 Fast VIPByteDance · video · $0.135 per second of video
- Seedance 2.0 MiniByteDance · video · $0.09 per second of video
- Seedance 2.0 VIPByteDance · video · from $0.169 per second of video
What you get
OpenAI- and Anthropic-compatible
Keep your SDK and change the base URL: Chat Completions, Responses and Messages.
Prepaid, pay as you go
Add credit and pay per request. Eligible models cost 30% below their verified official rates.
Images and video on the API
Generate and edit images and make video clips with the same key.
Prompt caching
On models with a cached-input price, prompt tokens served from cache are billed at that lower rate.
MCP tools on the API
Give any model remote MCP tools through the Responses and Messages APIs.
A console with the detail
Usage analytics, the cost of every request, request logs, and your limits and tier.
Limits that grow with you
Rate-limit tiers follow your lifetime deposits; each tier raises your limits.
On a paid Vani Chat plan?
Create API keys billed to your plan in Developer settings (Plus and higher plans).
What the API does not do
- No image, audio or file input on the chat endpoints: they take text.
- No embeddings, and no hosted web search, file search or computer tools.
- Responses keeps no state: send the whole conversation each time (store: false).
- One completion per request (n is 1).
Questions
- What is the Vani AI API?
- One API key for 37 AI models from 11 labs, including Claude, GPT, Gemini, Grok, GLM and more. It takes the OpenAI (Chat Completions and Responses) and Anthropic (Messages) request formats, so existing SDKs and tools work by changing the base URL. Vani gives access to models from many AI labs; it does not make its own.
- Is the Vani API OpenAI-compatible?
- Yes, for Chat Completions and stateless Responses: point an OpenAI SDK at https://api.vani.ai/v1 with a Vani key and send any model id that GET /v1/models lists. The chat endpoints take text (no image, audio or file input), and Responses keeps no state between calls.
- Can I use the Anthropic SDK or Claude Code?
- Yes. Set the base URL to https://api.vani.ai (without /v1) and use a Vani key: the Messages endpoint serves every model in the catalogue, not only Claude. The Claude Code guide in the docs lists the tested settings.
- How much does the Vani API cost?
- It is prepaid and pay as you go: add credit and pay per request at each model's published price per 1M tokens, or per image or clip. Eligible models cost 30% below their verified official rates. There is no subscription; Vani Chat subscribers on Plus and higher plans can also create keys billed to their plan.
- Can I generate images and video with the API?
- Yes, with the same prepaid key: POST /v1/images/generations and /v1/images/edits for images, and /v1/videos for video clips, billed per image or clip (12 image and video models).
- How do I get an API key?
- Create an account on the Vani API Platform, verify your email, add prepaid credit and create a key. Vani keys start with vani_.
Build with the Vani AI API.
Add credit, create a key and send your first request in minutes.