Skip to content

Documentation

unoblox for developers

unoblox is an India-first AI gateway: one OpenAI-compatible API for models and providers currently published in the live catalog, billed in ₹ from a single prepaid balance. If you can call OpenAI, you can call unoblox — change two lines.

Explore the docs

Your first request

The gateway speaks the OpenAI Chat Completions API. Set the base URL to https://api.unoblox.ai/v1, use a unoblox key (ub-gw-…) from the developer portal, and pass a model slug. The Quickstart walks through it end to end.

curl
: "${UNOBLOX_MODEL:?Set this to an id returned by GET /v1/models}"
curl https://api.unoblox.ai/v1/chat/completions \
  -H "Authorization: Bearer $UNOBLOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$(jq -nc --arg model "$UNOBLOX_MODEL" \
    '{model:$model,messages:[{role:"user",content:"Namaste, unoblox!"}]}')"
node.js
import OpenAI from "openai";

// unoblox is OpenAI-compatible — point any OpenAI SDK at our gateway.
const client = new OpenAI({
  baseURL: "https://api.unoblox.ai/v1",
  apiKey: process.env.UNOBLOX_API_KEY, // ub-gw-...
});

const model = process.env.UNOBLOX_MODEL;
if (!model) throw new Error("Select an id returned by client.models.list()");
const res = await client.chat.completions.create({
  model,
  messages: [{ role: "user", content: "Explain UPI in one line." }],
});

console.log(res.choices[0].message.content);
python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.unoblox.ai/v1",
    api_key=os.environ["UNOBLOX_API_KEY"],  # ub-gw-...
)

model = os.environ.get("UNOBLOX_MODEL")
if not model:
    raise RuntimeError("Select an id returned by client.models.list()")
res = client.chat.completions.create(
    model=model,
    messages=[{"role": "user", "content": "Hello from Bengaluru"}],
)
print(res.choices[0].message.content)

Model routing

A model slug is author/model (e.g. <author>/<model>). When several providers serve the same model, the router load-balances across their endpoints by price, health and latency, and fails over automatically. Or send unoblox/auto and let the router choose. Browse everything in the model catalog and read Routing.

Metadata-only by default.

Usage rollups record token counts and cost — never prompt or completion content. For strict zero-data-retention routing, set provider.zdr: true (see Routing).