Skip to content
HIPS
Sign inContact HIPSJoin early access

Semantic routing

Send a router's name in place of a model, and HIPS picks the model for each request.

We are inviting early-access interest while we develop the platform.

Chat
hips-router-chat
Coding agents
hips-router-code
curl -i https://ai.hips.com/v1/chat/completions \  -H "Authorization: Bearer $HIPS_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "model": "hips-router-chat",    "messages": [{"role": "user",      "content": "Explain GPU inference."}]  }'

Send one of four router names in place of a model, and HIPS chooses the model for each request: the fastest, the cheapest or the most capable that can do the work.

A router is a model name that chooses the model. Send hips-router-chat, hips-router-agent, hips-router-code or hips-router-research in model on chat completions, Responses or Messages, streamed or not, with your own tools, and HIPS chooses a model for each request among the models that can do that work, the fastest or the cheapest as you set it. The request is served and billed as the model chosen, which the answer names, and a read the decision service answers is a usage record of its own. From November 28, 2026, such a read is charged at USD 0.0525 per million input tokens.

Semantic routing reads each request in production: where two models or more can serve it, a decision service judges its task and difficulty first. When the read fails, gets no answer within its deadline, or the day's reads are used up (HIPS's whole day, or the workspace's share of it), the request is chosen by rules alone and served all the same, and x-hips-router says why in reason.

The HIPS Console's Router screen: the rules that pick a model for each request
The Console's Router screen. Example workspace; captured December 3, 2026.

The four routers

  • hips-router-chat

    Use case
    Chat: conversation, questions and answers, customer support and writing
    The models it can choose
    Every published, priced language model
  • hips-router-agent

    Use case
    Agent: requests that act through tools
    The models it can choose
    Models whose tool calls are validated
  • hips-router-code

    Use case
    Coding: coding agents and code work
    The models it can choose
    Models that passed a coding agent's test, with their tool calls validated
  • hips-router-research

    Use case
    Research: long context and reasoning
    The models it can choose
    Models that advertise reasoning

A model joins and leaves a router by itself as it is imported, tested and priced; no list is kept by hand. A router chooses among catalog models only: never a workspace's own deployment (dep_...), never a draft, deprecated or retired model, and never a model the catalog offers only to buyers in certain countries. For the Coding router, a test with the coding agent of the route you call counts first: HIPS Code or OpenCode on chat completions, Claude Code on Messages, Codex on Responses. Where no model has passed that agent's test, a test with any of the four counts.

Fastest, cheapest or most intelligent

Each router has a preference for the workspace: Fastest sends each request to the model with the shortest measured time for its size, Cheapest to the lowest expected charge for its size at the rates its quote would bind, and Most intelligent to the most capable model that can do the work. The API names the three fastest, cheapest and smartest, so the Console's Most intelligent is smartest in x-hips-router and in Models. A router never set reads Cheapest. An owner or admin sets it on the Console's Semantic routing page; the change applies to the next requests and is recorded in the audit log. A suffix overrides the setting for one request:

  • hips-router-code

    Preference
    The workspace's setting for Coding
    Source in the answer
    setting
  • hips-router-code:fast

    Preference
    Fastest, for this request alone
    Source in the answer
    suffix
  • hips-router-code:cheap

    Preference
    Cheapest, for this request alone
    Source in the answer
    suffix
  • hips-router-code:smart

    Preference
    Most intelligent, for this request alone
    Source in the answer
    suffix

Most intelligent ranks the models by HIPS's model tiers, Frontier, Pro, Standard and Fast, as GET /v1/models lists them in hips.model_tiers (see Models), then every other model by its size, the largest first. Of the models that can serve the request, the highest-ranked one with a GPU ready now serves it, so no request waits for a model to load while another is ready. Where a higher-ranked model must load, the request is counted as that model's demand, so HIPS loads it for the requests after this one. Most intelligent reads nothing first, since no read could change its order: x-hips-router says read=rules; reason=same_choice, and no read is charged. It is billed as the model it chooses, at that model's price, which may cost more than the other preferences.

  • The measured time is the prompt's tokens over the measured prefill rate plus the expected output over the measured decode rate, on GPUs that hold the model loaded and free now. A model with no measured speed ranks after every model that has one, those among themselves by expected charge. Nothing is estimated from another model.
  • The expected output is the request's own cap where it sets one, else the same length for every model, so a model with a long default is not made to look dear.
  • A name and its suffix are lowercase, exactly as written. An empty or unknown suffix (hips-router-code:, hips-router-code:best) is 400 invalid_value at model: "The suffix of a router is :fast, :cheap or :smart, as in hips-router-code:fast."
  • Any other name that starts with hips-router, a router written in another case included, is 404 model_not_found, and the message names the four. No catalog id, alias or pinned id starts with hips-router, so a router never collides with a model.
  • A router chooses language models on chat completions, Responses and Messages only. Named on /v1/tasks, /v1/embeddings or /v1/rerank, it is 400 invalid_value at model.

How a model is chosen

Semantic routing makes no promise about which model serves a request. It chooses before the first byte of the answer, in this order:

  1. The candidates

    The router's models, narrowed to those that can serve this request in a pool it may use: an image part needs a model that takes images, tools one that supports tool calls, response_format, logprobs and logit_bias a model that advertises them (parallel_tool_calls and reasoning_effort narrow nothing: the first is a permission, served as false on a model without the feature, and the second is accepted with no effect on a model without reasoning), the prompt a window served now that holds it, and an output cap a model whose output limit reaches it. Then the requirements (x-hips-pool, x-hips-region, x-hips-pricing-mode), the pools the workspace may use and your guardrails. Then the supply now: a model no GPU can serve in any of those pools is out.

  2. The read

    Where two models or more remain, the request may be read first: a decision service judges its task (conversation, writing, extraction, reasoning, code or tool_use) and its difficulty (simple, moderate or hard) from a masked excerpt. A harder request is held to larger models, and the task ranks the models that fit it first: models that reason for reasoning, models tested with a coding agent for code, validated tool calls for tool_use, JSON schema output for extraction. Without an answer the request is chosen by rules alone, among the same candidates with no size floor and no task preference. A request with a region requirement is never read. A read that fails, times out or finds the day's reads used up never fails the request: it is chosen by rules alone.

  3. The order

    Models with a GPU ready now go before models that start on demand, since loading a model can take minutes. Within each, the preference's measure decides, ties going to the other measure, then to the catalog id, so every gateway chooses alike. Where the read asked for a larger model and none is ready now, a smaller one that is ready goes first, and the answer says floor=below. Under Most intelligent the rank alone decides within each, the model tiers first, then size.

  4. The conversation

    Under Fastest and Cheapest, a conversation's next turn goes to the model its earlier turn was answered by, while that model is still a candidate, ready now and large enough for the new turn, so a coding agent's session stays on one model. Under Most intelligent each turn goes to the highest-ranked model ready now, so a conversation moves to a higher-ranked model once one is loaded.

  5. The tries

    The first model is tried as if the request had named it. If it is refused before its first byte for capacity (no_capacity, pool_unavailable, overloaded, context_size_not_measured, model_loading), the next one is tried, up to three models in all, within the request's own deadline. After the first byte the request is that model's: a stream that fails is never restarted on another model.

What the answer says

Everything about the answer is the chosen model's: model in the body names it, never the router, x-hips-model carries its pinned id, and usage its counts in the route's own names. x-hips-router says how it was chosen:

Response headers

HTTP/2 200
content-type: application/json
x-hips-request-id: req_...
x-hips-model: <pinned id of the model chosen>
x-hips-router: hips-router-code; preference=cheapest; source=setting; read=decision; task=code; difficulty=hard
  • <router>

    Rule
    The router's name, without its suffix.
  • preference

    Type
    fastest, cheapest, smartest
    Rule
    The preference this request was chosen by.
  • source

    Type
    setting, suffix
    Rule
    The workspace's setting, or the request's suffix.
  • read

    Type
    decision, cache, rules
    Rule
    Read first; read first, from an earlier reading of the same masked text; or chosen by rules alone.
  • reason

    Type
    a word below
    Rule
    Why rules alone. Only with read=rules.
  • task

    Type
    conversation, writing, extraction, reasoning, code, tool_use
    Rule
    Only when the request was read.
  • difficulty

    Type
    simple, moderate, hard
    Rule
    Only when the request was read.
  • floor

    Type
    below
    Rule
    The model chosen is smaller than the difficulty asked, since nothing larger was ready.
  • tries

    Type
    a count
    Rule
    Only when more than one model was tried before one was placed.
  • no_key

    Why the request was chosen by rules alone
    The gateway has no client for the decision service, so it cannot read
  • one_candidate

    Why the request was chosen by rules alone
    Only one model could serve it, so there was nothing to read for
  • same_choice

    Why the request was chosen by rules alone
    Every answer the read could give would try the same models in the same order, so none was asked
  • region

    Why the request was chosen by rules alone
    The request carries a region requirement, and such a request is never read
  • timeout

    Why the request was chosen by rules alone
    No answer in time
  • error

    Why the request was chosen by rules alone
    The read failed, or the masking could not finish within its bound and nothing was sent
  • refused

    Why the request was chosen by rules alone
    The decision service refused the read
  • budget

    Why the request was chosen by rules alone
    The day's reads are used up, HIPS's or the workspace's share
  • unusable

    Why the request was chosen by rules alone
    The decision service answered the read, but with nothing the Router could use; from November 28, 2026, the read is charged
  • breaker

    Why the request was chosen by rules alone
    Reads are paused after failures
  • saturated

    Why the request was chosen by rules alone
    Too many reads at once
  • switched_off

    Why the request was chosen by rules alone
    HIPS switched reading off

A request the read could not answer in time is chosen by rules alone, and the header says so:

A request chosen by rules alone

x-hips-router: hips-router-code; preference=cheapest; source=setting; read=rules; reason=timeout

x-hips-router is on every answer to a request that named a router, a refusal after the name was read included: a refusal found among the candidates says read=rules with no reason, and a content moderation block, which comes before any choice, carries the name, preference and source alone. The answer's hips object carries the same as router, with model, the pinned id served, and each member only where it is known:

The hips object of a chat completion

"hips": {
  "cost_micros": 0,
  "latency_ms": 0,
  "quote": "quote_...",
  "router": {
    "name": "hips-router-code",
    "preference": "cheapest",
    "source": "setting",
    "read": "decision",
    "task": "code",
    "difficulty": "hard",
    "model": "<pinned id of the model chosen>"
  }
}
  • Chat completions

    Where the router member is
    The answer's top-level hips object; on a stream, the hips object of the final usage chunk (stream_options.include_usage)
  • Messages

    Where the router member is
    hips on the message; on a stream, in message_delta
  • Responses

    Where the router member is
    On a stream, the hips member of response.completed; a whole answer carries the headers alone

The choice is made before the first byte, so x-hips-model and x-hips-router are in a stream's head, and a refusal is an ordinary status and body, never an error inside the stream.

What it costs

A routed request is billed exactly as the model chosen: its quote (x-hips-quote), its rates in the pool that served it, its usage units, and x-hips-cost-micros or the hips object's cost_micros. There is no router fee. Reading the request is a usage record of its own, marked decision, whatever becomes of the request, even when its answer could not be used (unusable); a request chosen from a kept verdict, or by rules alone for any other reason, has no read and no record of one. From November 28, 2026, the read is charged by the input tokens the decision service counted, at USD 0.0525 per million. The usage record keeps the model chosen and, beside it, the router's name, the preference, its source, how it chose and why rules, never the task or the difficulty. Rate limits count a routed request as one request with its own tokens.

Data handling

The read receives a masked excerpt of the request, at most 4,096 bytes: the newest user message's text, then the system text, with every email address, phone number, Social Security number, card number, IBAN, IP address and secret replaced by a typed placeholder, and the custom patterns of your content moderation guardrails masked too. Images are never read. The excerpt goes to a decision service run outside HIPS for the one call, and is never stored, logged or sent to a model's server; a masking that cannot finish within its bound sends nothing. A verdict and a conversation's model are kept under keyed hashes for a bounded time, never as text.

For AI agents

The key is read from HIPS_API_KEY, never shown here.

Onboard your agent to HIPS

Paste one line into your coding agent. It reads HIPS's setup guide, connects your project to the API and checks the connection with a real request.

my-app, your coding agent

Set up HIPS for me: fetch https://hips.com/agent-setup.md and follow it.

Paste into any coding agent
  • Call a router

    A router's name in place of a model; HIPS chooses the model.

    Not yet. Call it through the API
  • List the models

    Every model HIPS serves, with its id, modality and prices.

    Not yet. The HIPS MCP server is coming soon.