GET/v1/models

List Models

List the model aliases this API key can request.

OpenAI-compatible model list — every enabled alias your key can call, rerank and video included. Each entry is a model card: a standard OpenAI model object that is also a valid OpenRouter /api/v1/models entry, so OpenAI SDKs and OpenRouter-style tooling (model pickers, cost estimators) both read it.

curl https://api.<domain>/v1/models \
  -H "Authorization: Bearer $TOKENFACTORY_API_KEY"
from openai import OpenAI

client = OpenAI(
    base_url="https://api.<domain>/v1",
    api_key=os.environ["TOKENFACTORY_API_KEY"],
)

models = client.models.list()
print([m.id for m in models.data])

Response

{
  "object": "list",
  "data": [
    {
      "id": "anthropic/claude-sonnet-4.5",
      "canonical_slug": "anthropic/claude-sonnet-4.5-20250929",
      "name": "Claude Sonnet 4.5",
      "object": "model",
      "created": 1759190400,
      "owned_by": "Token Factory",
      "description": "Anthropic's balanced model for coding and agents.",
      "context_length": 200000,
      "context_window": 200000,
      "max_output": 64000,
      "architecture": {
        "modality": "text+image->text",
        "input_modalities": ["text", "image"],
        "output_modalities": ["text"],
        "tokenizer": "Claude"
      },
      "pricing": {
        "unit": "token",
        "prompt": "0.000003",
        "completion": "0.000015",
        "input_cache_read": "0.0000003",
        "input_cache_write": "0.00000375"
      },
      "top_provider": { "context_length": 200000, "max_completion_tokens": 64000, "is_moderated": false },
      "supported_parameters": ["max_tokens", "stop", "temperature", "tool_choice", "tools", "top_p"],
      "default_parameters": { "temperature": 1 },
      "knowledge_cutoff": "2025-01-31"
    },
    {
      "id": "openai/whisper-1",
      "name": "openai/whisper-1",
      "object": "model",
      "created": 1756684800,
      "owned_by": "Token Factory",
      "architecture": { "modality": "audio->text", "input_modalities": ["audio"], "output_modalities": ["text"] },
      "pricing": { "unit": "second", "prompt": "0.0001" },
      "top_provider": { "is_moderated": false }
    }
  ]
}

id, object, created and owned_by are the standard OpenAI fields. name, architecture and top_provider are always present; every other field is omitted when the catalogue has no value for that model:

FieldMeaning
nameDisplay name set by the operator, else the id.
createdUnix time the model was added to the catalogue.
canonical_slug, hugging_face_idOpenRouter slug and Hugging Face id, when known.
descriptionShort model description.
context_lengthContext window in tokens (OpenRouter name).
context_windowSame value as context_length.
max_outputMaximum output tokens (same as top_provider.max_completion_tokens).
architectureinput_modalities and output_modalities (text, image, audio, video, file, embeddings) and modality ("text+image->text"), plus tokenizer / instruct_type when known.
top_providerThe model's limits as served (context_length, max_completion_tokens) and is_moderated. It never names a provider.
supported_parametersThe list the operator set for the model, if any. Otherwise, for chat models: max_tokens, plus stop, temperature, top_p unless it is a reasoning model; tool-capable models add tools, tool_choice; reasoning models add reasoning; JSON-mode models add response_format; structured-output models add response_format, structured_outputs. Other parameters are still accepted and passed through.
default_parametersDefault sampling values (temperature, top_p, top_k, penalties, min_p).
supported_voicesVoices a text-to-speech model accepts.
knowledge_cutoff, expiration_dateAs published for the model.
pricingYour price for your key's billing region — exactly what you are billed. See below.

Pricing

Every price is a decimal string in USD per one unit (OpenRouter's format). unit says what the unit is:

unitModelsFields
tokenchat, embeddingsprompt (input token), completion (output token), input_cache_read, input_cache_write (prompt-cache tokens)
charactertext-to-speechprompt (input character)
imageimage generationimage_output (generated image)
secondspeech-to-textprompt (second of audio)
secondvideovideo_output (second of video)
documentrerankprompt (document)

A field appears only when the model has that price: an embedding model has no completion, and when input_cache_read / input_cache_write are absent, cached tokens are billed at prompt.

Note

A model without pricing has an unknown price, not a free one — it has no price yet, or the gateway is still loading prices after a restart. Retry later.

Every id is a valid model value for other endpoints.

Deprecation markers are not surfaced in this list — a deprecated alias appears here until its sunset. Watch for provider_metadata.deprecation / X-TF-Deprecation on responses (lifecycle: Models & Aliases).

Errors

Standard error surface (401, 403, 429, 502, 503) — see Errors.