---
title: "List Models"
method: GET
path: "/v2/models"
tags: ["Models"]
---

# List Models

`GET /v2/models`

List all supported text generation models with optional filtering.

including pricing, context length, latency, and OpenRouter availability.

**Note:** Image generation models are excluded from this endpoint.

**Examples:**
- Get all models: `/v2/models`
- OpenRouter only: `/v2/models?openrouter_only=true`
- Specific provider: `/v2/models?provider=openai`
- Multiple providers: `/v2/models?provider=openai&provider=anthropic`

**Query Parameters:**
- **provider**: Filter by provider name(s). Can specify multiple times for multiple providers
  (e.g., `?provider=openai&provider=anthropic`)
- **openrouter_only**: Return only models that have OpenRouter support (default: false)

**Returns:**
- **models**: List of active text generation model objects with metadata
- **total**: Total number of active models returned
- **deprecated_models**: List of deprecated text generation model objects with metadata
  (respects the same filters as active models)

**Caching:**
- Response is cacheable for 1 hour (model list rarely changes)

## Query parameters

- `provider` string[], nullable — Filter by provider name(s). Can specify multiple providers (e.g., 'openai', 'anthropic')
- `openrouter_only` boolean — Return only OpenRouter-supported models

## Response `200`

Successful Response

- ModelsListResponse — Response model for GET /v2/models endpoint. Returns a list of all supported text generation models with their metadata, separated into active and deprecated models.
  - `models` ModelResponse[], required — List of active/supported text generation models with their metadata
    - `provider` string, required — Provider name (e.g., 'openai', 'anthropic', 'google')
    - `model` string, required — Model identifier (e.g., 'gpt-4', 'claude-3-opus-20240229')
    - `context_length` integer, required — Maximum context window size in tokens
    - `input_price` number, required — Price per million input tokens in USD
    - `output_price` number, required — Price per million output tokens in USD
    - `openrouter_model` string, nullable — OpenRouter model identifier if available, null if not supported via OpenRouter
  - `total` integer, required — Total count of active models in the response
  - `deprecated_models` ModelResponse[], required — List of deprecated models that are no longer recommended but may still work
    - `provider` string, required — Provider name (e.g., 'openai', 'anthropic', 'google')
    - `model` string, required — Model identifier (e.g., 'gpt-4', 'claude-3-opus-20240229')
    - `context_length` integer, required — Maximum context window size in tokens
    - `input_price` number, required — Price per million input tokens in USD
    - `output_price` number, required — Price per million output tokens in USD
    - `openrouter_model` string, nullable — OpenRouter model identifier if available, null if not supported via OpenRouter

## Other responses

- `422` — Validation Error

## Changes

- **2026-07-26** `bffaa36f5e47` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status

[Change history](https://skmtc.dev/notdiamond/apis/not-diamond-api/changes/v2/models/get.md)

---

[API](https://skmtc.dev/notdiamond/apis/not-diamond-api.md) · [All operations](https://skmtc.dev/notdiamond/apis/not-diamond-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/notdiamond/not-diamond-api/revisions/bffaa36f5e47/schema)
