LIVE
One gateway · every major model · UPI billing

One API key for every AI model.
Pay with UPI.

Yantra is an OpenAI-compatible gateway. Point your code at one endpoint, use a single key, and our routing engine sends each request to the best provider — OpenAI, Anthropic, Gemini, DeepSeek, Mistral or a local model — with automatic failover. Billed per token in rupees.

$ curl https://your-gateway/v1/chat/completions -H "Authorization: Bearer yk_live_…"
Intelligent Request Routing LIVE
Developer App API Gateway Auth · KeysBilling Routing Engine Response Formatter User OpenAI Anthropic Google Gemini DeepSeek Mistral Local Models
Idle — send a request in the playground to watch a live route.
16
Models, one key
6
Providers routed
99.9%
Failover uptime target
₹10
Minimum top-up (UPI)
How it works
Three steps from zero to your first completion.
01
Generate an API key
Create a key in seconds. One yk_live_… key works for every model on the platform — no per-model credentials.
02
Add credits with UPI
Top up in rupees by scanning a UPI QR or opening any UPI app. Balance is metered per token — pay only for what you use.
03
Call one endpoint
Point the OpenAI SDK at the gateway. Pick a model or say auto and the routing engine chooses the best one, with failover.
Why Yantra
A single, billed, OpenAI-compatible front door to the whole model ecosystem.
One key, every model
Stop juggling a dozen provider dashboards and secrets. Generate one key and reach GPT, Claude, Gemini, DeepSeek, Mistral and local models alike.
Intelligent routing + failover
Ask for a capability — auto:cheap, auto:reasoning, auto:fast — and the engine routes to the right model, retrying on a sibling if a provider errors.
OpenAI-compatible
Drop-in /v1/chat/completions, streaming included. Change two lines — base URL and key — and your existing code just works.
Rupee billing over UPI
No cards, no forex. Recharge with UPI and get transparent per-token pricing in INR, metered to the paisa.
Cost-saving auto mode
Let Yantra pick the cheapest model that satisfies the request, so routine calls cost a fraction of always-on flagship pricing.
Local & private models
Route sensitive workloads to self-hosted Llama or Qwen on your own hardware — same key, same API, zero per-token cost.
Models
Every model below is reachable with your single Yantra key. Pricing is per 1M tokens in INR.
One key, all of them.  Switch models by changing a string — never a credential.
Playground
Send real requests through the gateway and watch the route light up.
Pick a model (or auto) and send a message. In demo mode replies are simulated, but routing, token counts and ₹ cost are computed live.
This request ROUTE
Developer App API Gateway Auth · KeysBilling Routing Engine Response Formatter User OpenAI Anthropic Google Gemini DeepSeek Mistral Local Models
No request yet.
Session
Requests0
Tokens in0
Tokens out0
Spent₹0.0000
Fallbacks0
Docs
Yantra speaks the OpenAI API. If your code talks to OpenAI today, it talks to Yantra with two edits.
1 · Base URL & key

Set your gateway base URL and your yk_live_… key. Everything else is standard OpenAI.

Base URLhttps://your-gateway:3002/v1
Auth headerAuthorization: Bearer yk_live_…
2 · Python (OpenAI SDK)
from openai import OpenAI

client = OpenAI(
    base_url="https://your-gateway:3002/v1",
    api_key="yk_live_xxxxxxxxxxxx",   # your single Yantra key
)

resp = client.chat.completions.create(
    model="auto:cheap",              # or "openai/gpt-4o", "anthropic/claude-sonnet-4-6", …
    messages=[{"role": "user", "content": "Hello from Yantra!"}],
)
print(resp.choices[0].message.content)
print(resp.yantra)                   # which model/provider we routed to + ₹ cost
3 · cURL
curl https://your-gateway:3002/v1/chat/completions \
  -H "Authorization: Bearer yk_live_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto:reasoning",
    "messages": [{"role":"user","content":"Prove sqrt(2) is irrational."}]
  }'
Routing modes
openai/gpt-4oExplicit — route to exactly this model
autoBalanced default pick
auto:cheapCheapest capable model
auto:fastLowest-latency model
auto:reasoningStrong step-by-step reasoning
auto:long-contextLargest context window

If the chosen provider returns a retryable error (429/5xx/timeout), Yantra automatically fails over to a sibling model of the same class and tells you via x-yantra-fell-back.

Response headers
x-yantra-routed-toFinal model id
x-yantra-providerProvider that served it
x-yantra-cost-paiseCharge for this request (paise)
x-yantra-balance-paiseRemaining balance (paise)
x-yantra-fell-backtrue if failover occurred
Error codes
401Missing or invalid API key
402Insufficient credit — top up over UPI
404Unknown model id
429Rate limited (provider) — auto-retried
502All providers in the class failed