# Models API (/docs/models-api)


List Models [#list-models]

```
GET /v1/models
```

Returns all available models with their metadata.

Query Parameters [#query-parameters]

| Parameter    | Type   | Description                                                                 |
| ------------ | ------ | --------------------------------------------------------------------------- |
| `provider`   | string | Filter by provider (e.g., `openai`)                                         |
| `type`       | string | Filter by type: `chat`, `image_generation`, `embedding`, etc.               |
| `capability` | string | Filter by capability: `streaming`, `vision`, `thinking`, `function_calling` |

Response [#response]

```json
{
  "object": "list",
  "data": [
    {
      "id": "model-id",
      "object": "model",
      "created": 1709251200,
      "owned_by": "provider",
      "provider": "provider",
      "model_type": "chat",
      "display_name": "Model Name",
      "context_length": 0,
      "max_output_tokens": 0,
      "capabilities": ["chat", "streaming", "vision", "function_calling"],
      "input_price": 0.00,
      "output_price": 0.00,
      "pricing_unit": "per_million_tokens",
      "min_tier": "free"
    }
  ]
}
```

Get Model [#get-model]

```
GET /v1/models/{model_id}
```

Retrieve details for a specific model.

Examples [#examples]

List All Chat Models [#list-all-chat-models]

```python
models = client.models.list()

for model in models.data:
    print(f"{model.id} ({model.owned_by})")
```

Filter by Provider [#filter-by-provider]

```bash
curl "https://api.yuhuanstudio.com/v1/models?provider=anthropic" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Filter by Capability [#filter-by-capability]

```bash
curl "https://api.yuhuanstudio.com/v1/models?capability=thinking" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Model Properties [#model-properties]

| Property            | Type    | Description                                                                 |
| ------------------- | ------- | --------------------------------------------------------------------------- |
| `id`                | string  | Unique model identifier                                                     |
| `provider`          | string  | Provider name                                                               |
| `model_type`        | string  | Model type category                                                         |
| `display_name`      | string  | Human-readable name                                                         |
| `context_length`    | integer | Maximum input context window (varies by model)                              |
| `max_output_tokens` | integer | Maximum output tokens (varies by model)                                     |
| `capabilities`      | array   | List of capabilities                                                        |
| `input_price`       | number  | Input token price (check dashboard for current rates)                       |
| `output_price`      | number  | Output token price (check dashboard for current rates)                      |
| `min_tier`          | string  | Minimum subscription tier required: `free`, `basic`, `pro`, or `enterprise` |

Model Types [#model-types]

| Type                  | Description                  |
| --------------------- | ---------------------------- |
| `chat`                | Text generation / chat       |
| `embedding`           | Text embeddings              |
| `image_generation`    | Image creation               |
| `audio_speech`        | Text-to-speech               |
| `audio_transcription` | Speech-to-text               |
| `video_generation`    | Video creation               |
| `music_generation`    | Music creation               |
| `3d_generation`       | 3D object creation           |
| `realtime`            | Realtime audio communication |

Dynamic Model Registry [#dynamic-model-registry]

<Callout>
  Yunxin automatically syncs models from all configured providers. New models are available as soon as providers release them — no platform updates required.
</Callout>

Models can also be configured manually via `models.yaml` for custom deployments or custom pricing overrides.
