> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meigen.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Models

> Get available AI models and their configurations

```
GET /api/models
```

Returns a list of all active AI models available for generation. Public endpoint, no authentication required.

Every model returned by this endpoint can be used with `POST /api/generate/v2`, including via an API token. Some models are surfaced only on certain MeiGen surfaces (for example, not inside the mobile apps), but that never restricts API access.

## Query Parameters

<ParamField query="media_type" type="string">
  Filter by output type: `image` or `video`. Omit to get both.
</ParamField>

<ParamField query="active" type="string" default="true">
  Pass `false` to include retired models as well. Retired models cannot be used for generation — this is only useful for resolving historical `modelId` values.
</ParamField>

## Response

`{ success: true, models: [...] }`. Each model object contains:

<ResponseField name="id" type="string">
  The unique model identifier. Use this as `modelId` when generating.
</ResponseField>

<ResponseField name="name" type="string">
  Display name.
</ResponseField>

<ResponseField name="provider" type="string">
  Model provider family (e.g. `OpenAI`, `Google`, `ByteDance`, `Midjourney`). Display only — not a request parameter.
</ResponseField>

<ResponseField name="credits_per_generation" type="number">
  A nominal fallback value. **For video models, do not quote it to end users** — derive the real cost from `extra_config.pricingPerSec` × `duration`, or from `extra_config.pricingPerCall[tier][duration]` for Veo 3.1. Always send `duration` explicitly for Veo 3.1: if it is omitted, billing falls back to this nominal value. The authoritative charge is `creditsUsed` in the generate response.
</ResponseField>

<ResponseField name="supported_ratios" type="string[]">
  Aspect ratios accepted by `aspectRatio`. Seedance additionally accepts `"adaptive"`.
</ResponseField>

<ResponseField name="max_reference_images" type="number">
  Maximum number of reference images accepted (`0` means the model does not accept references).
</ResponseField>

<ResponseField name="media_type" type="string">
  `"image"` or `"video"`.
</ResponseField>

<ResponseField name="extra_config" type="object">
  Model-specific configuration. Keys you may rely on:

  | Key                      | Used by                                                          | Description                                                                                                                          |
  | ------------------------ | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
  | `resolutions`            | Image / video                                                    | Allowed values for `resolution` (`"1K"` / `"2K"` / `"3K"` / `"4K"` for image, `"480p"` / `"720p"` / `"1080p"` / `"4k"` for video)    |
  | `tierResolutions`        | Seedance 2.0                                                     | Resolutions actually available in each tier, keyed by tier. Takes precedence over the top-level `resolutions`                        |
  | `tiers`                  | Seedance 2.0 / Veo 3.1                                           | Available tiers, selected via `tier` (Seedance 2.0: `mini` / `fast` / `pro`; Veo 3.1: `fast` / `pro`)                                |
  | `durations`              | Video models                                                     | Allowed values for `duration` (seconds)                                                                                              |
  | `pricingPerSec`          | Seedance 2.0 / Grok Video 1.5 / Happyhorse 1.1 / Agnes Video 2.0 | Per-second rate, keyed by resolution — or by tier then resolution on models that expose tiers                                        |
  | `pricingPerCall`         | Veo 3.1                                                          | Credits per generation, looked up by tier then `duration`. Mutually exclusive with `pricingPerSec`; when present it takes precedence |
  | `pricingPerSecWithVideo` | Seedance 2.0                                                     | Per-second rate with `referenceVideo`, keyed by tier then resolution                                                                 |
  | `minBillableTable`       | Seedance 2.0                                                     | Minimum billable seconds keyed by `duration` (continuation only)                                                                     |

  The pricing-related keys above are part of the contract. Other keys may appear and are informational.
</ResponseField>

## Example

```bash theme={null}
curl https://www.meigen.ai/api/models
```

```json theme={null}
{
  "success": true,
  "models": [
    {
      "id": "gemini-3-pro-image-preview",
      "name": "Nanobanana Pro",
      "provider": "Google",
      "credits_per_generation": 10,
      "supported_ratios": ["1:1", "3:2", "2:3", "16:9", "9:16", "4:3", "3:4", "4:5", "5:4", "21:9"],
      "max_reference_images": 5,
      "media_type": "image",
      "extra_config": {}
    },
    {
      "id": "seedance-2-0",
      "name": "Seedance 2.0",
      "provider": "ByteDance",
      "credits_per_generation": 60,
      "supported_ratios": ["adaptive", "16:9", "4:3", "1:1", "3:4", "9:16", "21:9"],
      "max_reference_images": 2,
      "media_type": "video",
      "extra_config": {
        "tiers": ["mini", "fast", "pro"],
        "resolutions": ["480p", "720p", "1080p"],
        "tierResolutions": {
          "mini": ["480p", "720p"],
          "fast": ["480p", "720p"],
          "pro": ["480p", "720p", "1080p", "4k"]
        },
        "durations": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
      }
    }
  ]
}
```

<Note>
  Example shows two representative models. The live endpoint returns all active models. Responses are cached for 1 hour (plus stale-while-revalidate), so newly added or retired models can take up to an hour to appear.
</Note>
