Documentation

Vyom is an OpenAI-compatible orchestrator that routes each request to the cheapest capable model. Everything below runs against your orchestrator at https://orchestrator-production-1bde.up.railway.app.

Quickstart

Point any OpenAI SDK at Vyom — the model is chosen for you.

curl https://orchestrator-production-1bde.up.railway.app/v1/chat/completions \
  -H "authorization: Bearer $VYOM_TOKEN" \
  -H "content-type: application/json" \
  -d '{"messages":[{"role":"user","content":"Explain B-trees briefly."}]}'

The response carries a vyom block (tier, model, cost, citations) and headers x-vyom-tier / x-vyom-model / x-vyom-cost-usd.

API

OpenAI-compatible endpoints plus Vyom extensions:

  • POST /v1/chat/completions — streaming + non-streaming. Extra body: sovereignty, tier (force), no_compression, attachments.
  • GET /v1/models · GET /v1/usage · POST /v1/estimate
  • POST /v1/keys — mint a CLI/harness key (signed-in web users)
  • POST /v1/audio/transcribe · /v1/audio/speak — voice (scaffold)

CLI

npm run cli
# or global:
npm i -g ./packages/cli && vyom

Set VYOM_API_BASE_URL and VYOM_TOKEN. In-chat: /sovereign, /usage, /models, /exit. Each reply shows the tier + model that answered.

Coding agent (VYOM CODE)

A fork of OpenCode, rebranded, routing every model call through the orchestrator so it shares your login, ledger, and verification gate.

cd apps/harness/upstream
bun install
export VYOM_TOKEN=<your key>
cp ../opencode.json ./opencode.json
bun run dev

The agent is pinned to vyom/vyom-auto, so it never calls a provider directly. MCP connectors work as in OpenCode (vyom mcp).

Tiers & routing

A cheap triage pass classifies each request, then a transparent policy picks a tier:

  • nano — triage · budget — default chat & coding (DeepSeek V3.2)
  • mid — real work + vision · frontier — escalation only
  • sovereign — Indian-language / sovereignty → Sarvam, direct

Routing is quality-biased and domain-aware: code goes to coding models, expert questions to general frontier models, and a shaky mid-tier answer on a hard task gets one frontier retry.

Limits & billing

Limits are enforced server-side by token budget per day plus a monthly cost cap (the money-safety backstop). One ledger covers chat, CLI, harness, and API.

  • Free — budget tier, coding works, low daily tokens
  • Pro / Business — all tiers, frontier escalation, higher budgets, API keys (Business)

Self-host (BYOK)

Runs on your own keys — only OPENROUTER_API_KEY is required. Add Sarvam for the sovereign route, Tavily for web search, Supabase for the metered ledger + auth.

cp .env.example .env   # add your keys
npm install
npm run orchestrator   # OpenAI-compatible server

See USAGE.md and packages/orchestrator/supabase/ for the ledger schema.