Browse documentation

Models

List all available LLMs and multimodal AI models supported by nRouter with real-time list pricing, context window limits, and tenant capability details.

Last updated

The /v1/models endpoint returns the complete catalog of artificial intelligence models, multimodal engines, and smart router aliases available to your authenticated virtual key (sk-nrouter-...). Use this endpoint to dynamically discover available models, query context window ceilings, verify provider availability, and build responsive model selectors in client applications.

GET https://api.nrouter.ai/v1/models
Model Catalog
Unified Discovery

Query all major providers through a single authenticated endpoint.

Access Control
Tenant-Filtered

Response reflects exact model ACLs and entitlements assigned to your key.

Pricing Model
Raw List Price

Every model is offered at flat provider list prices with zero markup.

Smart Routing
Router Aliases

Includes concrete models alongside smart router targets like nrouter/auto.


Architectural Role & Lifecycle

Model discovery is decoupled from rigid vendor configurations through nRouter's dynamic catalog architecture:

  1. Phase 1: In-Memory Key Auth & ACL Filtering: When a request reaches /v1/models, nRouter hashes the virtual key (sk-nrouter-...) and inspects the tenant's organization policy. The returned catalog is dynamically filtered so that caller applications only see models they are permitted to route to.
  2. Catalog Synchronization: The model catalog is synchronized across gateway nodes and hot-reloads within 60 seconds whenever models are added, updated, or deprecated by administrators.
  3. Zero Inference Billing: Querying /v1/models is a metadata retrieval operation and incurs $0 in token spend. No credit reservation hold is applied.
  4. Router Aliases vs. Concrete Models: The endpoint returns both concrete physical models (e.g. gpt-5.5, claude-sonnet-4-5-20250929, gemini-2.5-pro) and virtual smart router aliases (e.g. nrouter/auto, fastest-claude) that dynamically resolve routing chains based on real-time cloud latency and price ceilings.

Request Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer authentication format: Bearer sk-nrouter-....

Response Payloads

Standard Response Structure

{
  "object": "list",
  "data": [
    {
      "id": "gpt-5.5",
      "object": "model",
      "created": 1709251200,
      "owned_by": "openai"
    },
    {
      "id": "claude-sonnet-4-5-20250929",
      "object": "model",
      "created": 1709251200,
      "owned_by": "anthropic"
    },
    {
      "id": "gemini-2.5-pro",
      "object": "model",
      "created": 1709251200,
      "owned_by": "google"
    },
    {
      "id": "nrouter/auto",
      "object": "model",
      "created": 1709251200,
      "owned_by": "nrouter"
    }
  ]
}

Response Field Breakdown

FieldTypeDescription
objectstringAlways "list".
dataarrayArray of model objects available to the authenticated caller.
data[].idstringThe unique model identifier to pass in the model parameter of inference calls.
data[].objectstringAlways "model".
data[].createdintegerUnix timestamp representing when the model entry was registered.
data[].owned_bystringThe organization that owns or provides the model (e.g. openai, anthropic, google, meta, deepseek, mistral, nrouter).

Supported Provider Clouds & Model Families

nRouter routes requests across six enterprise cloud provider networks behind a single unified API key:

Provider CloudExample ModelsModalities & Capabilities
OpenAIgpt-5.5, gpt-4o, gpt-4o-mini, o1, o3Text generation, structured outputs, tool use, vision, embeddings
Anthropicclaude-sonnet-4-5-20250929, claude-opus-4-20250514, claude-3-5-haikuReasoning, code analysis, long context, prompt caching
Google Vertex AIgemini-2.5-pro, gemini-2.5-flash, gemini-2.0-flashMultimodal comprehension, audio understanding, 2M context windows
AWS BedrockClaude models, Llama 3.3, Amazon Nova, DeepSeekEnterprise multi-cloud resilience, cross-region inference
Azure FoundryGPT-4o, Phi-4, Mistral Large, Cohere EmbedDirect enterprise cloud egress, managed SLA endpoints
Alibaba USQwen 2.5, DeepSeek R1, DeepSeek V3Open-weight high-efficiency reasoning and code generation

SDK Code Examples

import { nRouter } from "@nrouter_ai/sdk";

const client = new nRouter({
  apiKey: process.env.NROUTER_API_KEY,
});

const models = await client.models.list();
console.log(`Found ${models.data.length} available models:`);

for (const model of models.data) {
  console.log(`- ${model.id} (${model.owned_by})`);
}

Dynamic Model Selection Pattern

Using /v1/models, frontend and backend applications can dynamically generate model selection dropdowns that stay automatically synchronized with your organization's enabled catalog:

import OpenAI from "openai";

export async function fetchEligibleModels(): Promise<string[]> {
  const client = new OpenAI({
    apiKey: process.env.NROUTER_API_KEY,
    baseURL: "https://api.nrouter.ai/v1",
  });

  const response = await client.models.list();
  return response.data
    .map((m) => m.id)
    .sort((a, b) => a.localeCompare(b));
}

Error Handling & Status Codes

{
  "error": {
    "type": "invalid_api_key",
    "message": "Invalid or missing virtual key.",
    "code": "invalid_api_key"
  }
}
HTTP StatusError CodeRoot CauseRecommended Action
401 Unauthorizedinvalid_api_keyVirtual key missing, expired, or invalid.Check Authorization: Bearer sk-nrouter-... header in dashboard.
403 Forbiddenkey_route_not_allowedThe virtual key has security policies restricting access to management routes.Adjust key policy settings in organization dashboard.
429 Too Many Requestsrate_limit_exceededVirtual key or organization RPM ceiling exceeded.Apply backoff; metadata queries should be cached locally by client applications.
500 / 503 Gateway Errorservice_unavailableInternal catalog database temporarily unreachable.Retry with exponential backoff.
Was this page helpful?