List models accessible to the caller
https://api.stav.ai/v1/modelsWith a key: every model the key can invoke, filtered by key scope and your workspace policy. Without a key: the public catalogue — the models a workspace with no policy of its own is offered — at 60 requests a minute per IP, so an OpenRouter-style client that lists models without sending the key still fills its model picker. A key that is sent is always checked: a bad one is a 401, never the anonymous list.
With a key, auto comes first, then the forms of auto with one
rule that your default Router can serve now: auto:eu, auto:eea,
auto:L1 to auto:L4. They are for apps that show only this list.
A Router or a model with a rule (@workspace/router:eu) is not
listed; send it as model.
Drop-in for the OpenAI SDK's client.models.list(), and each item
carries OpenRouter's name and architecture fields.
Spørreparametere
output_modalitiesstringComma-separated. Keeps the models with one of these among
architecture.output_modalities:text,audio,embeddings,rerank.allor no value lists every model.currencystringShow prices and amounts in this currency, for a client that counts in it: one of the currencies
GET /v1/public/currencieslists, or your workspace's own currency. Any other code is a 400. A request is still charged in your workspace's currency. OnGET /v1/models, applies with a key and is ignored without one;stav_image_optionsprices follow it too.
Header-parametere
X-Stav-Runs-InstringWhere this request may run, as a header:
eu,eea, one ISO 3166 alpha-2 country code, or a comma-separated list of codes (NO, SE). The same values and the same meaning as theprovider.runs_inbody field, for clients that can set fixed headers but not body fields (an SDK'sdefault_headers). It filters the Provider Endpoints that may serve and every failover; when none passes, the request is refused (403 endpoint_not_admissible) and nothing is sent.It only ever narrows. Sent together with
provider.runs_in, both must hold:X-Stav-Runs-In: eeawith"runs_in": "NO"runs in Norway;X-Stav-Runs-In: euwith"runs_in": "NO"or"US"has no country in common and is400 invalid_value. It never widens your workspace policy. A value Stav cannot read, an empty one, or two header lines with different values is400 invalid_valuewithparamX-Stav-Runs-In; the same value sent twice counts once. The request log shows the region with its source.GET /v1/modelslists only models with an endpoint inside it, and a Router orautoonly when at least one of its candidates has one (without a key,autois not listed under the header);GET /v1/models/{model_id}/endpointslists only those endpoints, andGET /v1/models/{model_id}gives their limits and price./v1/messages/count_tokensreads it too: when the provider's own counter is outside it, the count is a local estimate and the prompt is never sent. The response headerX-Stav-Token-Count(andstav_token_countin the body) saysexact,estimate(the model's own tokenizer, run by Stav) orapproximate(no tokenizer for the model: characters / 4). Reading or cancelling a stored response (GET /v1/responses/{id},/input_items,/cancel) held by an endpoint outside it is refused with403 endpoint_not_admissible;DELETEis not refused, so data held outside the region can always be erased.X-Stav-Min-Sovereignty-LevelstringThe lowest sovereignty level that may serve this request:
L1,L2,L3orL4, in any letter case.L3admits L3 and L4. The same meaning as theprovider.min_sovereignty_levelbody field, for clients that can set fixed headers but not body fields. It filters the Provider Endpoints that may serve and every failover. An endpoint with no level does not pass. When none passes, the request is refused and nothing is sent.It only ever narrows: the highest of your workspace's floor, the Router's, this header, the body field and a level in the model name (
auto:L3) holds. An empty value, any other value, or two header lines with different values is400 invalid_valuewithparamX-Stav-Min-Sovereignty-Level.A level is a grade, not a place. To keep a request in the EU, send
X-Stav-Runs-In: eutoo. Today only your own Stav Tunnel node is atL4.The model listings,
/v1/messages/count_tokensand stored responses follow it as they followX-Stav-Runs-In.
Feil
| Status | Når |
|---|---|
| 400 |
|
| 401 | Missing or invalid API key. |
| 429 | Per-key or per-IP rate limit exceeded. |
Alle feilkoder, hva de betyr og hva du gjør: Feil.