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

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)
Shell

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"}]}'
Shell

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.

ModelAPI model idContextInputOutputCached input
Claude Haiku 5.5Anthropicanthropic/claude-haiku-5.51M$0.07$0.35Same as input
Claude Opus 5.5Anthropicanthropic/claude-opus-5.51M$2.80$14.00Same as input
Claude Sonnet 5.5Anthropicanthropic/claude-sonnet-5.51M$1.40$7.00$0.14
Claude Fable 5.1Anthropicanthropic/claude-fable-5.11M$7.00$35.00$0.175
GPT-6 AstraOpenAIopenai/gpt-6-astra1M$7.00$35.00$0.70
GPT-6.1 SolOpenAIopenai/gpt-6.1-sol1M$1.40$7.00$0.07
Claude Opus 5Anthropicanthropic/claude-opus-51M$3.50$17.50Same as input
Claude Fable 5Anthropicanthropic/claude-fable-51M$7.00$35.00Same as input
GPT-6 SolOpenAIopenai/gpt-6-sol1M$1.40$7.00$0.14
GPT-5.6 SolOpenAIopenai/gpt-5.6-sol1M$2.80$14.00$0.28
Grok 4.7xAIx-ai/grok-4.7500K$1.40$4.20$0.35
MiMo V2.6 ProXiaomixiaomi/mimo-v2.6-pro1M$0.348$0.696$0.00288
Qwen3.8 MaxQwenqwen/qwen3.8-max1M$1.40$4.20Same as input
GLM 5.3 DeriskedDe-riskedZ.AIzhipu/glm-5.3-derisked1M$3.00$5.00Same as input
GLM-5.3Z.AIzhipu/glm-5.31M$0.98$3.08$0.182
Grok 4.6xAIx-ai/grok-4.6500K$1.40$4.20$0.35
Kimi K3Moonshot AImoonshotai/kimi-k31M$2.10$10.50$0.21
GPT-5.6 TerraOpenAIopenai/gpt-5.6-terra1M$1.40$8.40$0.14
Claude Opus 4.8Anthropicanthropic/claude-opus-4.81M$3.50$17.50Same as input
GLM 5.3 FlashZ.AIzhipu/glm-5.3-flash1M$0.105$0.35$0.021
Gemini 3.8 FlashGooglegoogle/gemini-3.8-flash1M$0.525$2.625$0.0525
Claude Opus 4.7Anthropicanthropic/claude-opus-4.71M$3.50$17.50Same as input
DeepSeek V4.1 FlashDeepSeekdeepseek/deepseek-v4.1-flash1M$0.105$0.42$0.0021
Grok 4.5xAIx-ai/grok-4.5500K$1.40$4.20$0.21
GPT-5.5OpenAIopenai/gpt-5.51M$3.50$21.00$0.35
Claude Sonnet 5Anthropicanthropic/claude-sonnet-51M$1.40$7.00Same as input
GPT-6 LunaOpenAIopenai/gpt-6-luna1M$0.07$0.35$0.007
MiMo V2.6 FlashXiaomixiaomi/mimo-v2.6-flash1M$0.112$0.224$0.00224
GPT-5.6 LunaOpenAIopenai/gpt-5.6-luna1M$0.14$0.84$0.014
Claude Opus 4.6Anthropicanthropic/claude-opus-4.61M$3.50$17.50Same as input
Gemini 3.1 ProGooglegoogle/gemini-3.1-pro1M$1.40$8.40$0.14
MiniMax M3MiniMaxminimax/minimax-m31M$0.21$0.84$0.042
Kimi K2.7 CodeMoonshot AImoonshotai/kimi-k2.7-code262K$0.665$2.80$0.133
MiMo V2.5Xiaomixiaomi/mimo-v2.51M$0.098$0.196$0.00196
Hy4 PreviewTencenttencent/hy4-preview1M$0.5838$1.7507$0.0294
Kimi K2.8 PreviewMoonshot AImoonshotai/kimi-k2.8-preview1M$0.665$2.80$0.133
Qwen3.8 FlashQwenqwen/qwen3.8-flash1M$0.105$0.329Same as input

Image and video models

Compare modelsAll API pricesMedia API reference

What you get

What the API does not do

The supported API in full

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.

We use cookies for analytics and to measure how well our campaigns are working. None of it is needed to run the site, and your conversations are never included. See our Privacy Policy.