Documentation menu

Models

Which models an environment can call, by which names, and at what price.

Each environment draws on a catalog of models at the providers' published prices, which run on your own provider keys. You choose which of them the environment may use, and you can narrow that further per key and per customer. A model whose provider has no key of yours is refused in a live environment.

Listing the models you can call#

GET /v1/models on the gateway lists the models the calling key may use, in OpenAI's list format, or in Anthropic's when the request carries an anthropic-version header. Both official SDKs' models.list() work against it.

curl https://api.hixel.dev/v1/models \
  -H "Authorization: Bearer $HIXEL_API_KEY"

For names, limits and prices, read the catalog with a management key. It lists every model of the catalog, also the ones the environment does not allow ("allowed": false):

curl https://api.hixel.dev/v1/catalog/models \
  -H "Authorization: Bearer $HIXEL_API_KEY"
{
  "catalog": "default",
  "markup_bps": 2000,
  "models": [
    {
      "name": "claude-sonnet-5-5",
      "allowed": true,
      "aliases": ["claude-sonnet"],
      "provider": "anthropic",
      "endpoints": ["chat"],
      "context_window": 1000000,
      "max_output_tokens": 128000,
      "price": { "input": "2000000", "output": "10000000", "cache_read": "100000", "cache_write_5m": "2500000", "cache_write_1h": "4000000", "long_context": null, "units": { … } },
      "billed_price": { "input": "2400000", "output": "12000000", … },
      "price_source": { "url": "https://…", "checked_on": "2026-11-24" }
    }
  ]
}

Prices are micro-USD per million tokens, as strings. price is what the provider charges at its published list price (your own provider account bills you at yours); billed_price is what your customers' wallets are charged: the price plus the environment's markup, rounded up. markup_bps is the markup in basis points (2000 is 20%; you set it in the dashboard or as markup_bps with PATCH /v1/gateway). endpoints says what a model serves: chat (all three chat formats) or an endpoint such as embeddings.

Names and aliases#

Call a model by its catalog name (claude-sonnet-5-5) or by an alias (claude-sonnet). An alias always points at a model, never at another alias, and the response's x-hixel-model header names the model that answered. An environment can add its own aliases in the dashboard (Models → Aliases) or as aliases with PATCH /v1/gateway with a project key.

A name the environment does not know is refused with 404 and model_not_found.

Allowing models#

Three allowlists narrow which models a request may use. Each is a list of model names and prefix/* patterns, or null for no restriction of its own:

WhereSet inApplies to
The environmentDashboard, Models, or allowed_models with PATCH /v1/gatewayEvery request
A key (allowed_models)Dashboard, or POST /v1/keysRequests made with that key
A customer (allowed_models)Dashboard, or PUT /v1/customers/{external_id}Requests that name that customer

A request must pass all three. A model one of them excludes is refused with 403 and model_not_allowed. A customer's list can only narrow what the environment allows, never widen it. A customer's team policy and its members' own lists narrow it further, with exact model names.

# Let org_42 use only the Claude models.
curl -X PUT https://api.hixel.dev/v1/customers/org_42 \
  -H "Authorization: Bearer $HIXEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "allowed_models": ["claude-sonnet-5-5", "claude-haiku-5-5"] }'

Reading the environment's settings#

GET /v1/gateway returns the environment's gateway settings as the gateway applies them: its allowed models, aliases, markup, whether a customer is required, its BYOK, routing, limits, wallet, guardrails and cache policies. Change them in the dashboard, or with PATCH /v1/gateway with a project key (an environment's own key reads them but cannot change them).