Axis routing

Add a word to the model name to choose how the exchange ranks the offers. The word is smartest, fastest, cheapest, premium, balanced or economy.

deepseek-v4.1-flash:fastest
deepseek:cheapest
liquid.auto:smartest

The name before the colon is the scope: the models that compete. The word after it is the axis: the ranking. An axis changes only the order. Every offer must still pass your cap, limits and key.

Axis The offer that wins
smartest The highest published score, whatever the charge.
fastest The highest median output speed that the exchange measured. The charge breaks a tie.
cheapest The lowest estimated charge plus the cost of the predicted wait.
premium Auto: a doubling of the charge must buy 0.5 points.
balanced Auto: a doubling of the charge must buy 2 points.
economy Auto: a doubling of the charge must buy 5 points.

Send a request

from openai import OpenAI

client = OpenAI(base_url="https://router.inference.ai.exchange/v1", api_key="...")

response = client.chat.completions.create(
    model="liquid.auto:smartest",
    messages=[{"role": "user", "content": "Hello"}],
    extra_body={"exchange": {"cap_usd": 0.5}},
)

smartest and the Auto words pay more for a better score, so they need a price bound, such as the cap_usd above. With the CLI, write liquid claude --model liquid/auto:fastest.

Choose the scope

Name before the colon Models that compete
architect.basket, a router model such as liquid.auto, a preset The models that the name has without the axis. The axis sets the ranking.
A served model name, such as deepseek-v4.1-flash That model, across all of its offers.
A creator name, such as deepseek Each model of that creator.

smartest and the Auto words need more than one model, because one model has one score.

Beta. :web can change without notice, including its price and search services.

web is not an axis. It turns on a web search for the request and combines with any axis. Join the words with +, in any order:

deepseek-v4.1-flash:web
liquid.auto:smartest+web

Only an exchange with a search service key has web search. GET /v1/exchange/features says whether it does. For a request with web, the exchange:

Status Code When
400 web_search_needs_text The request has no user message with text to search for.
400 web_search_exceeds_cap The cap is not more than the price of the search.
402 insufficient_balance The balance cannot pay for the search and an answer.
503 web_search_unavailable No search service answered. Nothing is charged.

Reference

Same request, two forms

{ "model": "deepseek-v4.1-flash:fastest" }
{
  "model": "deepseek-v4.1-flash",
  "exchange": { "rank": { "strategy": { "kind": "fastest" } } }
}
Axis exchange.rank.strategy
smartest {"kind":"smartest"}
fastest {"kind":"fastest"}
cheapest {"kind":"price"}
premium {"kind":"auto","preference":"premium"}
balanced {"kind":"auto","preference":"balanced"}
economy {"kind":"auto","preference":"economy"}

The word counts as an axis only when the text after the last colon is exactly one of the six words, with a name before it. Otherwise the colon belongs to the model name: llama3:8b is one model name.

How each axis ranks

Refusals

Status and code Cause
400 smartest_needs_several_models smartest with one model. Use a creator, a router model, a basket or a preset.
400 strategy_conflicts_with_address premium, balanced or economy with one model.
400 auto_requires_price_bound smartest or an Auto word with no cap, no cost tier other than any and no output-rate ceiling. A router model with a cap of its own does not need one.
400 axis_conflict Another ranking in the same request: another exchange.rank.strategy kind, another Auto version, the x-liquid-policy header, or exchange.candidates.creators.allow with a creator name.
400 ambiguous_scope A name that is both a served model and a creator. Send architect.basket with a pattern in exchange.candidates.models.allow, such as deepseek-*.

See Errors for every code.