# Flux 3 Video

Call flux-3-video with POST /v1/videos. Billing is per second and only full renders are supported.

`flux-3-video` is a Black Forest Labs video model. Create a task, then poll it. When it completes, read the returned `url`, or download the video with `GET /v1/videos/{id}/content`.

```http
POST /v1/videos
GET /v1/videos/{task_id}
```

Only full renders are supported. Billing is per second and is the same on the standard and official groups. Omit any field you are not setting. Image and video inputs must be public URLs that stay reachable until the task finishes.

## Pricing

| Resolution | No video input | With video input |
| --- | ---: | ---: |
| 720p | ¥1.32 / second | ¥1.848 / second |
| 1080p | ¥2.112 / second | ¥2.376 / second |

Video input means `input_reference` only. A first frame, last frame, or keyframe in `images` does not change the per-second price.

## Request fields

| Field | Required | Type | Range | Description |
| --- | --- | --- | --- | --- |
| `model` | yes | string | `flux-3-video` | Fixed model ID |
| `prompt` | no | string | — | Scene description. If omitted, provide a first frame or `input_reference` |
| `resolution` | yes | string | `720p`, `1080p`, or width x height | `720p` is 1280x720 and `1080p` is 1920x1080. A width x height value is classified by its short side. Omitted requests use 720p |
| `duration` | yes | integer | 5–20 | Integer seconds. `seconds` may be sent as an integer string instead. Values outside 5–20 are rejected |
| `image` | no | string | — | First frame. Do not send it with `input_reference` |
| `end_frame` | no | string | — | Last frame. Rejected when there is no first frame. Do not send it with `input_reference` |
| `images` | no | array | 1–10 | Keyframes. One image is the start, two images are the start and end, and more images are spaced evenly. Do not send them with `input_reference` |
| `input_reference` | no | string | mp4 | One video to continue. This selects the with-video price. Do not send it with images |
| `aspect_ratio` | no | string | `21:9`, `2:1`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16` | If omitted, the picture decides the ratio |
| `audio` | no | boolean | — | Audio is generated when omitted. Send `false` to disable it |
| `safety_tolerance` | no | integer | 0–4 | Content tolerance |

## Text to video

```bash
curl https://kaienapi.com/v1/videos \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "flux-3-video",
    "prompt": "a red circle moving across a lake",
    "resolution": "720p",
    "duration": 5
  }'
```

Creation returns a task, not the video file:

```json
{
  "id": "task_example",
  "object": "video",
  "model": "flux-3-video",
  "status": "queued"
}
```

## First and last frames

The first item in `images` is the opening frame. The second item is the closing frame.

```bash
curl https://kaienapi.com/v1/videos \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "flux-3-video",
    "prompt": "a smooth transition from the first frame to the last frame",
    "images": [
      "https://example.com/first.jpg",
      "https://example.com/last.jpg"
    ],
    "resolution": "720p",
    "duration": 5
  }'
```

## Polling

Poll with the task ID from the create response. Keep polling while `status` is `queued` or `in_progress`, until it is `completed` or `failed`.

```bash
curl "https://kaienapi.com/v1/videos/$TASK_ID" \
  -H "Authorization: Bearer <YOUR_API_KEY>"
```

Completed response:

```json
{
  "id": "task_example",
  "object": "video",
  "model": "flux-3-video",
  "status": "completed",
  "url": "<file url>"
}
```

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Task ID. Query it with `GET /v1/videos/{id}` |
| `status` | string | `queued`, `in_progress`, `completed`, or `failed` |
| `url` | string | Completed file URL |

The video bytes can also be downloaded:

```bash
curl "https://kaienapi.com/v1/videos/$TASK_ID/content" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  --output result.mp4
```
