# Wandura Ref 1.0: a drop-in for the video task API

> **TL;DR**: a tool that already calls the standard video-task API (`POST /api/v3/contents/generations/tasks`) changes three things: the base URL to `https://api.wandura.ai`, the key to a Wandura key, and `model` to `wandura-ref-1-0`. Everything else stays: the same request shape it sends today, the same `{"id"}` answer, the same task object on `GET` and on `callback_url`. Wandura decides how each video is made. A request it does not make yet is refused, free, with the code `UnsupportedRequest`: send that one to the model you used before. You pay per second of video by resolution (less your org's partner price, if it has one). Failed, refused and timed-out tasks are free.

```mermaid
sequenceDiagram
  participant T as Your tool
  participant W as api.wandura.ai
  T->>W: POST /api/v3/contents/generations/tasks (model wandura-ref-1-0)
  W-->>T: 200 with the task id (or 400 UnsupportedRequest, then use your old model)
  Note over W: holds a ceiling price, makes the video
  W->>T: POST to your callback_url when the task ends (signed task object)
  T->>W: GET /api/v3/contents/generations/tasks/ID
  W-->>T: task object (status, content.video_url, wandura block)
```

## What changes
|  | Today | With Wandura |
|---|---|---|
| Base URL | The host you call today | `https://api.wandura.ai` (the path stays `/api/v3/contents/generations/tasks`) |
| Key | Your current key | `Authorization: Bearer wdr_live_…` (or `wdr_test_…` to test for free) |
| `model` | The model name you send today | `wandura-ref-1-0` |

Nothing else changes: the body, the `{"id"}` answer, the task object and the statuses keep their shape.

- **Keys.** An App key from the [console](https://open.wandura.ai) works, including a key limited to some styles. A creative team can instead get a key on its org's **UA wallet** (the wallet the org set aside for making ads; UA = user acquisition). Wandura makes UA wallet keys: ask your Wandura contact. A UA wallet key works only on this page's two paths. Everywhere else it gets `403 key_scope` (see [Errors](https://docs.wandura.ai/developers/api-v2/errors#key-scope)).
- **One model name.** `model` is always `wandura-ref-1-0`, in what you send and in every answer. Wandura picks how to make each video underneath.
- **No mark.** Videos made here never carry the "Made with Wandura.ai" mark.

| Endpoint | What it does |
|---|---|
| `POST /api/v3/contents/generations/tasks` | Create a task. Answers `{"id": "…"}`. |
| `GET /api/v3/contents/generations/tasks/{id}` | The task object. The same JSON is POSTed to your `callback_url`. |
| `DELETE /api/v3/contents/generations/tasks/{id}` | Cancel the task. Answers the task object. See [Deadline and cancel](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#deadline). |

## What it makes
Wandura Ref 1.0 makes videos from one reference video (a clip), at `480p` or `720p`. Anything else is refused with `UnsupportedRequest` and costs nothing.

| Request | Made? |
|---|---|
| An edit of the clip: one clip, with or without photos, in an edit task (`omni_reference_task_type: "edit"`): a new look, or someone in the clip replaced by the person in a photo. A clip with no photo, or a text that edits the clip, counts as an edit too. | Yes |
| One photo + one clip: the people in the photo move like the people in the clip. The photo has as many people as move in the clip, 1 to 4. | Yes |
| `resolution: "1080p"` | No: `400 UnsupportedRequest` (`param`: `resolution`) |
| No clip: photos only (first frame, first and last frame, reference images) or text only | No: `400 UnsupportedRequest` (`param`: `content`) |
| Several photos + a clip, when it is not an edit | No: `400 UnsupportedRequest` (`param`: `content`) |
| One photo + a clip, when the number of people differs or is above 4 | No: the task ends `failed` with `error.code` `UnsupportedRequest` |

**On `UnsupportedRequest`, send the same request to the model you used before.** Wandura finds most of these cases in the body, so `POST` answers `400` at once. A few show only once the task has started (counting the people, or a clip Wandura cannot work from): then the task ends `failed` with that code, also free. Branch on the code, not the message.

## Create a task
```bash
curl -X POST https://api.wandura.ai/api/v3/contents/generations/tasks \
  -H "Authorization: Bearer $WANDURA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wandura-ref-1-0",
    "content": [
      {"type": "text", "text": "Edit @Video1: replace the dancer with the woman in @Image1, keep the moves."},
      {"type": "image_url", "image_url": {"url": "https://cdn.example.com/u/model.jpg"}, "role": "reference_image"},
      {"type": "video_url", "video_url": {"url": "https://cdn.example.com/u/dance.mp4"}, "role": "reference_video"}
    ],
    "omni_reference_task_type": "edit",
    "resolution": "480p",
    "generate_audio": true,
    "watermark": false
  }'
# HTTP 200
# {"id":"run_Rf5kT2wQx8Lm"}
```

The answer has only `id`. Keep it, then poll or wait for the callback.

| Field | Notes |
|---|---|
| `model` | Required. `wandura-ref-1-0`. Any other value is refused with `400` (see [Errors](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#errors)). |
| `content` | Required array, as you send it today. `text`: the prompt; refer to files as `@Image1`, `@Video1`, `@Audio1`. `image_url` with `role` `first_frame`, `last_frame` or `reference_image`: an https link, or a base64 data URI (PNG, JPEG or WEBP). `video_url` with `role` `reference_video`: an https link. `audio_url` with `role` `reference_audio`: an https link. See [What it makes](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#scope). |
| `duration` | A number, not a string: whole seconds, 4 to 30. An edit needs none: its video follows the clip, up to 30 seconds (or `duration` when shorter). |
| `resolution` | `480p` (also when you leave it out) or `720p`. `1080p` is refused with `400 UnsupportedRequest`. |
| `return_last_frame` | Optional. `true` adds `content.last_frame_url` to the task (see [The task object](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#task)). |
| Other parameters | `ratio`, `generate_audio`, `seed`, `watermark`, `omni_reference_task_type` and the rest: send them as you do today. |
| `callback_url` | Optional. A public https URL (at most 2048 characters) that gets the task object when the task ends. See [Callback](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#callback). |
| `execution_expires_after` | Optional. How long you wait for the task, in seconds, **counted from this request**. Past it the task is `expired`, free. See [Deadline and cancel](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#deadline). |
| `deadline_at` | Optional, Wandura's own. The same as a time, in unix seconds. Send `execution_expires_after` or `deadline_at`, not both. |
| `id`, `user_prompt`, `backend_prompt`, `source` | Optional, Wandura's own. See [Wandura's extra fields](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#extra-fields). |

- **Links are read when the task runs**, not when you submit. Keep them valid until the task ends.
- **A base64 image** is stored privately by Wandura and used from that copy. Video and audio must be https links.
- Every problem in the body is refused at once with `400`, before anything is made or held. See [Limits](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#limits).

## Wandura's extra fields
Four optional fields at the top level of the body. Wandura keeps them with the task. They are never passed on to make the video.

| Field | What to send |
|---|---|
| `id` | Your tool's own job id: 1 to 80 letters, digits, dots, dashes or underscores. Sending the same `id` again gives back the same task (see [Same request, same task](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#idempotency)). |
| `client_reference_id` | Optional, 1 to 255 characters: your own id for the task, for example the run id in your backend. Without it, your `id` is used. Comes back as `wandura.client_reference_id`; `GET /v2/runs?client_reference_id=` finds it (see [Reconcile runs and costs](https://docs.wandura.ai/developers/api-v2/reconcile)). |
| `user_prompt` | What the person typed in your tool, word for word, in any language. |
| `backend_prompt` | The prompt your tool's backend wrote from it (usually the `text` in `content`). |
| `source` | An object saying where the request came from, for example `{"venture", "tool", "template_id"}`. Reports group by `template_id`. |

With both prompts, Wandura can see what the person meant and what your backend asked for. Without one, the task carries a warning (see [The wandura block](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#wandura-block)). A full request, every field filled:

```json
{"model":"wandura-ref-1-0",
 "content":[{"type":"text","text":"Replace the dancer in @Video1 with @Image1, keep @Audio1"},
   {"type":"image_url","image_url":{"url":"https://cdn.example.com/u/model.jpg"},"role":"reference_image"},
   {"type":"video_url","video_url":{"url":"https://cdn.example.com/u/dance.mp4"},"role":"reference_video"},
   {"type":"audio_url","audio_url":{"url":"https://cdn.example.com/u/beat.mp3"},"role":"reference_audio"}],
 "ratio":"9:16","duration":8,"resolution":"720p","generate_audio":false,"watermark":false,"seed":42,
 "omni_reference_task_type":"reference","return_last_frame":true,
 "id":"job-1","user_prompt":"make it me","backend_prompt":"Replace the dancer in @Video1 with @Image1, keep @Audio1",
 "source":{"venture":"vl","tool":"creative","template_id":"tpl_9"},
 "callback_url":"https://creative.example/hook"}
```

## The task object
```bash
curl https://api.wandura.ai/api/v3/contents/generations/tasks/run_Rf5kT2wQx8Lm \
  -H "Authorization: Bearer $WANDURA_KEY"
```

```json
{"id":"run_Rf5kT2wQx8Lm","model":"wandura-ref-1-0","status":"succeeded",
 "content":{"video_url":"https://api.wandura.ai/v2/files/<file name>","last_frame_url":"https://api.wandura.ai/v2/files/<file name>"},
 "error":null,"created_at":1791590400,"updated_at":1791590400,
 "resolution":"480p",
 "wandura":{"creative_id":"run_Rf5kT2wQx8Lm",
   "price":{"credits":193.44,"usd":1.9344},"list_price":{"credits":403,"usd":4.03},"discount":{"percent":52,"label":"Partner −52%"},
   "notes":[],"warnings":["no backend_prompt: taken from the content text"]}}
```

| Field | Notes |
|---|---|
| `id` | The task id from `POST`. |
| `model` | Always `wandura-ref-1-0`. |
| `status` | See the table below. |
| `content.video_url` | Only when `succeeded`: the MP4 on Wandura storage. Download it and keep your own copy. |
| `content.last_frame_url` | Only when `succeeded` and you sent `return_last_frame: true`: the video's last frame as a PNG, on Wandura storage. |
| `error` | `null`, or `{code, message}` when the task ended without a video. |
| `created_at`, `updated_at` | Unix seconds. |
| `deadline_at` | Unix seconds. Only when the task has a deadline (see [Deadline and cancel](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#deadline)). |
| `eta` | Unix seconds: when Wandura expects the task to end, from how long recent tasks took. Only while `queued` or `running`. |
| `resolution`, `ratio`, `duration`, `seed` | As you sent them. A field you did not send is not there. |
| `wandura` | Wandura's own block. See [The wandura block](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#wandura-block). |

There is no `usage` field. The price does not come from tokens: it is in `wandura.price` (see [Price](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#price)).

| `status` | Meaning | `error.code` |
|---|---|---|
| `queued` | Accepted, waiting for room. |  |
| `running` | Being made. |  |
| `succeeded` | Done. `content.video_url` is set. You are charged. |  |
| `failed` | Ended without a video. Free. | `UnsupportedRequest` (not made yet: send it to the model you used before, see [What it makes](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#scope)), `GENERATION_FAILED` (submit again), `CONTENT_MODERATION_BLOCKED` (change the prompt or files), `INPUT_UNUSABLE` (a file could not be used) |
| `cancelled` | You cancelled it (`DELETE`). Free, except a task cancelled while `running` before its deadline: what already ran, at cost (see [Deadline and cancel](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#deadline)). |  |
| `expired` | Not done within 90 minutes after it started, or before your deadline. Free. Submit again. | `TIMEOUT` |

A task Wandura found it does not make, once it started (no `content`):

```json
{"id":"run_Rf5kT2wQx8Lm","model":"wandura-ref-1-0","status":"failed",
 "error":{"code":"UnsupportedRequest","message":"Wandura Ref 1.0 does not make this request yet (it makes an edit of the reference video (a new look, or a subject replaced from a photo), or a photo + a reference video with as many people in the photo as move in the clip). Not charged: send it to the model you used before."},
 "created_at":1791590400,"updated_at":1791590400,
 "resolution":"480p","ratio":"9:16","duration":5,
 "wandura":{"creative_id":"run_Rf5kT2wQx8Lm","price":{"credits":0,"usd":0},"notes":[],"warnings":[]}}
```

- **How often to poll**: every 10 to 15 seconds, or use `callback_url`.
- **Test keys** (`wdr_test_…`): the task succeeds at once with a sample video (`https://api.wandura.ai/v2/samples/video`). Nothing is held or charged.
- `GET` on an id that is not a task of your key's product answers `404 NotFound`.

## The wandura block
| Field | Notes |
|---|---|
| `creative_id` | On every task. Wandura keeps each task as a **creative**: the video with its whole recipe (your request and a private copy of every file). `creative_id` equals the task `id`. Use it when you talk to Wandura about this video. |
| `client_reference_id` | Only when the task has one: your `client_reference_id`, else your `id`. |
| `price` | `{credits, usd}` (1 credit = $0.01). While the task is `queued` or `running`: what is held. Once `succeeded`: what you were charged. Once it ended any other way: `0`, nothing was charged. Exact to the micro-dollar: show up to 4 decimals. |
| `list_price`, `discount` | Only if your org has a [partner price](https://docs.wandura.ai/developers/api-v2/concepts#partner-pricing) (and the task did not end free). `price` is then your discounted price, `list_price` the list price (same shape), `discount` is `{percent, label}`, for example `{"percent": 52, "label": "Partner −52%"}`. |
| `notes` | A list, can be empty. How Wandura read your request, in its own words (for example where `user_prompt` and the files disagree). |
| `warnings` | A list, can be empty. What was missing, changed or left out: no `user_prompt`, no `backend_prompt`, a `backend_prompt` that differs from the `text` in `content`, sound asked for but not made. |

Show `notes` and `warnings` to the person who wrote the prompt. Do not branch on their text.

## Deadline and cancel
- **Your deadline counts from the request**, time waiting included: `execution_expires_after` (seconds, the same field as the video task API) or `deadline_at` (unix seconds). Without either, your product's default deadline applies when Wandura set one for it. The 90-minute task time (from the start) still applies: whichever comes first ends the task.
- **Past the deadline** the task is `expired` (`error.code` `TIMEOUT`), **free**, whether it was still `queued` or `running`. Nothing new is started for it.
- **Late video**: pieces already being made when the task expired keep going for up to **1 hour**. If they make the whole video, the task stays `expired` and **free**, and `wandura` gains `late_output` (`{video_url, last_frame_url?}`) and `late_at` (unix seconds); `content` stays empty. With a `callback_url` you get **one** more callback, `Wandura-Event-Type: job.output_late`, with that task object. Ignore it if you already made the video another way.
- **`eta`** on the task while it is `queued` or `running`: when Wandura expects it to end.
- **A deadline it cannot meet** is refused at once with `503 DeadlineUnreachable` and a `Retry-After` header: the deadline is shorter than a task takes at its quickest. Nothing is made or held.
- **One early callback**: when your request set a deadline and a `callback_url`, and the `eta` moves past the deadline, Wandura POSTs the task once with `Wandura-Event-Type: job.delayed` (`status` `queued` or `running`). The final callback still follows.
- **Cancel** with `DELETE /api/v3/contents/generations/tasks/{id}`: the answer is the task object, `status` `cancelled`. A `queued` task, or a `running` task past its deadline, is free. A `running` task before its deadline is charged what already ran, **at cost**: no markup, no discount, never more than the hold (`wandura.price` says how much). A piece still being made is not charged. A task that has already ended answers `409 Conflict`.

## Callback
With `callback_url`, Wandura POSTs the task object (the same JSON as `GET`) **once, when the task ends**: `succeeded`, `failed`, `cancelled` or `expired`. There is no POST for `queued` or `running`, except the one `job.delayed` callback when your request set a deadline, and at most one `job.output_late` callback after an `expired` task whose video came after all (see [Deadline and cancel](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#deadline)). Branch on `Wandura-Event-Type`.

1. **Have a signing secret first.** In the [console](https://open.wandura.ai/webhooks), create the product's Jobs API signing secret (or save a Webhook endpoint: its secret works too). For a UA wallet key, ask Wandura. Without one, a request with `callback_url` is refused with `400 InvalidParameter` (`param`: `callback_url`).
2. **Verify every request** on the **raw body**: `X-Signature` is the hex HMAC-SHA256 of `X-Timestamp + "." + raw body` with your secret. `X-Timestamp` (unix seconds) must be within 5 minutes of now. The code on [Verify the signature](https://docs.wandura.ai/developers/api-v2/jobs#webhook-verify) works as it is.
3. **Answer `2xx` within 10 seconds**, then do your work. Dedupe on the task `id` or the `Wandura-Event-Id` header (the same on every retry).

```http
POST /hook HTTP/1.1
Content-Type: application/json
User-Agent: Wandura-Webhooks/1
X-Timestamp: 1791590400
X-Signature: 6f1c…(64 hex characters)
Wandura-Event-Id: evt_…
Wandura-Event-Type: job.ended

{"id":"run_Rf5kT2wQx8Lm","model":"wandura-ref-1-0","status":"succeeded", …}
```

A non-2xx answer, a timeout or a network error is retried after 30 seconds, 2 minutes, 10 minutes, 1 hour, 6 hours and 24 hours. If every attempt fails, the task is still there: `GET` it.

## Price
You pay for the seconds of video Wandura makes, by resolution, plus the prompt writing for each piece and, for a request with photos, a character sheet per subject. One price list for every org; an org with a [partner price](https://docs.wandura.ai/developers/api-v2/concepts#partner-pricing) pays it less its discount.

| `resolution` | Per output second | 5 s | 10 s | 15 s | 30 s |
|---|---|---|---|---|---|
| `480p` (default) | $0.13 | $0.65 | $1.30 | $1.95 | $3.90 |
| `720p` | $0.26 | $1.30 | $2.60 | $3.90 | $7.80 |

| Part | What it counts |
|---|---|
| Video seconds | Wandura makes the video in pieces of at most 15 seconds. Each piece counts its output seconds (whole seconds) plus the seconds of your clip it reads (at most 15), at $0.065 a second at `480p` and $0.13 at `720p`. An edit reads as much clip as it makes, so that is the table above: $0.13 or $0.26 per output second. |
| Prompt writing | One language-model call per piece, plus one more for a request with photos: for a photo + a clip, to count the people; for an edit or a replace with photos, to plan the cast (who in your photos plays whom, and in which clothes). Usually $0.05 to $0.10 a call; $0.195 when its cost is not known. |
| Character sheets | Only for a request with photos. An edit or a replace: one sheet per person, animal or character in your photos, drawn from several sides, so every piece shows the same look (at most 10 references in all; more is refused, free). A photo + a clip: one sheet per person plus one picture of the empty place. Each at most $0.26. A sheet that cannot be drawn costs nothing: your photo goes in its place, with a warning. |

1. **On submit, Wandura holds the most the request can cost** on the key's wallet: the longest video it can make from the request (an edit counts its clip at up to 30 seconds), 15 seconds of clip per piece, $0.195 per call, 10 character sheets for an edit or a replace with photos, and for a photo + a clip sheets for 4 people plus the place.
2. **When the task succeeds, you are charged** for what was made. Never more than the hold.
3. **The rest of the hold goes back** to the wallet.

Examples (each call cost $0.065, each sheet $0.247):

| Request | Held | Charged | Partner price −20% | Partner price −52% |
|---|---|---|---|---|
| A 30-second `480p` edit, no photo (two pieces: 30 s out + 30 s of clip) | 2 × $0.195 + 60 s × $0.065 = $4.29 | 60 s × $0.065 + 2 × $0.065 = $4.03 | held $3.432, charged $3.224 | held $2.0592, charged $1.9344 |
| A 10-second `720p` replace from a photo of two people (a reference task, `duration: 10`; one piece: 10 s out + 10 s of clip) | 2 × $0.195 + 10 × $0.26 + (10 + 15) s × $0.13 = $6.24 | 20 s × $0.13 + 2 × $0.065 + 2 sheets × $0.247 = $3.224 | held $4.992, charged $2.5792 | held $2.9952, charged $1.54752 |

- **Partner price**: if your org has one, every amount above is your discounted price: the hold, the charge and `wandura.price`. The task also carries `list_price` and `discount` (see [The wandura block](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#wandura-block)). A partner price can be larger on this model than on others (for example −52% here and −20% on the rest): `discount` is the one applied. Signed in at [open.wandura.ai](https://open.wandura.ai), the catalog and Billing show your price per second beside the list price.
- `failed`, `expired` and `cancelled` tasks are **free**: the whole hold goes back and `wandura.price` reads `0`. That includes a task that ends with `UnsupportedRequest`. A refused request (`4xx`, `503`) holds nothing. The one exception: a task you cancel while it is `running`, before its deadline, is charged what already ran, at cost (see [Deadline and cancel](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#deadline)).
- If the wallet cannot cover the hold, the request is refused with `402 InsufficientBalance` and nothing is made.
- A UA wallet key pays only from the UA wallet, never from the org's pool or another wallet.
- No mark fee: these videos carry no mark.
- Test keys (`wdr_test_…`) are free: nothing is held or charged.

## Same request, same task
A retry never makes a second video or a second charge:

- **With `id`**: the same `id` with the same body gives back the same task, with no time limit. The same `id` with a different body is refused with `409 Conflict`. Use a new `id` for a new task.
- **Without `id`**: the same body from the same key within 10 minutes is the same task (a double click makes one video). After 10 minutes it is a new task.

The `Idempotency-Key` header is not read here. Use `id`.

## Limits
| What | Limit |
|---|---|
| What it makes | See [What it makes](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#scope). Anything else is refused with `UnsupportedRequest`, free. |
| Images | Up to 10. Https links or base64 data URIs (PNG, JPEG, WEBP). |
| Video | At most 1, https link only. |
| Audio | Https links only. |
| Tags | `@Image3` needs at least 3 images (the same for `@Video` and `@Audio`). |
| Placeholders | A link that is still a placeholder, such as `<link>`, is refused. |
| `duration` | A number (`8`, not `"8"`): whole seconds, 4 to 30. An edit task (`omni_reference_task_type: "edit"`) takes exactly one video instead. |
| `resolution` | `480p` (the default) or `720p`. `1080p` is refused with `400 UnsupportedRequest`. |
| `id` | 1 to 80 letters, digits, dots, dashes or underscores. |
| `callback_url` | Public https, at most 2048 characters. |
| Task time | 90 minutes after it starts, or your deadline from the request (whichever comes first). Then it is `expired`, free. |
| Not here | Listing tasks answers `404 NotFound`. |

When many tasks run at once, new ones wait as `queued`. They are not refused. Your product's per-minute rate and daily spend cap still apply (see [Errors](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#errors)).

## On [www.wandura.ai](http://www.wandura.ai)
Since 03/11/2026 the same model is on [www.wandura.ai](http://www.wandura.ai), paid in www credits: pick **Wandura Ref 1.0** in Image to Video,
or call `POST https://www.wandura.ai/api/v1/renders` with your www key and only the model name changed:

```bash
curl -s https://www.wandura.ai/api/v1/renders \
  -H "Authorization: Bearer $WANDURA_WWW_KEY" -H "Content-Type: application/json" \
  -d '{"model":"wandura-ref-1-0","prompt":"Replace the man in @Video1 with the man from @Image1",
       "images":["https://…/man.png"],"videos":["https://…/clip.mp4"],"resolution":"720p","duration":7}'
```

- One photo and one clip are required; 480p or 720p; 4–15 s. Keep `@Image1` / `@Video1` in the prompt: they tell the model what to replace.
- **Charged at actual cost.** The price shown (and `preview: true`) is the most a render can take; it is held when the job starts and, when the
  video is ready, you get back the difference.
- A request it does not make yet ends with `error_code: unsupported_request` (HTTP 422 at submit, or on the job when it is found later) and
  is refunded in full. Send it to another model.
- Poll the job as usual (`GET /api/v1/generations/{id}`). A 720p render can take 10–15 minutes.

## Errors
Errors have the same shape as the API you call today: `{"error": {"code", "message", "param"}}`. `param` is there only on `400`. Branch on `code`; the message is for people. Each code has its own section on the [Errors](https://docs.wandura.ai/developers/api-v2/errors#ref-errors) page.

| HTTP | `code` | Retry? | When |
|---|---|---|---|
| 400 | [`InvalidParameter`](https://docs.wandura.ai/developers/api-v2/errors#ref-invalid-parameter) | No | The body breaks a [limit](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#limits), `model` is not `wandura-ref-1-0`, or `callback_url` cannot be signed. `param` names the field. |
| 400 | [`UnsupportedRequest`](https://docs.wandura.ai/developers/api-v2/errors#ref-unsupported-request) | No: send it to the model you used before | A valid request Wandura Ref 1.0 does not make yet (see [What it makes](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#scope)). `param` is `resolution` or `content`. |
| 401 | [`AuthenticationError`](https://docs.wandura.ai/developers/api-v2/errors#ref-authentication-error) | No | No key, or an unknown, revoked or expired key. |
| 402 | [`InsufficientBalance`](https://docs.wandura.ai/developers/api-v2/errors#ref-insufficient-balance) | No | The wallet cannot cover the hold. Add money first. |
| 403 | [`AccessDenied`](https://docs.wandura.ai/developers/api-v2/errors#ref-access-denied) | No | A read-only key sends a task. |
| 404 | [`NotFound`](https://docs.wandura.ai/developers/api-v2/errors#ref-not-found) | No | No such task for this key's product, or no such endpoint. |
| 409 | [`Conflict`](https://docs.wandura.ai/developers/api-v2/errors#ref-conflict) | No | This `id` was used with a different body, or `DELETE` on a task that has ended. |
| 429 | [`RateLimitExceeded`](https://docs.wandura.ai/developers/api-v2/errors#ref-rate-limit-exceeded) | Yes | Too many tasks this minute, or too many running. Wait for `Retry-After`. |
| 429 | [`QuotaExceeded`](https://docs.wandura.ai/developers/api-v2/errors#ref-quota-exceeded) | No | Your product's daily spend cap is reached. |
| 500 | [`InternalServiceError`](https://docs.wandura.ai/developers/api-v2/errors#ref-internal-service-error) | Yes | Something went wrong at Wandura. Send the same request again. |
| 503 | [`ServiceUnavailable`](https://docs.wandura.ai/developers/api-v2/errors#ref-service-unavailable) | Yes | Briefly unavailable. Nothing was made or held. |
| 503 | [`DeadlineUnreachable`](https://docs.wandura.ai/developers/api-v2/errors#ref-deadline-unreachable) | Later, or with a later deadline | The deadline is shorter than a task takes at its quickest. Nothing was made or held. See [Deadline and cancel](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#deadline). |

A string `duration`:

```json
HTTP 400
{"error":{"code":"InvalidParameter","message":"a reference task needs a whole-second duration 4–30 (got \"8\")","param":"duration"}}
```

The old model name:

```json
HTTP 400
{"error":{"code":"InvalidParameter","message":"model must be \"wandura-ref-1-0\" (Wandura Ref 1.0).","param":"model"}}
```

Too many images:

```json
HTTP 400
{"error":{"code":"InvalidParameter","message":"Wandura Ref 1.0 takes at most 10 reference images (has 11)","param":"content"}}
```

A resolution Wandura Ref 1.0 does not make yet:

```json
HTTP 400
{"error":{"code":"UnsupportedRequest","message":"Wandura Ref 1.0 does not make this request yet (1080p: it makes 480p and 720p). Nothing was created or charged: send it to the model you used before.","param":"resolution"}}
```

The same `id` with a different body:

```json
HTTP 409
{"error":{"code":"Conflict","message":"This id was already used with a different request. Use a new id for a new task."}}
```

When the body has several problems, `message` lists all of them, separated by `; `, and `param` names the field of the first one.

A task that ends without a video is not an HTTP error: it reads `failed` or `expired` (see [The task object](https://docs.wandura.ai/developers/api-v2/wandura-ref-1-0#task)). It is free.
