# AI Video Generation API

> Text-to-video and image-to-video through one API and one credit balance: 28 models, priced per clip by model, resolution and length.

- Canonical page: https://www.autofeed.ai/video-api/ai-video
- API reference: https://www.autofeed.ai/docs/api
- Publisher: AutoFeed.ai (https://www.autofeed.ai)

One endpoint for 28 text-to-video and image-to-video models. Choose a model, a length and a resolution; the clip price is fixed per combination and charged in credits.

- 28 models, each with its own lengths, resolutions and aspect ratios
- Text to video, or image to video from an https image URL
- Combinations a model does not support are rejected before any charge
- No watermark on the output

## Example request

Costs 1,000 credits, the same as in the dashboard.

```bash
curl -X POST https://www.autofeed.ai/api/v1/videos \
  -H "Authorization: Bearer $AUTOFEED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "ai_video",
    "input": {
      "model": "Wan 3.0",
      "mode": "text_to_video",
      "textPrompt": "A slow dolly shot through a neon-lit night market in the rain, steam rising from food stalls",
      "duration": 5,
      "resolution": "720p",
      "format": "9:16"
    },
    "webhookUrl": "https://example.com/webhooks/autofeed",
    "idempotencyKey": "order-1042-ai-video"
  }'
```

202 Accepted:

```json
{
  "id": "1c9d6c3e-1f5b-4d2e-9c31-2b8b0f0f9a11",
  "type": "ai_video",
  "status": "processing",
  "costInCredits": 1000,
  "createdAt": "2026-11-02T12:00:00.000Z"
}
```

`video.completed` webhook body:

```json
{
  "id": "1c9d6c3e-1f5b-4d2e-9c31-2b8b0f0f9a11",
  "type": "ai_video",
  "status": "completed",
  "error": null,
  "costInCredits": 1000,
  "createdAt": "2026-11-02T12:00:00.000Z",
  "completedAt": "2026-11-02T12:03:41.000Z",
  "url": "https://.../1c9d6c3e-1f5b-4d2e-9c31-2b8b0f0f9a11.mp4"
}
```

## Input fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `model` (required) | one of 28 values | - | The model label, exactly as listed in the table below. |
| `mode` (required) | "text_to_video" \| "image_to_video" | - | "text_to_video" or "image_to_video". Not every model supports both. |
| `textPrompt` (required) | string (max 5000) | - |  |
| `imageUrl` | string (max 2048) | - | Required for image_to_video, rejected for text_to_video. A public https URL. |
| `duration` (required) | integer > 0 | - | Seconds. Must be one of the model's own lengths. |
| `resolution` (required) | string (max 32) | - | Must be one of the model's own resolutions. |
| `format` | "9:16" \| "16:9" \| "1:1" | - | Defaults to the model's first supported ratio. |

## Models

| Model | Modes | Lengths | Resolutions | Formats | From (credits) |
|---|---|---|---|---|---|
| Google Veo 3.1 Fast | text, image | 4s, 6s, 8s | 720p, 1080p | 9:16, 16:9 | 2400 |
| Google Veo 3.1 | text, image | 4s, 6s, 8s | 720p, 1080p | 9:16, 16:9 | 6400 |
| Google Veo 3.1 Lite | text, image | 4s, 6s, 8s | 720p, 1080p | 9:16, 16:9 | 800 |
| Kling 3.0 | text, image | 5s, 10s | standard, pro | 9:16, 16:9, 1:1 | 3360 |
| Kling 2.6 | text, image | 5s, 10s | 1080p | 9:16, 16:9, 1:1 | 2800 |
| Kling 2.5 Turbo Pro | text, image | 5s, 10s | 1080p | 9:16, 16:9, 1:1 | 1400 |
| Seedance 2.0 | text, image | 5s, 10s | 720p, 1080p | 9:16, 16:9, 1:1 | 3600 |
| Seedance 2.0 Fast | text, image | 5s, 10s | 720p, 480p | 9:16, 16:9, 1:1 | 1400 |
| Seedance 1 Pro | text, image | 5s, 10s | 720p, 1080p | 9:16, 16:9, 1:1 | 1200 |
| Seedance 1 Pro Fast | text, image | 5s, 10s | 720p, 1080p | 9:16, 16:9, 1:1 | 500 |
| Seedance 1 Lite | text, image | 5s, 10s | 720p, 1080p | 9:16, 16:9, 1:1 | 720 |
| Hailuo 2.3 | text, image | 6s, 10s | 768p, 1080p | 16:9 | 1120 |
| Hailuo 2.3 Fast | image | 6s, 10s | 768p, 1080p | 16:9 | 760 |
| Hailuo 02 | text, image | 6s, 10s | 768p, 1080p | 16:9 | 1080 |
| Hailuo 02 Fast | image | 6s, 10s | 512p | 16:9 | 400 |
| Runway Gen-4.5 | text, image | 5s, 10s | 720p | 9:16, 16:9, 1:1 | 2400 |
| Grok Imagine Video | text, image | 5s, 10s | 720p | 9:16, 16:9, 1:1 | 1000 |
| Grok Imagine Video 1.5 | image | 5s, 10s | 720p | 9:16, 16:9, 1:1 | 1600 |
| Vidu Q3 Pro | text, image | 5s, 10s | 720p, 1080p | 9:16, 16:9, 1:1 | 3000 |
| Vidu Q3 Turbo | text, image | 5s, 10s | 720p, 1080p | 9:16, 16:9, 1:1 | 1200 |
| PixVerse v6 | text, image | 5s, 8s, 10s | 720p, 1080p | 9:16, 16:9, 1:1 | 1800 |
| PixVerse v5 | text, image | 5s, 8s | 720p, 1080p | 9:16, 16:9, 1:1 | 1600 |
| Luma Ray 3.2 | text, image | 5s | 720p, 1080p | 9:16, 16:9, 1:1 | 1200 |
| Wan 3.0 | text, image | 5s, 10s | 720p, 1080p | 9:16, 16:9, 1:1 | 1000 |
| Wan Video 2.2 T2V Fast | text | 5s | 720p | 9:16, 16:9 | 400 |
| Wan Video 2.2 I2V Fast | image | 5s | 720p | 9:16, 16:9 | 400 |
| LTX-2.3 Pro | text, image | 6s, 8s, 10s | 1080p | 9:16, 16:9 | 1920 |
| LTX-2.5 Fast | text, image | 6s, 8s, 10s | 720p, 1080p | 9:16, 16:9 | 720 |

Included with Ultimate. Rendered files are kept for 14 days.

## Frequently asked questions

### What happens if I ask for a length a model does not offer?

You get a 400 that names the field and lists the values the model does support. Nothing is charged and no job is queued.

### Why do models cost different amounts?

Each model, resolution and length has its own credit price, the same one the dashboard charges. The table on this page is generated from that price list.

### How is an AI video clip billed?

From the same credit balance as the dashboard, at the same price per video. The cost is in the 202 response before any work starts, and a failed render refunds it.
