Skip to content

Menu

One model ID.
Automatic routing.

Use phantom-1 for chat. Phantom selects one of three models based on the first request of a conversation, keeps that choice for follow-ups, and reports which model ran and what it cost.

  • 3 chat models
  • Selected-model pricing
  • Signed usage receipts
Example routing decision

“Find the race condition in the webhook worker.”

Requested modelphantom-1
Selected tierFrontier
Routing reasonconcurrency bug
Price / 1M tokens$2.10 in, $10.50 out
Follow-up requestssame model
Signed receiptsigned

Three models. One chat model ID.

phantom-1 chooses from an economy, standard or frontier chat model at the start of a conversation. The selected model handles follow-ups unless the route is escalated or a fallback occurs. You pay the applicable rate of the model that actually runs.

TierTypically used forInput / 1M tokensCached input / 1M tokensOutput / 1M tokensAvailability
Economy
Short text formatting and extraction, when the request's features and route policy allow.FreeFreeFreeUp
Standard
Everyday code, agent tasks, and requests that need more context.$0.32$0.007$1.26Up
Frontier
Complex debugging, proofs, and demanding reasoning tasks.$2.10$0.10$10.50Up
Economy
Up

Short text formatting and extraction, when the request's features and route policy allow.

Input / 1M:Free
Cached input:Free
Output / 1M:Free
Standard
Up

Everyday code, agent tasks, and requests that need more context.

Input / 1M:$0.32
Cached input:$0.007
Output / 1M:$1.26
Frontier
Up

Complex debugging, proofs, and demanding reasoning tasks.

Input / 1M:$2.10
Cached input:$0.10
Output / 1M:$10.50

How routing works

Phantom makes a model selection when a new chat conversation begins. It filters out the models that can’t accept the request, then selects from the models that remain. Follow-up requests stay with that model unless you ask to escalate or a fallback is needed.

Compatibility

Check compatibility

Tool use, context length, images, and your privacy controls affect which models are eligible.

Selection

Select for the task

Among the models that fit, Phantom selects one for the conversation. Where the routing rules expect them to handle the task, lower-cost models come first.

Affinity

Keep the conversation consistent

Follow-ups use the selected model for an hour after the last request. To move the conversation up one tier, send x-phantom-escalate: 1.

A chat request with an image runs on an image-capable model outside the three text tiers.

Preview a routing decision

POST /v1/key/route/test tests which model Phantom would select for a request, without generating a model response or incurring inference charges.

curl https://phantom.codes/v1/key/route/test \
  -H "Authorization: Bearer $PHANTOM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "phantom-1",
    "messages": [{
      "role": "user",
      "content": "Find the race condition in the webhook worker."
    }]
  }'

Control how requests are routed

Choose the model for each tier, when to skip the economy model, which providers may handle your data, or when to escalate a conversation. These controls affect which models Phantom can select. Phantom keeps no prompt or completion text; these flags govern what the upstream provider may keep, and they are off unless you send them.

ControlWhat it doesKeep in mind
zdr: trueRequire a provider that keeps no data.Off by default. Skips the economy model unless its provider keeps no data.
no_training: trueUse only providers that don't train on prompts.Off by default. Skips the economy model unless its provider doesn't train on prompts.
x-phantom-free: offKeep this request off the economy model when that model is free.May cost more.
x-phantom-escalate: 1Move the conversation up one model tier.May cost more.
A lineup on your keyPick the model for each tier, and a fallback model for each tier.Set it on /keys, with phantom lineup, or with PUT /v1/key/lineup. It applies to every request on the key.
A model ID instead of phantom-1Call one model directly.That request skips phantom-1 chat routing.
zdr: true

Require a provider that keeps no data.

Off by default. Skips the economy model unless its provider keeps no data.

no_training: true

Use only providers that don't train on prompts.

Off by default. Skips the economy model unless its provider doesn't train on prompts.

x-phantom-free: off

Keep this request off the economy model when that model is free.

May cost more.

x-phantom-escalate: 1

Move the conversation up one model tier.

May cost more.

A lineup on your key

Pick the model for each tier, and a fallback model for each tier.

Set it on /keys, with phantom lineup, or with PUT /v1/key/lineup. It applies to every request on the key.

A model ID instead of phantom-1

Call one model directly.

That request skips phantom-1 chat routing.

Know which model ran, and what it cost

Every response reports the model that ran and the billed usage through response metadata. Signed receipts let you verify the fields covered by the signature. Every header

curl -i https://phantom.codes/v1/chat/completions \
  -H "Authorization: Bearer $PHANTOM_KEY" \
  -H "Content-Type: application/json" \
  -H "x-phantom-session: refund-bug" \
  -d '{
    "model": "phantom-1",
    "zdr": true,
    "messages": [{
      "role": "user",
      "content": "Find the race condition in the webhook worker."
    }]
  }'

Request controls

"zdr": true
Skips the economy model unless its provider keeps no data, and sends the request only to providers that keep no data. Set it on a key's route policy to cover every request.
"no_training": true
Skips the economy model unless its provider doesn't train on prompts, and uses only providers that don't train on prompts.
x-phantom-free: off
Keeps this request off the economy model when that model is free.
x-phantom-session: <id>
Names the conversation, so its requests stay on one model. Without it, phantom-1 matches requests by their system prompt and first user message.
x-phantom-escalate: 1
Moves the conversation up one model and keeps it there.
PUT /v1/key/lineup
Sets the key’s lineup: the model for each tier and a fallback for each. It applies to every request on the key. Lineup API reference

Response metadata

x-phantom-fallback
true when another provider or model answered. A busy economy model falls back to standard.
x-phantom-cost-usd
What the call cost, in US dollars.
x-phantom-receipt
A signed receipt that names the model that ran, the tokens and the cost. Verify a receipt.
HTTP/2 200
x-phantom-router: phantom-1
x-phantom-fallback: false
x-phantom-cost-usd: 0.003120
x-phantom-receipt: <signed receipt, base64>

Benchmarks

The last benchmark run, on October 25, 2026, tested today's router and models on 295 tasks. See the benchmarks page for its results.

~78% lower cost per taskthan Frontier alone.

  • phantom-1

    $0.85

  • Frontier alone

    $3.95

One familiar model ID across API endpoints

Chat uses automatic routing. On supported non-chat endpoints, phantom-1 maps to a specific model for that operation. The same API key and model name work across these endpoints, but non-chat calls do not run the three-model chat router.

OperationEndpointPricing unitAvailability
Chat with an image
/v1/chat/completions
$0.032 in, $0.14 out per 1M tokensUp
Embeddings
/v1/embeddings
$0.021 per 1M tokensUp
Rerank
/v1/rerank
$0.052 per 1M tokensUp
Images
/v1/images/generations
$0.042 per imageUp
Video
/v1/video/generations
$0.105 to $0.158 per secondUp
Speech
/v1/audio/speech
$0.016 per 1,000 charactersUp
Transcription
/v1/audio/transcriptions
$0.0063 per minuteUp
Chat with an image
Up
/v1/chat/completions
Pricing unit$0.032 in, $0.14 out per 1M tokens
Embeddings
Up
/v1/embeddings
Pricing unit$0.021 per 1M tokens
Rerank
Up
/v1/rerank
Pricing unit$0.052 per 1M tokens
Images
Up
/v1/images/generations
Pricing unit$0.042 per image
Video
Up
/v1/video/generations
Pricing unit$0.105 to $0.158 per second
Speech
Up
/v1/audio/speech
Pricing unit$0.016 per 1,000 characters
Transcription
Up
/v1/audio/transcriptions
Pricing unit$0.0063 per minute

Try automatic model routing.

Use phantom-1 in an OpenAI-compatible chat request, or preview a routing decision before making a model call.