Skip to navigation

List the catalog, or look up one model

View as Markdown

GET /v1/models and GET /v1/models/{owner}/{repo} both answer locally from the gateway’s catalog, in the same shape as the live router’s own model-list response (each admitted provider’s pricing, the gateway’s 5.5% fee included, with the pinned default listed first) — nothing is proxied to Hugging Face for a GET.

Authentication

AuthorizationBearer

Your per-client bearer token — the API key the gateway issued to you. Present it in Authorization: Bearer <token> form. A token that is missing, unknown, or revoked draws a 401. Before the call is sent upstream the token is removed (stripped, or swapped for the upstream’s own credential); it never makes it past the gateway.

Path parameters

pathstringRequired

The path to call on Hugging Face’s Inference Providers router, any further / segments included — all of it after /huggingface/ is passed to https://router.huggingface.co/ when the gateway’s (model, provider) catalog admits the request (see the Hugging Face tag description above). Only two forms are admitted: v1/chat/completions and v1/models[/{owner}/{repo}].

Response

Whatever the upstream answered, relayed as-is (status, headers, body). Rendered here as JSON; the true shape is the upstream provider’s to define.

Errors

401
Unauthorized Error
404
Not Found Error