KukuDvar

Gateway

Open and frontier models behind one endpoint, each call on the cheapest model that clears the bar

Content checks, search, drafts, metadata and dubs each get a primary model, an escalation and a fallback. Routing by genre and language becomes a rule you can read, price and re-test, not a habit.

One endpoint, every model

  • OpenAI-compatible. Change the base URL; existing code and custom GPT prompts keep working.
  • Open and frontier together. Open models served by Dvar from India, priced in rupees; frontier models through the same call.
  • Routes decided by evals. Each workflow, language or genre goes to the cheapest model that clears its eval. When a new model ships, the eval re-runs and the route changes without a code change.
  • Escalation and fallback. Unsure answers go up a tier; a provider outage falls back; search degrades to keyword results instead of failing.
  • Every call traced. Cost, latency and errors per call, with personal details masked, feeding the evals and later post-training.
from openai import OpenAI

client = OpenAI(
    base_url="https://portal.dvarlabs.ai/v1",     # was the provider's URL
    api_key=os.environ["DVAR_API_KEY"],
)
client.chat.completions.create(
    model="auto",                                 # the gateway picks per workflow
    extra_headers={                               # routing hints (illustrative)
                   "X-Dvar-Workflow": "content-checks",
                   "X-Dvar-Language": "hi", "X-Dvar-Genre": "horror"},
    messages=[...],
)

The monthly bill, per workflow

List prices times a token shape per call. Volumes and token shapes are written for the demo; type your own. The content-check escalation share comes from the frozen run.

WorkflowRouteCalls a monthPer callFrontier onlyThis setup

Content checks

Five checks on every scene of every draft, dub and subtitle file

Primary GLM 5.3 on Dvar · escalate 1% to claude-sonnet-5.5 (Dvar model confidence under 0.7 (share from the run)) · fallback gpt-oss-120b on Dvar
Short, repeated, structured: a small open model with code checks in front, frontier only when unsure.

about 2,000 shows × 80 episodes × 25 scenes × 5 passes (drafts, regenerations, dubs)

650 in · 40 out
₹0.14 frontier
₹0.08 primary
₹28.6 lakh₹16.6 lakh

1.7× lower

Search query reading

Turn a typed query into genre, tags, language and a title guess

Primary gpt-oss-120b on Dvar · fallback keyword results
Must answer inside the search latency budget; on timeout the gateway returns keyword results, never an error.

searches a month that need more than keyword matching (assumed)

420 in · 45 out
₹0.11 frontier
₹0.0060 primary
₹32.5 lakh₹1.80 lakh

18× lower

Episode script drafts

First drafts of episode scripts from a beat sheet and the show bible

Primary claude-sonnet-5.5 · fallback GLM 5.3 on Dvar
Creative work stays on frontier until the generator gate shows an open or post-trained model clears the bar.

about 2,000 shows × 80 episodes × 2.5 drafts

3,000 in · 1,200 out
₹1.51 frontier
₹1.51 primary
₹6.05 lakh₹6.05 lakh

same

Titles, synopses, thumbnail and push copy

Short marketing text per episode, in several variants

Primary gpt-oss-120b on Dvar · fallback GLM 5.3 on Dvar
High volume, short output, easy to check: open model first.

160,000 episodes × 10 variants

1,200 in · 250 out
₹0.41 frontier
₹0.02 primary
₹6.59 lakh₹35,200

19× lower

Translation for dubs and subtitles

Hindi scripts into other Indian languages and English

Primary GLM 5.3 on Dvar · escalate 10% to claude-sonnet-5.5 (language check fails on the output) · fallback gpt-oss-120b on Dvar
Open multilingual model, with the content checks run on the output and frontier for retries.

160,000 episodes × 3 languages

1,500 in · 1,700 out
₹1.68 frontier
₹0.74 primary
₹8.06 lakh₹4.34 lakh

1.9× lower

All workflows₹81.8 lakh₹29.1 lakh

2.8× lower

Episode drafts stay on frontier here on purpose: the generator gate decides when an open or post-trained model clears the bar for each language and genre, and the route changes then.

A simulated day through the gateway

One day at the default volumes, sampled 1 in 1,000 and scaled back up. Turn on an incident to see where calls go.

00:0012:0023:00
PrimaryEscalatedFallbackDegraded, no model
WorkflowCallsEscalatedFell backDegradedCost (if frontier only)
Content checks6,64,0007,00000₹55,348 (₹94,819)
Search query reading9,97,000000₹5,982 (₹1.08 lakh)
Episode script drafts11,000000₹16,632 (₹16,632)
Titles, synopses, thumbnail and push copy60,000000₹1,320 (₹24,696)
Translation for dubs and subtitles11,000000₹8,091 (₹18,480)