List All Models

Get live model IDs, supported parameters, context windows, and prices
View as Markdown

Returns the current OpenRouter-backed model catalog. Listing models costs 0 credits.

POST /domains/models/capabilities/list/execute

Use a returned models[].id as the model value in Chat Completion.

Request

The catalog requires no capability input. The SDK pins the free direct route automatically.

import { AgentRouterClient } from "@agentrouter/agentrouter";
const client = new AgentRouterClient({
apiKey: process.env.AGENTIC_API_KEY,
});
const catalog = await client.models.catalog.list();
console.log(catalog.modelCount);
console.table(catalog.models.slice(0, 10));

Routing fields

FieldTypeRequiredDescription
routeKeystringnoPin models.list.openrouter. The SDK helper sets this for you.
providerstringnoProvider hint. The direct catalog route uses openrouter.
allowFallbackbooleannoAllow another compatible catalog route. The SDK helper sets false.
optimizationPreferencesstring[]noRoute preferences: cost, speed, reliability, or quality.

Response

{
"success": true,
"routeKey": "models.list.openrouter",
"provider": "openrouter",
"networkKey": "direct",
"creditsCharged": 0,
"modelCount": 459,
"pricingUnit": "credits_per_million_tokens",
"creditsPerUsd": 1000,
"pricingNote": "Catalog prices are estimates; paid execution returns the final charge.",
"models": [
{
"id": "openai/gpt-4.1-nano",
"name": "OpenAI: GPT-4.1 Nano",
"contextLength": 1047576,
"supported_parameters": [
"max_tokens",
"temperature",
"top_p"
],
"agentRouterPricing": {
"inputCreditsPerMillionTokens": 100,
"outputCreditsPerMillionTokens": 400,
"creditsPerUsd": 1000,
"estimateOnly": true
}
}
]
}

Catalog size and model availability change over time. The values above show the response shape, not a permanent model list.

Top-level response fields

FieldTypeDescription
modelCountnumberNumber of models returned now.
modelsobject[]Live catalog entries.
pricingUnitstringcredits_per_million_tokens.
creditsPerUsdnumberCredit conversion. Currently 1000.
creditsChargednumberAlways 0 for this direct catalog route.
routeKeystringRoute that produced the catalog.

Model fields

FieldTypeDescription
idstringExact ID to pass to Chat Completion’s model field.
namestringHuman-readable model name.
descriptionstringProvider description when available.
contextLengthnumberMaximum combined context advertised by the catalog. It is not the maximum output length.
inputModalitiesstring[]Accepted modalities when published.
outputModalitiesstring[]Returned modalities when published.
supported_parametersstring[]Parameters advertised for this model. Check before sending optional fields.
agentRouterPricingobjectEstimated input and output prices in credits per one million tokens.

Select a model safely

const catalog = await client.models.catalog.list();
const model = catalog.models.find(
(candidate) => candidate.id === "openai/gpt-4.1-nano",
);
if (!model) throw new Error("Model is unavailable");
const supportsTemperature =
model.supported_parameters?.includes("temperature") ?? false;

Errors

StatusMeaningFix
401Missing or invalid AgentRouter API keySend Authorization: Bearer aak_....
404Capability or route key is wrongUse models, list, and models.list.openrouter.
5xxCatalog provider or AgentRouter is temporarily unavailableRetry with backoff; do not replace the last known catalog immediately.

Next step

Take models[0].id or another selected ID and pass it to Chat Completion.