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

# Video generation API

## Before you start

Sign in to LuluLab and get a luk- API key from My Keys. Store it on your server. All examples call [https://customer.lululab.ai](https://customer.lululab.ai) and send the raw key in the Authorization header. [Get an API key](https://www.lululab.ai/keys)

Generation is asynchronous: POST /tasks returns a job id, then GET /tasks/\{id} provides status and output. You can call POST /billing/estimates before submitting to estimate credits.

Use VideoGenV2 for text-to-video and reference-based generation. Images, videos, and audio may be supplied where supported. Duration, ratio, resolution, and reference limits depend on the model.

### From prompt to finished video

Describe the subject, action, camera, and duration. Save the returned job id and poll its status. Read the video from output only after Succeeded. Video generation usually takes longer than image generation, so show a processing state in your app.

### Main request fields

| Field / type | Required | Values and description |
| - | - | - |
| `input.taskType` (`string`) | No | reference · First-batch generation mode; the workflow defaults to reference when omitted. |
| `input.model` (`string`) | Yes | seedance-2-mini · seedance-2-fast · seedance-2-5-flash · seedance-2 · seedance-2-5 · minimax-h3 · google-veo · grok-imagine-1-5-preview · wan-3 · Video model ID; see the model matrix for durations, resolutions, and ratios. |
| `input.prompt` (`string`) | Yes | Describe content, movement, camera, and audio; cannot be empty. |
| `input.duration` (`number`) | Yes | Duration in seconds within the selected model range. |
| `input.aspectRatio` (`string`) | Yes | Target aspect ratio; model-specific values are listed below. |
| `input.resolution` (`string`) | Yes | Target resolution; model-specific values are listed below. |
| `input.generateAudio` (`boolean`) | No | true · false · Whether to generate audio; defaults to true when omitted, subject to model capability. |
| `input.referenceImages` (`array<MediaReference>`) | No | Reference images; each item includes url and mimeType. |
| `input.referenceVideos` (`array<MediaReference>`) | No | Reference videos where supported; model limits apply. |
| `input.referenceAudios` (`array<MediaReference>`) | No | Reference audio files; model limits apply. |

### Video model parameter combinations

Duration, resolution, and ratio must all be supported by the same model. This matrix reflects the current creation UI.

| Model ID | Resolution | Aspect ratios | Duration |
| - | - | - | - |
| `seedance-2-mini` | 720p, 480p | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 4–15s |
| `seedance-2-fast` | 720p, 480p | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 4–15s |
| `seedance-2-5-flash` | 720p, 480p | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 4–30s |
| `seedance-2` | 720p, 480p | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 4–15s |
| `seedance-2-5` | 720p, 480p, 1080p | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 4–30s |
| `minimax-h3` | 720p, 1440p | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 4–15s |
| `google-veo` | 720p, 1080p | 9:16, 16:9 | 8s |
| `grok-imagine-1-5-preview` | 720p, 480p | 16:9, 9:16, 1:1 | 1–15s |
| `wan-3` | 720p, 480p, 1080p | 9:16, 16:9, 1:1, 3:4, 4:3 | 2–30s |

```bash Video generation request theme={null}
curl -X POST https://customer.lululab.ai/tasks \
  -H "Authorization: $LULULAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workflowId": "VideoGenV2",
    "input": {
      "taskType": "reference",
      "model": "seedance-2-mini",
      "prompt": "A cinematic close-up of a ceramic cup on a table",
      "aspectRatio": "9:16",
      "resolution": "480p",
      "duration": 5,
      "generateAudio": true,
      "referenceImages": []
    },
    "attributes": { "saveGeneratedAssets": true, "creationSource": "api" }
  }'
```

> [!NOTE]
>
> The model settings shown are examples. Check current model combinations in the creation UI, then use /billing/estimates to estimate credits.

* [Upload reference assets](https://docs.lululab.ai/uploads.md)
* [Get task results and troubleshoot](https://docs.lululab.ai/task-results.md)
* [API reference](https://docs.lululab.ai/reference.md)


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