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

# Models

> List available models and choose the right one for each use case.

Use `GET /v2/models` to list the models available to your project and choose the right one without guesswork.

```text theme={null}
GET https://api.getimg.ai/v2/models
```

## What this endpoint returns

The models endpoint returns the image and video models available to your authenticated project. Use it when you need to:

* discover current model IDs
* separate image models from video models
* avoid hardcoding outdated model lists in your integration

## List models

<CodeGroup>
  ```javascript Node.js theme={null}
  import GetimgAI from "getimg-ai";

  const client = new GetimgAI();

  const models = await client.models.list();
  console.log(models);
  ```

  ```python Python theme={null}
  from getimg import GetimgAI

  client = GetimgAI()

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

  ```bash cURL theme={null}
  curl https://api.getimg.ai/v2/models \
    -H "Authorization: Bearer $GETIMG_API_KEY"
  ```
</CodeGroup>

## Filter by type

Use the optional `type` query parameter when you only want one category.

<CodeGroup>
  ```javascript Node.js theme={null}
  import GetimgAI from "getimg-ai";

  const client = new GetimgAI();

  const videoModels = await client.models.list({ type: "video" });
  console.log(videoModels);
  ```

  ```python Python theme={null}
  from getimg import GetimgAI

  client = GetimgAI()

  video_models = client.models.list(type="video")
  print(video_models)
  ```

  ```bash cURL theme={null}
  curl "https://api.getimg.ai/v2/models?type=video" \
    -H "Authorization: Bearer $GETIMG_API_KEY"
  ```
</CodeGroup>

Use `type=image` for image models and `type=video` for video models.

## Image vs video models

Choose the model type based on the generation type:

* Image models are for `POST /v2/images/generations`
* Video models are for `POST /v2/videos/generations`

The available parameters and supported options can differ by model. Supported aspect ratios, resolutions, durations, sound, and image roles all depend on the model you choose.

## How to choose a model

Start with these checks:

* generation type: image or video
* input shape: prompt only, reference image, first frame, or last frame
* output needs: aspect ratio, resolution, duration, and sound

If your integration depends on a specific capability, fetch the current model list and validate the model before you submit a generation. That keeps your production flow stable as model availability changes.

## Where to check current availability

Use one of these sources:

* `GET /v2/models` in your integration
* the [Models](https://getimg.ai/app/developer/models) page in the dashboard

Avoid documenting or hardcoding a fixed model list in user-facing content. Model availability can change.

## Related pages

* [Quickstart](/guides/quickstart)
* [Generate images](/guides/generate-images)
* [Generate videos](/guides/generate-videos)
