/v1/modelsList Models
List the model aliases this API key can request.
OpenAI-compatible model list — every enabled alias your key can call. 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"import os
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
This example illustrates the card shape. Optional limits and prices come from the live catalogue and are omitted here.
{
"object": "list",
"data": [
{
"id": "google/gemma-4-31b-it",
"name": "Gemma 4 31B IT",
"object": "model",
"created": 1759190400,
"owned_by": "Token Factory",
"architecture": {
"modality": "text+image->text",
"input_modalities": ["text", "image"],
"output_modalities": ["text"]
},
"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:
| Field | Meaning |
|---|---|
name | Display name set by the operator, else the id. |
created | Unix time the model was added to the catalogue. |
canonical_slug, hugging_face_id | OpenRouter slug and Hugging Face id, when known. |
description | Short model description. |
context_length | Context window in tokens (OpenRouter name). |
context_window | Same value as context_length. |
max_output | Maximum output tokens (same as top_provider.max_completion_tokens). |
architecture | input_modalities and output_modalities (text, image, audio, video, file, embeddings) and modality ("text+image->text"), plus tokenizer / instruct_type when known. |
top_provider | The model's limits as served (context_length, max_completion_tokens) and is_moderated. It never names a provider. |
supported_parameters | The 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_parameters | Default sampling values (temperature, top_p, top_k, penalties, min_p). |
supported_voices | Voices a text-to-speech model accepts. |
knowledge_cutoff, expiration_date | As published for the model. |
pricing | Your 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:
unit | Models | Fields |
|---|---|---|
token | chat, embeddings | prompt (input token), completion (output token), input_cache_read, input_cache_write (prompt-cache tokens) |
character | text-to-speech | prompt (input character) |
image | image generation | image_output (generated image) |
second | speech-to-text | prompt (second of audio) |
second | video | video_output (second of video) |
document | rerank | prompt (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.