Developers

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.

YOUR FIRST REQUESTcurl
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"}]}'
01Quickstart

Live in three steps.

  1. 1Get a keyWe set up your account and send your API key.
  2. 2Set the base URLhttps://api.dwaargateway.in/v1
  3. 3Send a requestPick a model id and call chat completions.
curl
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);
WHAT COMES BACK200
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.

02Your tools

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.

CONFIGURE ANY CLIENT2 settings
base URL  https://api.dwaargateway.in/v1
API key   $DWAAR_API_KEY
03Capabilities

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.

04Model ids

Pick a model by its id.

Ids look like creator/model. A few to start with:

Model idGood for
Indian languages, chat
Reasoning, coding, agents
Coding and long-running agents
Fast, high-volume work
Translation
Embeddings

See all models

05Errors

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.

All error codes

A HELPFUL 404model_not_found
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

06API reference

The endpoints.

All under https://api.dwaargateway.in/v1, with your key as a bearer token.

MethodPathWhat it does
POST/v1/chat/completionsChat completions, streamed or not, with tools and JSON output
GET/v1/modelsThe 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/keysThe public keys that verify records
07Resources

Go further.

Start building with sovereign AI.

Open models, hosted in India, behind one API key.