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

# Video Generation API

> Generate short videos from text prompts, or from a starting image, with the video model of your choice, and get each clip as a file link with its size, length, the exact model version, its maker, the options used and the exact cost of the job. You pay exactly what each video costs at the model's own rates.

`POST /v1/data/ai/videos/run`

**Pricing:** Metered: you pay exactly each call's cost at the selected model's rates (default Google: Veo 3.1 Lite: the model's own rate).

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**prompts** `string[]` *required*

What happens in the video, one prompt per line. Each prompt is one video, one job and one row.

**model** `string` (default: google/veo-3.1-lite)

The video model. Pick from the list (popular models first). Each model shows its own rates, mostly per second of video at each resolution, and that is exactly what each video costs.

29 allowed values, for example `google/veo-3.1-lite` (Google: Veo 3.1 Lite), `google/veo-3.1-fast` (Google: Veo 3.1 Fast), `google/veo-3.1` (Google: Veo 3.1), `kwaivgi/kling-v3.0-pro` (Kling: Video v3.0 Pro), `kwaivgi/kling-v3.0-std` (Kling: Video v3.0 Standard), `bytedance/seedance-2.5-flash` (ByteDance: Seedance 2.5 Flash), `bytedance/seedance-2.0-mini` (ByteDance: Seedance 2.0 Mini), `alibaba/wan-3.0-prime` (Alibaba: Wan 3.0 Prime), `minimax/hailuo-3-max` (MiniMax: H3 Max), `runway/gen-4.5` (Runway: Gen-4.5). Fetch the full list with `GET /v1/data/ai/videos?expand=options`.

**duration** `integer`

The clip length in seconds. Leave blank for the model's default. Only the lengths the selected model offers are accepted.

31 allowed values, for example `-1` (-1 seconds), `1` (1 seconds), `2` (2 seconds), `3` (3 seconds), `4` (4 seconds), `5` (5 seconds), `6` (6 seconds), `7` (7 seconds), `8` (8 seconds), `9` (9 seconds). Fetch the full list with `GET /v1/data/ai/videos?expand=options`.

**resolution** `string`

The video resolution, e.g. 480p or 720p. Leave blank for the model's default.

Allowed values: `360p`, `480p`, `720p`, `768p`, `1080p`, `2K`, `4K`.

**aspectRatio** `string`

The frame shape, e.g. 16:9 or 9:16. Leave blank for the model's default.

Allowed values: `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`, `9:21`, `3:2`, `2:3`, `5:2`, `2:1`.

**startImage** `string`

Optional public image URL used as the first frame, for image-to-video models. The same image starts every prompt's video.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/ai/videos/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "prompts": [
      "A paper boat drifting on a calm pond"
    ],
    "model": "x-ai/grok-imagine-video-1.5-lite",
    "duration": 1,
    "resolution": "480p",
    "aspectRatio": "16:9"
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/ai/videos/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "prompts": [
        "A paper boat drifting on a calm pond"
    ],
    "model": "x-ai/grok-imagine-video-1.5-lite",
    "duration": 1,
    "resolution": "480p",
    "aspectRatio": "16:9"
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/ai/videos/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "prompts": [
    "A paper boat drifting on a calm pond"
  ],
  "model": "x-ai/grok-imagine-video-1.5-lite",
  "duration": 1,
  "resolution": "480p",
  "aspectRatio": "16:9"
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one video, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `id` | ID | text |
| `prompt` | Prompt | text |
| `startImage` | Start Image | text |
| `fileUrl` | File URL | text |
| `mimeType` | MIME Type | text |
| `width` | Width | number |
| `height` | Height | number |
| `durationSeconds` | Duration (Seconds) | number |
| `model` | Model | text |
| `provider` | Provider | text |
| `duration` | Requested Duration | number |
| `resolution` | Resolution | text |
| `aspectRatio` | Aspect Ratio | text |
| `costUsd` | Cost (USD) | number |
| `error` | Error | text |
| `createdAt` | Created At | datetime |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "ai/videos",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "resolution": "480p",
      "mimeType": "video/mp4",
      "fileUrl": "https://api-staging.mindcase.co/api/v1/files/2026/11/09/3020936c82384fbcb986e68b0ff619222578cbd0.mp4",
      "provider": "SpaceXAI",
      "error": null,
      "aspectRatio": "16:9",
      "model": "x-ai/grok-imagine-video-1.5-lite-20261001",
      "id": "gen-vid-1794263035-Gicyi5hA2XUwYEzHPIEU",
      "prompt": "A paper boat drifting on a calm pond",
      "height": 480,
      "width": 848,
      "costUsd": 0.02,
      "durationSeconds": 1.042,
      "createdAt": "2026-11-09T22:24:28Z",
      "duration": 1,
      "startImage": null
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.