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"]}| Field | Type | Description |
|---|---|---|
id | string | The model identifier used in API calls. |
owned_by | string | Always "nrouter" for models served through the gateway. |
nrouter_endpoints | string[] | 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 Status | Error Code | Reason |
|---|---|---|
| 401 Unauthorized | invalid_api_key | Virtual key missing, expired, or invalid. |
| 404 Not Found | model_not_found | Model does not exist or tenant ACL prohibits access. |
| 429 Too Many Requests | rate_limit_exceeded | Virtual key or organization RPM quota exceeded. |
| 500 / 503 Gateway Error | service_unavailable | Internal catalog database temporarily unreachable. |
Authorization
NRouterApiKey Your nRouter virtual key (sk-nrouter-…). Sent as Authorization: Bearer sk-nrouter-….
In: header
Path Parameters
Header Parameters
Target MCP server ID when routing MCP tool calls or prompts through the gateway
Caller SDK runtime language identification (e.g. typescript, python, rust, go)
Caller session identifier allowed at edge for grouping related client turns
Inbound trace detail level override for request lifecycle spans
Value in
- "off"
- "stages"
- "verbose"
Inbound stage-level trace emission override
Value in
- "off"
- "stages"
- "verbose"
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"}