List the provider endpoints that can serve a model
https://api.stav.ai/v1/models/{model_id}/endpointsEvery Inference Provider endpoint that can serve the model for this
key, in the order Stav tries them, each with its own context window,
max output tokens and quantization. Same shape and field names as
OpenRouter's /api/v1/models/{author}/{slug}/endpoints.
Only endpoints a request could actually reach are listed: your
workspace's policy (sovereignty floor, compute region, ZDR, blocked
providers) applies. Send an entry's id as model to pin that
endpoint.
For a Router (or auto, your workspace's default Router), the list
is every endpoint of every model the Router can pick, under the
Router's own rules as well, best model first. Each entry's
model_id names its model, and data.stav_router is true. The
models are paged with page and page_size (at most 100);
data.stav_total_models is the whole pool.
Path parameters
model_idstringrequiredAnything you can send as
model: a catalogue slug (openai/gpt-oss-120b), a bare name with one match, a Router (@your-workspace/router) orauto.
Query parameters
pageintegerRouter or
autoonly. The page of the Router's models.page_sizeintegerRouter or
autoonly. Models per page.
Header parameters
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./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-Countsaysexactorestimate. 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.
Errors
| Status | When |
|---|---|
| 401 | Missing or invalid API key. |
| 404 | Model id is not in the catalogue, or the caller's key doesn't have access to it. |
Every error code, what it means and what to do: Errors.