Browse documentation

Get Model

Retrieve detailed configuration and real-time metadata for a specific model by ID, including context limits, list pricing, and tenant access entitlements.

The /v1/models/{model_id} endpoint retrieves operational metadata for a single model or nrouter/auto by its identifier. Verify model availability, provider ownership, and key entitlements before issuing inference batches with zero billing charges.

Queries evaluate your virtual key against catalog permissions. Concrete identifiers (e.g. gpt-5.5) return provider specs; nrouter/auto returns its own entry. Restricted models return HTTP 404 (model_not_found).

GET https://api.nrouter.ai/v1/models/{model_id}

Parameters & Headers

Path: model_id (string, required) — model ID (e.g. gpt-5.5, claude-sonnet-4-5-20250929, nrouter/auto). Inbound: Authorization: Bearer sk-nrouter-.... Telemetry: x-nr-request-id, x-nr-latency-ms, x-nr-model.

Response

{"id": "gpt-5.5", "object": "model", "owned_by": "nrouter", "nrouter_endpoints": ["/v1/chat/completions", "/v1/responses"]}
FieldTypeDescription
idstringThe model identifier used in API calls.
owned_bystringAlways "nrouter" for models served through the gateway.
nrouter_endpointsstring[]Supported gateway inference endpoints for this model.

Examples

import { nRouter } from "@nrouter_ai/sdk";
const client = new nRouter({ apiKey: process.env.NROUTER_API_KEY });
const model = await client.models.retrieve("gpt-5.5");
console.log(model.id, model.owned_by);

Errors

Restricted models return 404 model_not_found across all authorization tiers. Model responses support HTTP caching for up to 60 seconds. See the Models Catalog.

HTTP StatusError CodeReason
401 Unauthorizedinvalid_api_keyVirtual key missing, expired, or invalid.
404 Not Foundmodel_not_foundModel does not exist or tenant ACL prohibits access.
429 Too Many Requestsrate_limit_exceededVirtual key or organization RPM quota exceeded.
500 / 503 Gateway Errorservice_unavailableInternal catalog database temporarily unreachable.
GET
/v1/models/{model_id}

Authorization

NRouterApiKey
AuthorizationBearer <token>

Your nRouter virtual key (sk-nrouter-…). Sent as Authorization: Bearer sk-nrouter-….

In: header

Path Parameters

model_id*string

Header Parameters

x-nr-tags?string

Custom spend and attribution tags (comma-separated key=value pairs)

x-nr-mcp-server?string

Target MCP server ID when routing MCP tool calls or prompts through the gateway

x-nr-client-language?string

Caller SDK runtime language identification (e.g. typescript, python, rust, go)

x-nr-session-id?string

Caller session identifier allowed at edge for grouping related client turns

x-nr-trace?string

Inbound trace detail level override for request lifecycle spans

Value in

  • "off"
  • "stages"
  • "verbose"
x-nr-trace-stages?string

Inbound stage-level trace emission override

Value in

  • "off"
  • "stages"
  • "verbose"
x-nr-trace-id?string

Accepted so a client sending it is not refused; the value is not recorded and not propagated. Every response carries the gateway's own trace ID in this header, never the one sent.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/models/string"
{  "id": "gpt-4o",  "object": "model",  "owned_by": "nrouter"}
Was this page helpful?