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. 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:

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.

We use strictly necessary cookies to record your choice and run this site. We do not use cookies for advertising or tracking. See the Cookie Policy.