AI API: one key for GPT, Claude, Gemini and more
What an AI API is
An AI API is a web address your code sends a request to: a question, a document, an image or a recording. The model behind it answers with text, a picture, speech, or embeddings for search. Your app never runs the model; it pays for each request instead.
Rapid Router serves every kind through one key: chat at /chat/completions and /responses, the Anthropic-style /messages, plus embeddings, rerank, image generation, speech and transcription. The docs cover each one.
How AI API pricing works
Language models are priced per million tokens, with one rate for input and a higher rate for output. A token is about three quarters of an English word, and Indian scripts take more tokens per word; the token study measures by how much. Image, speech and video models are priced per image, per character or per second instead.
The strongest models right now
| Model | Input / 1M | Output / 1M | Context |
|---|---|---|---|
| Claude Opus 5.5 anthropic/claude-opus-5-5 | ₹386 | ₹1,928 | 1M |
| GPT-5.5 openai/gpt-5.5 | ₹482 | ₹2,892 | 1.05M |
| Gemini 4 Carbon google/gemini-4-carbon | ₹193 | ₹964 | 1.05M |
| DeepSeek V4 Pro deepseek/deepseek-v4-pro | ₹125 | ₹251 | 1.05M |
| Llama 4 Scout 17B 16E Instruct meta-llama/llama-4-scout-17b-16e-instruct | ₹9.64 | ₹28.92 | 328K |
| Qwen3.8 Max qwen/qwen3.8-max | ₹159 | ₹477 | 1M |
The flagship of each major lab by independent votes. Rankings per task, such as coding or writing, are on the best model pages, and any two can be compared head to head on the comparisons page.
The cheapest AI APIs right now
| Model | Input / 1M | Output / 1M | Context |
|---|---|---|---|
| Llama 3.1 8B Instruct:deepinfra hf/meta-llama/llama-3.1-8b-instruct:deepinfra | ₹1.93 | ₹3.86 | 128K |
| Llama-3.1-8B-Instruct meta-llama/meta-llama-3.1-8b-instruct | ₹1.93 | ₹3.86 | 128K |
| Meta Llama 3.1 8B Instruct Turbo meta-llama/meta-llama-3.1-8b-instruct-turbo | ₹1.93 | ₹3.86 | 128K |
| Llama 3.1 8B Instruct:novita hf/meta-llama/llama-3.1-8b-instruct:novita | ₹1.93 | ₹4.82 | 128K |
| Llama-3.1-8B-Instruct novita/meta-llama/llama-3.1-8b-instruct | ₹1.93 | ₹4.82 | 128K |
| Mistral Nemo Instruct 2407 mistralai/mistral-nemo-instruct-2407 | ₹2.80 | ₹2.89 | 131K |
Sorted by the price of a typical request, three parts input to one part output. The price index tracks cheapest and median prices by category every month.
How to choose an AI API
- Quality on your task. Try three models on twenty of your own examples before you decide.
- Price per request. Output usually costs more than input, so long answers cost more than long prompts.
- Context window. How much text the model can read in one request.
- Reliability. A gateway that fails over to another provider keeps working when one goes down.
- Billing. Paying several providers in dollars means several accounts and invoices; one rupee balance with a GST invoice is simpler from India.
One API for every model
Rapid Router is OpenAI-compatible: point the OpenAI SDK at https://rapidrouter.ai/api/v1, use a Rapid Router key, and change models by changing one string. Each request goes to the cheapest healthy provider for that model and fails over on its own. Read more on the LLM router and AI gateway pages.
from openai import OpenAI
client = OpenAI(
base_url="https://rapidrouter.ai/api/v1",
api_key="YOUR_RAPID_ROUTER_KEY",
)
reply = client.chat.completions.create(
model="anthropic/claude-opus-5-5",
messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)Create a free account, make a key, and try the free models straight away. Top up in rupees when you are ready, and switch models by changing one string. Setup for Cursor, Cline, LangChain, n8n and more is on the integrations page.