> For the complete documentation index, see [llms.txt](https://docs.avis.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avis.xyz/api-reference/endpoints/model-list.md).

# Model List

## List AI Models

`GET /api/v1/ai/models`

Returns active user-facing AI models. Use this endpoint to discover valid `model` values for generation requests.

### Query Parameters

| Field              | Type   | Required | Allowed values                                         | Description                                                                                                                 |
| ------------------ | ------ | -------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- |
| `inputModalities`  | string | No       | `text`, `image`, `file`, `video`, `audio`              | Filters to models that support the requested input modality. The backend applies an `$all` match for the provided modality. |
| `outputModalities` | string | No       | `text`, `image`, `file`, `video`, `audio`, `embedding` | Filters to models that support the requested output modality. Use `embedding` for text-vector models.                       |

### Response Fields

Each item is an AI model object.

| Field                                   | Type      | Required | Description                                                                                                             |
| --------------------------------------- | --------- | -------- | ----------------------------------------------------------------------------------------------------------------------- |
| `modelId`                               | string    | Yes      | Stable user-facing model identifier. Pass this value as `model` in generation requests.                                 |
| `name`                                  | string    | No       | Human-readable model name when available.                                                                               |
| `providerIds`                           | string\[] | Yes      | Provider ids where this model is currently available.                                                                   |
| `inputModalities`                       | string\[] | No       | Supported input modalities.                                                                                             |
| `outputModalities`                      | string\[] | No       | Supported output modalities.                                                                                            |
| `isActive`                              | boolean   | Yes      | Whether the model can currently be used for automatic generation routing. The list endpoint only returns active models. |
| `revision`                              | number    | Yes      | Model revision number.                                                                                                  |
| `capabilities`                          | object    | No       | Effective capability for the default (priority-winning) provider. Absent means unconstrained.                           |
| `capabilities.text.supportedParameters` | string\[] | No       | For text models: accepted generation parameters, e.g. `["maxTokens","temperature","topP","tools","thinking"]`.          |
| `capabilities.params`                   | object    | No       | Per-parameter bounds/constraints keyed by request field name.                                                           |
| `capabilities.inputs`                   | object    | No       | Accepted content-part inputs (roles, media types, limits).                                                              |
| `capabilities.strictParams`             | boolean   | No       | When true, unsupported gated params are rejected.                                                                       |
| `createdAt`                             | string    | No       | ISO timestamp added by Mongo timestamps when present in serialized output.                                              |
| `updatedAt`                             | string    | No       | ISO timestamp added by Mongo timestamps when present in serialized output.                                              |

### `capabilities.params` Value Shapes

For image and video models, `capabilities.params` (nested under `capabilities.image.params` or `capabilities.video.params`) is the source of truth for what a field like `duration`, `resolution`, or `ratio` accepts **for that specific model**. These vary per model — for example `duration` is `4-15s` on `dreamina-seedance-2-0-fast`, `2-12s` on `seedance-1-0-pro`, and only the exact values `6s`/`10s` on `hailuo-2-3`. Sending a value outside the selected model's range returns `400`. Always read this per model instead of hardcoding one model's limits in your app.

Each entry under `params` has a `type` that determines its extra fields:

| `type`  | Extra fields                                          | Meaning                                                                                                                                                            |
| ------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `enum`  | `values: string[] \| number[]`, `default?`            | Value must be one of `values` — numeric for a fixed discrete set (e.g. PixVerse's legacy `duration`, which only accepts exactly `5`/`8`/`10`, not values between). |
| `range` | `min`, `max`, `default?`, `unit?`, `steps?: number[]` | Value must be a number between `min` and `max`. When `steps` is present, only those exact values are valid — it is not a continuous range.                         |
| `int`   | `min`, `max`, `default?`                              | Value must be an integer between `min` and `max`.                                                                                                                  |
| `bool`  | `default?`                                            | Value must be `true` or `false`.                                                                                                                                   |

Example, `duration` on `dreamina-seedance-2-0-fast` (any value 4-15 is valid):

```json
"duration": { "type": "range", "min": 4, "max": 15, "default": 5, "unit": "s" }
```

Example, `duration` on `hailuo-2-3` (only `6` or `10` are valid, not values in between):

```json
"duration": { "type": "range", "min": 6, "max": 10, "steps": [6, 10], "unit": "s" }
```

Example, `duration` on PixVerse's legacy models (`pixverse-v5-6`, `pixverse-v3-5`, etc. — only exactly `5`, `8`, or `10` are valid; this is a true fixed set, not a continuum, so it uses `type: "enum"` with numeric `values` instead of `range` + `steps`):

```json
"duration": { "type": "enum", "values": [5, 8, 10], "default": 5, "unit": "s" }
```

Before submitting a video or image generation request, look up the target model's capabilities and read `capabilities.video.params.duration` (or `.resolution`, `.ratio`, etc.), then validate the user's input against it client-side — do not assume one model's allowed duration/resolution/ratio applies to another model.

### Get a Single Model

`GET /api/v1/ai/models/:modelId`

The direct way to check one model's capabilities — pass the exact `modelId` (from the list endpoint or from an earlier generation response) as a path parameter and get back that one model, including its full `capabilities` object. This avoids fetching the entire catalog just to read one model's params.

| Field            | Type   | Required | Description                                                        |
| ---------------- | ------ | -------- | ------------------------------------------------------------------ |
| `modelId` (path) | string | Yes      | The model to look up. `404` if it does not exist or is not active. |

Response shape is the same single model object described in Response Fields above.

```bash
curl "$BASE_URL/api/v1/ai/models/dreamina-seedance-2-0-fast"
```

Read `capabilities.video.params.duration` from the response to get that model's exact allowed duration — this is the check to run whenever the user switches models in your UI.

### Examples

List text models:

```bash
curl "$BASE_URL/api/v1/ai/models?inputModalities=text&outputModalities=text"
```

List image generation models:

```bash
curl "$BASE_URL/api/v1/ai/models?inputModalities=text&outputModalities=image"
```

List video generation models:

```bash
curl "$BASE_URL/api/v1/ai/models?inputModalities=text&outputModalities=video"
```

List audio generation models:

```bash
curl "$BASE_URL/api/v1/ai/models?inputModalities=text&outputModalities=audio"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.avis.xyz/api-reference/endpoints/model-list.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
