One API for every model in India.
The chat completions format you already know. Set the base URL and your key, pick a model, and you are live.
curl https://api.dwaargateway.in/v1/chat/completions \ -H "Authorization: Bearer $DWAAR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "sarvam/sarvam-105b", "messages": [{"role": "user", "content": "Namaste"}]}'
Live in three steps.
- 1Get a keyWe set up your account and send your API key.
- 2Set the base URL
https://api.dwaargateway.in/v1 - 3Send a requestPick a model id and call chat completions.
curl https://api.dwaargateway.in/v1/chat/completions \ -H "Authorization: Bearer $DWAAR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "sarvam/sarvam-105b", "messages": [{"role": "user", "content": "Namaste"}]}'Python
import os, requests r = requests.post( "https://api.dwaargateway.in/v1/chat/completions", headers={"Authorization": f"Bearer {os.environ['DWAAR_API_KEY']}"}, json={"model": "sarvam/sarvam-105b", "messages": [{"role": "user", "content": "Namaste"}]}, ) print(r.json()["choices"][0]["message"]["content"])JavaScript
const r = await fetch("https://api.dwaargateway.in/v1/chat/completions", { method: "POST", headers: { Authorization: `Bearer ${process.env.DWAAR_API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ model: "sarvam/sarvam-105b", messages: [{ role: "user", content: "Namaste" }] }), }); console.log((await r.json()).choices[0].message.content);
HTTP/1.1 200 OK x-dwaar-receipt-id: <uuid> x-served-by: mumbai x-request-id: <uuid> { "id": "chatcmpl-<id>", "object": "chat.completion", "created": "<unix time>", "model": "demo/echo", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "echo: Namaste" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 1, "completion_tokens": 2, "total_tokens": 3 } }
Gateway test against a mock provider · dwaar-gateway 0.1.0 · commit 722ea112967d
Every response carries a request id and a record id, so you can trace any request later.
Works with the SDKs and coding tools you already use.
Any SDK or coding tool that lets you set a base URL for the chat completions format works with dwaar. Two settings and you are done.
base URL https://api.dwaargateway.in/v1 API key $DWAAR_API_KEY
Everything you need to build.
Streaming
Tokens arrive as they are generated, over server-sent events.
Tool calling
Let models call your functions and APIs to finish a task.
JSON output
Ask for structured output your code can parse directly.
Embeddings
Turn text into vectors for search and retrieval.
Speech
Speech to text and text to speech in Indian languages.
Indian languages
Models built for English and 22 Indian languages.
Pick a model by its id.
Ids look like creator/model. A few to start with:
| Model id | Good for |
|---|---|
| Indian languages, chat | |
| Reasoning, coding, agents | |
| Coding and long-running agents | |
| Fast, high-volume work | |
| Translation | |
| Embeddings |
Errors that tell you what to do.
Every error names the field, says what went wrong and suggests a fix, in the error format your SDK already understands.
HTTP/1.1 404 Not Found x-request-id: <uuid> { "error": { "message": "The model 'demo/ecko' does not exist. Did you mean: demo/echo? See GET /v1/models.", "type": "invalid_request_error", "param": null, "code": "model_not_found" } }
Gateway test against a mock provider · dwaar-gateway 0.1.0 · commit 722ea112967d
The endpoints.
All under https://api.dwaargateway.in/v1, with your key as a bearer token.
| Method | Path | What it does |
|---|---|---|
| POST | /v1/chat/completions | Chat completions, streamed or not, with tools and JSON output |
| GET | /v1/models | The models your key can use, with where each one runs |
| GET | /v1/receipts/{id} | The signed record of one of your requests |
| GET | /v1/receipts/keys | The public keys that verify records |
Go further.
Start building with sovereign AI.
Open models, hosted in India, behind one API key.