An OpenAI compatible gateway

Most AI gateways forward your request. We stand behind the answer.

We buy the inference. We check the answer against your tests and your schema. We move up to a stronger model only when the check fails. And every response tells you whether it passed.

Free to test, 100 requests a month, no card.

POST /v1/chat/completions200 OK
# a tool call, checked against your schema
{
  "choices": [{ "message": {
    "tool_calls": [{ "function": {
      "name": "get_forecast",
      "arguments": "{\"city\":\"Paris\"}"
    }}]
  }}],
  "tirtha": {
    "checked": true, "checked_by": "schema",
    "served_by": "deepinfra",
    "escalated": false
  }
}
Works with the client you already have OpenAI chat completions Anthropic messages OpenAI responses Streaming Tool calls
Side by side

They forward your request. We stand behind the answer.

Same request, two ways to handle it.

A typical gateway

  1. You pick the model, or a router guesses
  2. Passes back whatever comes back
  3. Falls back only on errors
  4. Wrong answer? Your code has to catch it

Tīrtha

  1. A light model answers first
  2. Checked against your tests and your schema
  3. Fails the check? Moves up a level
  4. Every answer says what was checked, or that nothing was

You can build this yourself on other gateways, with your own checks, retry rules and fallbacks. Tīrtha ships it as the default, behind one base URL.

How it works

Route, check, escalate.

You never pick a model. Each request takes the path below, and the response tells you which way it went.

01 Request

Your call comes in

Same body you send today, with your tools or your tests if you have them.

02 Route

A light model drafts

The lightest model that fits this kind of request answers first.

03 Check

The check

Code runs against your tests in a sandbox. Tool calls are checked against your schema.

Passes checked: true

Served to you. Done.

Fails escalated: true

Moves up to a stronger model and is checked again.

Nothing to check checked: false

Served as best effort, and the response says so.

See it

Every response carries a receipt.

A tirtha object sits beside the standard fields. Your client ignores it until you want it.

Request and responsetool call
# request: your tools, unchanged
{
  "model": "tirtha/auto",
  "messages": [{ "role": "user",
    "content": "What is the weather in Paris tomorrow?" }],
  "tools": [{ "type": "function",
    "function": { "name": "get_forecast", ... } }]
}

# response: the standard fields, plus
"tirtha": {
  "checked": true, "checked_by": "schema",         ← 1
  "served_by": "deepinfra", ← 2
  "escalated": false         ← 3
}
  1. 1

    checked

    True only when the answer passed a check, and checked_by names it: your tests for code, your schema for a tool call. A schema check proves a call is well formed, not that it is the right call. False means best effort, and it says so.

  2. 2

    served_by

    Which tier answered: a light model, or a frontier model when the check sent it up a level.

  3. 3

    escalated

    Whether a frontier model was needed. Here the light model passed, so nothing stronger was used.

  4. →

Change one line

Python OpenAI clientbefore and after
from openai import OpenAI

client = OpenAI(
    base_url="https://api.openai.com/v1",
    base_url="https://api.tirtha.ai/v1",
    api_key=TIRTHA_KEY,
)

Or try it from your terminal

curl copy and run
# change one line: your base URL
curl https://api.tirtha.ai/v1/chat/completions \
  -H "Authorization: Bearer $TIRTHA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tirtha/auto",
    "messages": [{"role":"user","content":"Hello"}]
  }'
Proof

The numbers, and how we got them.

Each figure is a count from a run we can show you. The method is one click away.

749/800
BFCL v4 tool calling tasks right

One fixed pass through our production path. An official AST rescore of the same outputs gives 751/800. This is our own run. We have not submitted it to the leaderboard.

How we measured →
primary path
200/200
adversarial traps, no wrong tool served
failover path
30/40
on the same four trap shapes

Four trap shapes, 50 variations each, in five separate passes. When the primary model stalls we fail over to keep you running, and that model calls a tool where it should decline. We publish both paths.

How we measured →
Tested
Code you can run

Send tests and the code runs against them in a sandbox. We serve only code that passes. We publish no coding benchmark figure until one clears our own review.

How to send tests →
Who it is for

Built for people shipping on the APIs they already use.

Developers on OpenAI or Anthropic

Keep your SDK, your prompts and your tools. Change the base URL and every response comes back labeled.

Agents that call tools

Each tool call is checked against your schema before your agent acts on it. When no tool fits, it declines instead of inventing a call.

Agents that write code

Send tests with the request. Code that fails moves up a level. Code that passes comes back marked as passing your tests.

Pricing

Free to test. Simple after that.

Free beta
$0

Sign in with Google and create a key. No card, no minimum, no sales call. Capped at 100 requests per month per key, raised on request.

Pay as you go
$2 / $8 per 1M tokens, in / out

You are paying for the checking. Checking can add a few tokens to a request. Prepaid credits coming soon. Free beta available now.

See full pricing →

Questions

Short answers.

What does checked mean?

It means the answer passed a check before we served it. For code, the check is your tests, run in a sandbox. For a tool call, the check is your schema: the call is well formed and matches the tool you declared. That does not prove it is the right call. So read it as “checked”, not “correct”. checked_by says which check ran: tests, schema, consensus or cache.

What if there is nothing to check?

Then the response says so. A plain answer with no tests and no schema comes back with checked: false, served as best effort. Before we serve it, two light models have to agree, or it moves up a level.

Do I have to change my code?

One line. Point your base URL at https://api.tirtha.ai/v1 and keep your client, prompts and tools. OpenAI chat completions, Anthropic messages and OpenAI responses all work, with streaming and tools.

Is this a guarantee?

No. We check what can be checked and we label every answer, so you always know which answers passed. We make no warranty about any answer, and we offer no refund tied to one.

Do you train on my data?

No. We never train on your data, and no provider we use trains on it. Read the security page.

Talk to the founder

A small company. You can reach the person who built it.

Questions about your workload, a limit you want raised, or a result you think is wrong. Email goes straight to the founder.

Tom Jones, founder, Spanda Works

Email [email protected]

Get an answer you can check.

Free to test, 100 requests a month, no card. Change one base URL.

Get an API key