Generate short video clips from text prompts using OpenDunes video models.
OpenDunes generates video through a dedicated asynchronous endpoint. You submit a prompt, get a job back immediately, and poll until the clip is ready. Video rendering takes longer than a single request, so it runs as a background job rather than a blocking call.
POST https://opendunes.com/v1/videos| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | A video model slug, from GET /v1/videos/models |
prompt | string | Yes, unless a picture is the whole input | Text description of the clip to generate. A model that starts from frame_images or input_references may take none |
duration | integer | No | Seconds of video — the biggest lever on the bill. The lengths a model takes are its supported_durations |
resolution · aspect_ratio · size · generate_audio · seed · frame_images · input_references · provider | — | No | The model's own parameters, sent as you write them |
curl https://opendunes.com/v1/videos \
-H "Authorization: Bearer $OPENDUNES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/veo-3.1",
"prompt": "A slow aerial pan over golden Saharan dunes at sunset, cinematic.",
"duration": 6
}'The endpoint responds 202 Accepted with a job id and its polling URL. Submitting charges nothing and holds nothing from your balance:
{
"id": "019383ab-1234-7000-a000-000000000001",
"polling_url": "https://opendunes.com/v1/videos/019383ab-1234-7000-a000-000000000001",
"status": "pending"
}A duration that is not a whole number of seconds is a 400 naming duration, and nothing is submitted.
GET https://opendunes.com/v1/videos/{id}Poll the job until status is terminal. Polling is free. On completed, the response names the clip twice: unsigned_urls holds one download link per clip, and file_ids holds the id of the same clip in Files:
{
"id": "019383ab-1234-7000-a000-000000000001",
"status": "completed",
"unsigned_urls": [
"https://opendunes.com/v1/videos/019383ab-1234-7000-a000-000000000001/content?index=0"
],
"file_ids": [
"019383ac-5678-7000-b000-000000000002"
]
}status moves through pending → in_progress → completed, or ends failed, cancelled or expired. A failed job carries an error with the reason.
A key with storage switched off keeps nothing it gets back, so its completed job carries no file_ids. The download link still works.
GET https://opendunes.com/v1/videos/{id}/content?index=0Send the same Authorization header. The response is the clip itself, video/mp4, served from OpenDunes storage. The link does not expire and the clip is kept until you delete it, so download it whenever you need it. Downloading is free, every time.
curl https://opendunes.com/v1/videos/019383ab-1234-7000-a000-000000000001/content?index=0 \
-H "Authorization: Bearer $OPENDUNES_API_KEY" \
-o clip.mp4| Status | Meaning |
|---|---|
200 | The clip |
404 | Unknown job, someone else's job, a job not completed yet, or an index other than 0 |
503 | The clip could not be fetched this time. Try again shortly |
Video is billed in DA per second of generated video. Nothing is charged at submission: the wallet moves once, when the job completes. A failed or timed-out job charges nothing.
curl https://opendunes.com/v1/videos/models \
-H "Authorization: Bearer $OPENDUNES_API_KEY"Each model carries what it takes: supported_durations, supported_resolutions, supported_aspect_ratios, supported_sizes, supported_frame_images, generate_audio, seed and allowed_passthrough_parameters, with its prices in DA. The reference lists every field.