Skip to main content

GET /v1/models

Returns an OpenAI-compatible model list. Used by Cursor’s “Verify” button, Cline, OpenCode, and most clients at startup.

Authentication

  • No API key — returns the full Openference model catalogue (all active, publicly listed models). Useful for clients that sync models during setup before credentials are configured.
  • Valid API key — returns only the models your key and plan are allowed to use (respects model restrictions and your plan).
  • Invalid or expired credentials — returns 401 (same as other API endpoints).
Response shape:
When authenticated, the list is filtered automatically by key model restrictions and your plan’s model pool. Filter models with a case-insensitive substring match on id, display_name, or description:
Search bypasses the edge cache (always fresh).

Context metadata

  • context_length — the model’s total context window in tokens (OpenRouter-style field). Use it to configure your client’s context window setting (e.g. OpenCode limit.context, Cline “Context Window Size”) so the client doesn’t fall back to a small default and compact conversations early. Under dynamic context stacking, input and output share this total budget. For example, GLM-5.2 advertises context_length: 262144 and max_output_tokens: 131072. Shorter outputs allow the input prompt to scale dynamically up to the remaining context window.
  • max_output_tokens — the maximum completion tokens the model supports per response.
Either field may be absent for models where the value is not published.

Pricing

  • pricing.prompt — the model’s per-token price for input (prompt) tokens, as a USD string. Multiply by the usage.prompt_tokens count returned by /v1/chat/completions to get the input cost for a request.
  • pricing.completion — the model’s per-token price for output (completion) tokens, as a USD string. Multiply by usage.completion_tokens for the output cost.
  • pricing.cache_read — when present, the per-token USD price for cached prompt tokens (prompt caching). Omitted for models that do not support prompt caching. When caching is supported but no separate cached rate is configured, this matches pricing.prompt.
These are the same per-token rates the billing system applies when a request falls outside your plan’s included quota (e.g. credit-balance usage), so analytics dashboards that pull token counts from chat completions and the advertised price from /v1/models can compute accurate cost-per-turn and usage graphs. Prices are expressed per-token (not per-million) as a string to match the OpenRouter shape; "0" indicates a free model or a model priced per-image instead of per-token (see architecture.modality for image models).

Reasoning / thinking

Use GET /v1/models to discover which models support reasoning and which effort levels each model accepts. Openference normalizes common client spellings (reasoning_effort, Anthropic thinking, and related fields) to the shape each model expects — you do not need model-specific integration code beyond what your client already sends.

Listing fields

  • reasoning.supportedtrue when the model supports reasoning or extended thinking (including adaptive thinking on models that do not expose effort levels).
  • reasoning.control — when present, how to control thinking for this model:
    • "effort" — send reasoning_effort (see supported_efforts)
    • "toggle" — on/off only (thinking.type, enable_thinking, or reasoning_effort: "none")
    • "adaptive" — MiniMax-style adaptive thinking toggle
    • "always_on" — reasoning always emitted; disable params are ignored
  • reasoning.supported_efforts — when present, the effort levels you can request for that model (e.g. "high", "medium", "low", "max", "xhigh"). Omitted when the model uses always-on reasoning or on/off (adaptive) thinking only — those entries still include "supported": true.
  • display_name — catalog display name when it differs from id.
  • description — short catalog blurb when present.
  • quantization — weight format from catalog (e.g. FP8, BF16).
Always prefer the live listing over static tables: effort sets can differ by model variant (for example DeepSeek Pro vs Flash).

Request parameters

On POST /v1/chat/completions, clients typically control thinking with one or both of: Openference accepts either spelling (or both) and translates to the native fields for the model you selected. If your client sends only reasoning_effort, that is enough for models that advertise effort levels.

Unified reasoning object (OpenRouter-compatible)

Clients built against OpenRouter can send the unified reasoning object instead — it works on every model, in both the Chat Completions and Messages shapes:
  • reasoning.effort — same ladder as reasoning_effort (reasoning_effort is an alias of reasoning.effort; sending both is fine, the explicit effort word wins).
  • reasoning.max_tokens — a token budget for thinking (e.g. 8000), an alternative to an effort level. Mapped to the model’s native budget (budget_tokens / thinking_budget) with the model’s limits clamped in.
  • reasoning.enabledfalse disables thinking (when the model supports a toggle); true alone turns it on at a high default effort.
  • reasoning.excludetrue asks the model to reason at full quality but omit the chain-of-thought from the response: no reasoning_content deltas on chat completions, no thinking blocks on Messages. The upstream still reasons and reasoning tokens are still billed as output. Not yet applied on the /v1/responses endpoint.

Responses

When thinking is active, assistant messages may include a separate reasoning_content field (chain-of-thought) alongside content. Streaming responses emit delta.reasoning_content chunks the same way. For tool-calling conversations on thinking models, include prior assistant reasoning_content on tool-call turns when your client or SDK requires it — the same rule as the official thinking APIs. Reasoning tokens are billed at the model’s output rate (they count toward completion_tokens, not a separate line item).

Flagship models (reference)

Effort levels below match what /v1/models advertises today. Re-fetch the listing after catalog updates. Models without reasoning metadata do not expose thinking controls through the API listing. See also Reasoning on chat completions.