Bản lưu ngày / Snapshot of 2026-11-13 · Xem bản mới nhất / See the latest version
WanduraDocsBeta
BetaThese docs are in beta and change often. Something wrong, unclear or missing? Tell us.
Change history

History: Image and video generation: the Jobs API

Every change to this page, newest first. Expand an entry to see what changed.

← Image and video generation: the Jobs API

  1. 30 Oct 2026 · +1 −0 lines
    Show changes
    ⋯
      | `webhook_url` | Optional. A public https URL that gets the final job, signed with your product's Jobs API signing secret or, if it has none, its Webhook endpoint's signing secret. Needs one of the two first (see [Webhooks](#webhooks)). |
      | `end_user_id` | Optional. Your id for the person the job is for; when you send it, a per-person daily cap applies (see [Limits](#limits)). |
    + | `client_reference_id` | Optional. Your own id for this job (1 to 255 characters), for example the run id in your backend. Returned on the job and its webhook; `GET /v2/runs?client_reference_id=` finds it. See [Reconcile runs and costs](reconcile.md). |
      | `timeout_seconds` | Optional. How long you wait for this job, in seconds (1 to 86400), **counted from this submit**. See [Deadline, ETA and cancel](#deadline). |
      | `deadline_at` | Optional. The same as a time (RFC 3339, at most 24 hours ahead). Send `timeout_seconds` or `deadline_at`, not both. |
    ⋯
  2. 28 Oct 2026 · +5 −3 lines
    Show changes
    ⋯
        P -->|"done in time"| OK["succeeded, charged"]
        P -->|"deadline passes"| T["timeout, free"]
    +   T -->|"work already running<br/>ends within 1 h"| L["webhook job.output_late<br/>late_output, still free"]
        P -->|"you cancel"| C["cancelled"]
      ```
      
    - - **The deadline counts from the submit**, time waiting in the queue included. Send `timeout_seconds` or `deadline_at`. Without either, your product's default deadline applies when Wandura set one for it (ask Wandura). The style's `max_job_seconds` (counted from the start) still applies: whichever comes first ends the job.
    + - **The deadline counts from the submit**, time waiting in the queue included. Send `timeout_seconds` or `deadline_at`. Without either, your product's default deadline applies when Wandura set one for it (ask Wandura). Your deadline **replaces** the style's `max_job_seconds`, shorter or longer, but a job never runs more than 1 hour from its start (or its `max_job_seconds`, when longer). A job with no deadline ends at its `max_job_seconds`.
      - The job body carries `deadline_at` when the job has a deadline.
      - **Past the deadline** the job ends `timeout`, **not charged**, whether it was still `queued` or `processing`. Nothing new is started for it. Its `error.code` is `TIMEOUT`, with a message that says your deadline came first.
    + - **Late video** (`late_output`): when a job ends `timeout`, work that was already running keeps going for up to **1 hour** (nothing new is started, nothing is retried). If it makes the whole video, the job keeps `status: timeout` and stays **not charged**, and gains `late_output` (the same file list as `output` would hold) and `late_at`. A job with a `webhook_url` also gets **one** more POST, `Wandura-Event-Type: job.output_late`, with the new `GET` body. `output` stays `null`: branch on `late_output`, or ignore it if you already served the request another way.
      - **`eta`**: while a video job is `queued` or `processing`, `GET /v2/jobs/{job_id}` has `eta`, the time Wandura expects it to end (RFC 3339), from how long recent jobs took. It is gone once the job ends.
      - **`job.delayed` webhook**: when your request set a deadline and a `webhook_url`, and the `eta` moves past the deadline, Wandura POSTs the job **once** with `Wandura-Event-Type: job.delayed` (same body as `GET`, same signature as the final webhook). Use it to switch to another route early, or cancel. The final webhook (`job.ended`) still follows. A job without a deadline in its request never gets this webhook.
    ⋯
      |---|---|
      | `queued` | Nothing. |
    - | `processing`, past its deadline (the style's maximum job time, or yours) | Nothing. |
    + | `processing`, past its deadline (yours, else the style's maximum job time) | Nothing. |
      | `processing`, before its deadline | What already ran, **at cost**: no markup, no discount, never more than the job's price. A part still being made when you cancel is not charged. |
      | ended | `409 JOB_NOT_CANCELLABLE`, nothing changes. |
    ⋯
      ## Webhooks {#webhooks}
      
    - Each job with a `webhook_url` gets **one** POST when it reaches a final status (`Wandura-Event-Type: job.ended`). The body is exactly what `GET /v2/jobs/{job_id}` returns at that moment. The only other POST is `job.delayed`, at most once and only for a job whose request set a deadline (see [Deadline, ETA and cancel](#deadline)): branch on `status` or `Wandura-Event-Type`.
    + Each job with a `webhook_url` gets **one** POST when it reaches a final status (`Wandura-Event-Type: job.ended`). The body is exactly what `GET /v2/jobs/{job_id}` returns at that moment. The only other POSTs are `job.delayed`, at most once and only for a job whose request set a deadline, and `job.output_late`, at most once, for a `timeout` job whose video came after all (see [Deadline, ETA and cancel](#deadline)): branch on `Wandura-Event-Type`.
      
      1. **Have a signing secret once**: in the [console](https://open.wandura.ai/webhooks), either save a Webhook endpoint URL (its signing secret then signs job webhooks too), or create a dedicated "Jobs API signing secret" (Create; it is shown once; Roll replaces it at once). When the product has a Jobs API signing secret, that one signs job webhooks. Until it has one of the two, a submit with `webhook_url` is refused with `422`.
    ⋯
  3. 27 Oct 2026 · +42 −8 lines
    Show changes
    ⋯
      | `POST /v2/jobs` | Submit a job. |
      | `GET /v2/jobs/{job_id}` | Status and output. Same body as the webhook. |
    - | `POST /v2/jobs/{job_id}/cancel` | Cancel a job that is still `queued`. |
    + | `POST /v2/jobs/{job_id}/cancel` | Cancel a job that is `queued` or `processing`. |
      | `GET /v2/models` | The models. |
      | `GET /v2/models/{model_id}/schema` | JSON Schema of the submit body for one model. |
    ⋯
      | `webhook_url` | Optional. A public https URL that gets the final job, signed with your product's Jobs API signing secret or, if it has none, its Webhook endpoint's signing secret. Needs one of the two first (see [Webhooks](#webhooks)). |
      | `end_user_id` | Optional. Your id for the person the job is for; when you send it, a per-person daily cap applies (see [Limits](#limits)). |
    + | `timeout_seconds` | Optional. How long you wait for this job, in seconds (1 to 86400), **counted from this submit**. See [Deadline, ETA and cancel](#deadline). |
    + | `deadline_at` | Optional. The same as a time (RFC 3339, at most 24 hours ahead). Send `timeout_seconds` or `deadline_at`, not both. |
      | `lane` | **Rolling out.** Optional: `priority` (default) or `relax`. See [Relax lane and a style's own inputs](#lane-and-inputs). |
      | `inputs` | **Rolling out.** Optional object: the style's own inputs that no field above carries. See [Relax lane and a style's own inputs](#lane-and-inputs). |
      
      - **Input URLs are downloaded when the job starts**, not when you submit. A URL that cannot be downloaded ends the job `failed`, not charged. Keep a presigned URL valid for at least the style's `max_job_seconds` plus 10 minutes.
    - - **Cancel** works while the job is `queued`: `200`, status `cancelled`, not charged, and the webhook fires. Once the job is `processing` it runs to the end, and cancel answers `409 JOB_NOT_CANCELLABLE`.
    + - **Cancel** works while the job is `queued` or `processing`: `200`, status `cancelled`, and the webhook fires. What is charged: see [Deadline, ETA and cancel](#deadline). A job that has ended answers `409 JOB_NOT_CANCELLABLE`.
      
    + ## Deadline, ETA and cancel {#deadline}
    + 
    + Your app has its own limit for how long a user waits. Tell Wandura, and Wandura stops at that limit instead of making a video nobody waits for.
    + 
    + ```mermaid
    + flowchart LR
    +   S["POST /v2/jobs<br/>+ timeout_seconds"] --> Q{"Can it finish<br/>in time?"}
    +   Q -->|"no"| R["503 DEADLINE_UNREACHABLE<br/>nothing made, free"]
    +   Q -->|"yes"| P["queued / processing<br/>eta in GET"]
    +   P -->|"eta passes the deadline"| D["webhook job.delayed<br/>(once)"]
    +   P -->|"done in time"| OK["succeeded, charged"]
    +   P -->|"deadline passes"| T["timeout, free"]
    +   P -->|"you cancel"| C["cancelled"]
    + ```
    + 
    + - **The deadline counts from the submit**, time waiting in the queue included. Send `timeout_seconds` or `deadline_at`. Without either, your product's default deadline applies when Wandura set one for it (ask Wandura). The style's `max_job_seconds` (counted from the start) still applies: whichever comes first ends the job.
    + - The job body carries `deadline_at` when the job has a deadline.
    + - **Past the deadline** the job ends `timeout`, **not charged**, whether it was still `queued` or `processing`. Nothing new is started for it. Its `error.code` is `TIMEOUT`, with a message that says your deadline came first.
    + - **`eta`**: while a video job is `queued` or `processing`, `GET /v2/jobs/{job_id}` has `eta`, the time Wandura expects it to end (RFC 3339), from how long recent jobs took. It is gone once the job ends.
    + - **`job.delayed` webhook**: when your request set a deadline and a `webhook_url`, and the `eta` moves past the deadline, Wandura POSTs the job **once** with `Wandura-Event-Type: job.delayed` (same body as `GET`, same signature as the final webhook). Use it to switch to another route early, or cancel. The final webhook (`job.ended`) still follows. A job without a deadline in its request never gets this webhook.
    + - **Refused at once**: a video job whose deadline is shorter than it takes at its quickest is answered `503 DEADLINE_UNREACHABLE` (`retryable: true`, `Retry-After` in seconds). Nothing is created or held. Send a later deadline, or retry later.
    + - **Cancel** (`POST /v2/jobs/{job_id}/cancel`):
    + 
    + | When you cancel | What is charged |
    + |---|---|
    + | `queued` | Nothing. |
    + | `processing`, past its deadline (the style's maximum job time, or yours) | Nothing. |
    + | `processing`, before its deadline | What already ran, **at cost**: no markup, no discount, never more than the job's price. A part still being made when you cancel is not charged. |
    + | ended | `409 JOB_NOT_CANCELLABLE`, nothing changes. |
    + 
      ## Relax lane and a style's own inputs {#lane-and-inputs}
      
    ⋯
      | `failed` | yes | **no** | `GENERATION_FAILED`, `INPUT_UNUSABLE`, `INPUT_NO_SUBJECT` or `CONTENT_MODERATION_BLOCKED` |
      | `timeout` | yes | **no** | `TIMEOUT` |
    - | `cancelled` | yes | **no** | `null` |
    + | `cancelled` | yes | **no** (cancelled while `processing` before its deadline: what already ran, at cost; see [Cancel](#deadline)) | `null` |
      
      Errors inside a finished job (`error.code`):
    ⋯
      | `failed` | `INPUT_NO_SUBJECT` | false | A photo's main subject is not a real person or animal (a doll, a toy, a drawing, an object, scenery). Not charged. Only for apps that asked Wandura to turn this check on; ask the user for another photo. A person sent for an animal role, or the other way round, still runs. |
      | `failed` | `GENERATION_FAILED` | true | Generation failed on Wandura's side. Not charged; submitting again usually works. |
    - | `timeout` | `TIMEOUT` | true | The job did not finish within the maximum job time of its style. Not charged. |
    + | `timeout` | `TIMEOUT` | true | The job did not finish within the maximum job time of its style, or before the deadline you set ([Deadline](#deadline)). Not charged. |
      
      A moderation block is a normal final job, not an HTTP error:
    ⋯
      ## Webhooks {#webhooks}
      
    - Each job with a `webhook_url` gets **one** POST when it reaches a final status (no intermediate webhooks). The body is exactly what `GET /v2/jobs/{job_id}` returns at that moment.
    + Each job with a `webhook_url` gets **one** POST when it reaches a final status (`Wandura-Event-Type: job.ended`). The body is exactly what `GET /v2/jobs/{job_id}` returns at that moment. The only other POST is `job.delayed`, at most once and only for a job whose request set a deadline (see [Deadline, ETA and cancel](#deadline)): branch on `status` or `Wandura-Event-Type`.
      
      1. **Have a signing secret once**: in the [console](https://open.wandura.ai/webhooks), either save a Webhook endpoint URL (its signing secret then signs job webhooks too), or create a dedicated "Jobs API signing secret" (Create; it is shown once; Roll replaces it at once). When the product has a Jobs API signing secret, that one signs job webhooks. Until it has one of the two, a submit with `webhook_url` is refused with `422`.
    ⋯
      | 404 | `NOT_FOUND` | false | No such job, model or endpoint for this key. |
      | 409 | `IDEMPOTENCY_KEY_REUSED` | false | This `Idempotency-Key` was already used with a different body. |
    - | 409 | `JOB_NOT_CANCELLABLE` | false | Only queued jobs can be cancelled. |
    + | 409 | `JOB_NOT_CANCELLABLE` | false | The job has already ended. |
      | 409 | `STYLE_OFF` | false | The style was published to your org and is switched off, by your org or taken down by Wandura. Use another style. See [Errors](errors.md#jobs-style-off). |
      | 429 | `RATE_LIMITED` | true | Too many jobs submitted this minute for this product. Retry after `Retry-After`. |
    ⋯
      | 500 | `INTERNAL_ERROR` | true | Something went wrong on Wandura's side. Retry with the same `Idempotency-Key`. |
      | 503 | `SERVICE_UNAVAILABLE` | true | This style cannot run on a live key right now (test keys still return a sample). Or the job queue is briefly unavailable: nothing was created or charged; retry after `Retry-After` with the same `Idempotency-Key`. |
    + | 503 | `DEADLINE_UNREACHABLE` | true | A video job whose deadline is shorter than it takes at its quickest. Nothing was created or charged. Send a later deadline, or retry after `Retry-After`. See [Deadline](#deadline). |
      
      A `429` always carries a `Retry-After` header (seconds). Wait that long, add a little random jitter, and retry with the **same** `Idempotency-Key`. Retry only the errors marked `retryable`. Submit answers, `429` included, also carry `X-Concurrency-Limit`, `X-Concurrency-Running` and `X-Concurrency-Waiting`: see [Queue and congestion](queue-and-congestion.md).
    ⋯
      | Jobs running at once | 20 per product | Further jobs wait as `queued`, oldest first, with no queue limit: a busy product makes jobs slower, it does not refuse them. The maximum job time starts when a job starts, not while it waits. A job still waiting after 6 hours ends `timeout`, not charged (a safety net). Submit answers show the numbers (`X-Concurrency-*`). |
      | Per end user | none | Only if your org sets a daily cap, and only when you send `end_user_id`: `429 END_USER_LIMIT_REACHED`, resets 00:00 UTC. |
    - | Maximum job time | image 60 s, video 300 s | Per style (`max_job_seconds`), counted from when the job starts (`processing`). Past it the job ends `timeout`, not charged. |
    + | Maximum job time | image 60 s, video 300 s | Per style (`max_job_seconds`), counted from when the job starts (`processing`). Past it the job ends `timeout`, not charged. Your own [deadline](#deadline), if you send one, counts from the submit. |
      | Submit answer time | well under 3 seconds | The submit only validates, reserves the price and queues the job. |
      | Output files | at least 7 days | See [Output](#output). |
    ⋯
      
      - **Charged**: a `succeeded` job on a live key, at the style price (your discounted price if your org has a [partner price](concepts.md#partner-pricing)).
    - - **Not charged**: `failed` (generation error, unusable input, moderation block), `timeout`, `cancelled`, and anything refused at submit (`4xx`). The price is held when the job starts and released when it ends without a result.
    + - **Not charged**: `failed` (generation error, unusable input, moderation block), `timeout`, `cancelled`, and anything refused at submit (`4xx`, `503 DEADLINE_UNREACHABLE`). The price is held when the job starts and released when it ends without a result.
    + - **One exception**: a job you cancel while it is `processing`, before its deadline, is charged what already ran, at cost (see [Cancel](#deadline)).
      - **Test keys** never charge.
      
    ⋯
  4. 26 Oct 2026 · +31 −1 lines
    Show changes
    ⋯
      | `preview_url` | An https link to a sample image or video made with the style. Show it in your picker. `null` when the style has none yet. |
      | `inputs` | The fields of `POST /v2/jobs` this style takes, each `required` or `optional`. Fields not listed are refused. |
    + | `input_hint` | What photos to send, in words, for your users. A style that takes several photos starts with the number: "2 photos, one per person, in this order: …". |
    + | `input_slots` | Only on styles that put one person (or pet) per photo: one entry per photo of `image_urls`, **in order** (entry 1 = `image_urls[0]`), with `pronoun`, `role`, `hint`, `subject` (person, dog, cat or animal) and `preview_url` (a still of the person the photo replaces). Show one upload box per entry. See [Styles that take several photos](#photo-count). |
    + | `input_counts` | **Rolling out.** The exact number of files a list field takes, for example `{"image_urls": 2}`. Absent when the style has no fixed count. |
      | `max_job_seconds` | The longest this style takes, counted from when the job starts (`processing`); time waiting as `queued` does not count. Past it the job ends `timeout`, not charged. |
      | `price` | What a **succeeded** live job costs (1 credit = $0.01). |
    ⋯
      | `list_price`, `resolutions.list_price`, `discount` | Only if your org has a [partner price](concepts.md#partner-pricing). `price` and `resolutions.price` are then your discounted price; `list_price` and `resolutions.list_price` are the list price (same shapes); `discount` is `{percent, label}`. |
      
    + ### Styles that take several photos {#photo-count}
    + 
    + Some styles put one person (or pet) per photo: a duo dance takes 2 photos, a family scene 3 or 4. Such a style takes **exactly** that many photos in `image_urls`, one per subject, in the order of `input_slots`. Read the number from the style; never assume one photo.
    + 
    + ```json
    + {
    +   "id": "sty_duo_dance_example", "object": "style", "model": "wandura-video-v1", "name": "Duo Dance",
    +   "input_hint": "2 photos, one per person, in this order: 1) she (lead dancer): a clear front photo 2) he (partner): a clear front photo",
    +   "input_slots": [
    +     { "pronoun": "she", "role": "lead dancer", "hint": "a clear front photo", "subject": "person", "preview_url": "https://<wandura-storage-host>/slot-1.jpg" },
    +     { "pronoun": "he", "role": "partner", "hint": "a clear front photo", "subject": "person", "preview_url": "https://<wandura-storage-host>/slot-2.jpg" }
    +   ],
    +   "inputs": { "image_urls": "required" },
    +   "input_counts": { "image_urls": 2 },
    +   "max_job_seconds": 900, "price": { "credits": 120, "usd": 1.2 }
    + }
    + ```
    + 
    + - Send `image_urls` with exactly as many photos as `input_slots` has entries (the same number as `input_counts.image_urls`), entry 1 first. The same photo may repeat.
    + - Any other number is refused at submit with `422 INVALID_INPUT`, before anything runs or is charged:
    +   `{"field": "image_urls", "reason": "This style needs 2 photos, one per subject (got 1)."}`
    +   A test key (`wdr_test_…`) is refused the same way, so a wrong count shows up while you test.
    + - The model schema says the same per style: `image_urls` with `minItems` = `maxItems` = the number, and the order of the roles in its `description`.
    + - A style that takes ONE photo of everyone together has a single `input_slots` entry whose `roles` lists who must be in that photo.
    + - If your app maps its own templates to Wandura styles, keep the number with each mapping and show one upload box per slot. Check it again whenever you map a new style.
    + 
      ## Submit, poll, cancel {#submit}
      
    ⋯
      - **Styles fix their own aspect ratio, resolution and duration.** Today's styles do not take `aspect_ratio`, `resolution`, `duration` or `seed`, so sending one returns `422` with the reason. Send only what the style's `inputs` lists, and use the model schema to know which.
      - An unknown field, a missing required field, a malformed URL and an unknown style are all `422`.
    + - **A style that takes several photos takes exactly that many.** `image_urls` with another number of photos is `422` with `{"field": "image_urls", "reason": "This style needs 2 photos, one per subject (got 1)."}`. See [Styles that take several photos](#photo-count).
      
      ## Idempotency {#idempotency}
    ⋯
      | HTTP | `code` | `retryable` | Meaning |
      |---|---|---|---|
    - | 422 | `INVALID_INPUT` | false | The body or a header is wrong; `details[]` lists each `{field, reason}`. |
    + | 422 | `INVALID_INPUT` | false | The body or a header is wrong; `details[]` lists each `{field, reason}`. A common one: the wrong number of photos for the style ([Styles that take several photos](#photo-count)). |
      | 401 | `UNAUTHORIZED` | false | Missing, unknown, revoked or expired API key. |
      | 402 | `INSUFFICIENT_CREDITS` | false | The product's wallet cannot cover the job. Add funds, then retry. |
    ⋯
  5. 24 Oct 2026 · +3 −1 lines
    Show changes
    ⋯
      | `max_job_seconds` | The longest this style takes, counted from when the job starts (`processing`); time waiting as `queued` does not count. Past it the job ends `timeout`, not charged. |
      | `price` | What a **succeeded** live job costs (1 credit = $0.01). |
    + | `resolutions` | Only on styles that take `resolution`: `default`, `options`, and `price` by resolution. |
    + | `list_price`, `resolutions.list_price`, `discount` | Only if your org has a [partner price](concepts.md#partner-pricing). `price` and `resolutions.price` are then your discounted price; `list_price` and `resolutions.list_price` are the list price (same shapes); `discount` is `{percent, label}`. |
      
      ## Submit, poll, cancel {#submit}
    ⋯
      ## What is charged {#billing}
      
    - - **Charged**: a `succeeded` job on a live key, at the style price.
    + - **Charged**: a `succeeded` job on a live key, at the style price (your discounted price if your org has a [partner price](concepts.md#partner-pricing)).
      - **Not charged**: `failed` (generation error, unusable input, moderation block), `timeout`, `cancelled`, and anything refused at submit (`4xx`). The price is held when the job starts and released when it ends without a result.
      - **Test keys** never charge.
    ⋯
  6. 22 Oct 2026 · +2 −1 lines
    Show changes
    ⋯
      | `processing` | no | none | `null` |
      | `succeeded` | yes | yes, the style price | `null` |
    - | `failed` | yes | **no** | `GENERATION_FAILED`, `INPUT_UNUSABLE` or `CONTENT_MODERATION_BLOCKED` |
    + | `failed` | yes | **no** | `GENERATION_FAILED`, `INPUT_UNUSABLE`, `INPUT_NO_SUBJECT` or `CONTENT_MODERATION_BLOCKED` |
      | `timeout` | yes | **no** | `TIMEOUT` |
      | `cancelled` | yes | **no** | `null` |
    ⋯
      | `failed` | `CONTENT_MODERATION_BLOCKED` | false | The input or the result was blocked by content moderation. Not charged. |
      | `failed` | `INPUT_UNUSABLE` | false | An input file could not be used (unreachable, unsupported format, or too long). Not charged. |
    + | `failed` | `INPUT_NO_SUBJECT` | false | A photo's main subject is not a real person or animal (a doll, a toy, a drawing, an object, scenery). Not charged. Only for apps that asked Wandura to turn this check on; ask the user for another photo. A person sent for an animal role, or the other way round, still runs. |
      | `failed` | `GENERATION_FAILED` | true | Generation failed on Wandura's side. Not charged; submitting again usually works. |
      | `timeout` | `TIMEOUT` | true | The job did not finish within the maximum job time of its style. Not charged. |
    ⋯
  7. 21 Oct 2026 · +2 −2 lines
    Show changes
    ⋯
      | When the product is full | The job waits as `queued` and starts as slots free (oldest first) | The same: the job waits as `queued` |
      
    - The job body is the same for both lanes (it has no `lane` field). Both prices are in the public catalog (`GET /v2/public/styles`, `price.priority` and `price.relax`).
    + The job body is the same for both lanes (it has no `lane` field). Both prices are on each of your styles (`GET /v2/styles` with your key, or `POST /v2/quote`).
      
      **`inputs`**: an object of the style's own inputs that no field of the table above carries, named as in the style's input schema. Examples: a `keep_audio` switch, a second text field (`prompt` fills the first), a `mask_url`, or a `video_url` on an image style.
    ⋯
      ```
      
    - - **Where to find a style's inputs**: `GET /v2/public/styles/{style}` → `inputs` (no key). Each style's OpenAPI, `GET /v2/public/styles/{style}/openapi.json`, carries the exact `POST /v2/jobs` body for that style, with an example.
    + - **Where to find a style's inputs**: `GET /v2/public/styles/{style}` → `inputs` (send your API key from your server: only public styles answer without one). Each style's OpenAPI, `GET /v2/public/styles/{style}/openapi.json`, carries the exact `POST /v2/jobs` body for that style, with an example.
      - An input that a field above carries goes in that field, not in `inputs`: `{"field": "inputs.image_urls", "reason": "send it as image_urls"}`.
      - A style whose **required** input is not one of the fields above runs only when the body sends `inputs`. It is not listed in `GET /v2/styles` or the model schema; without `inputs` it gets the same `422` as an unknown style.
    ⋯
  8. 21 Oct 2026 · +1 −0 lines
    Show changes
    ⋯
      | 409 | `IDEMPOTENCY_KEY_REUSED` | false | This `Idempotency-Key` was already used with a different body. |
      | 409 | `JOB_NOT_CANCELLABLE` | false | Only queued jobs can be cancelled. |
    + | 409 | `STYLE_OFF` | false | The style was published to your org and is switched off, by your org or taken down by Wandura. Use another style. See [Errors](errors.md#jobs-style-off). |
      | 429 | `RATE_LIMITED` | true | Too many jobs submitted this minute for this product. Retry after `Retry-After`. |
      | 429 | `PRODUCT_BUSY` | true | Only under an emergency queue limit (normally a full product queues the job): your product's slots and its queue are full. Retry after `Retry-After` (about 5 s). |
    ⋯
  9. 21 Oct 2026 · +12 −12 lines
    Show changes
    ⋯
      | `preview_url` | An https link to a sample image or video made with the style. Show it in your picker. `null` when the style has none yet. |
      | `inputs` | The fields of `POST /v2/jobs` this style takes, each `required` or `optional`. Fields not listed are refused. |
    - | `max_job_seconds` | The longest this style takes. Past it the job ends `timeout`, not charged. |
    + | `max_job_seconds` | The longest this style takes, counted from when the job starts (`processing`); time waiting as `queued` does not count. Past it the job ends `timeout`, not charged. |
      | `price` | What a **succeeded** live job costs (1 credit = $0.01). |
      
    ⋯
        }'
      # HTTP 202
    - # X-RateLimit-Limit: 60
    - # X-RateLimit-Remaining: 59
    + # X-RateLimit-Limit: 2400
    + # X-RateLimit-Remaining: 2399
      # X-RateLimit-Reset: 1791897360
      # X-Concurrency-Limit: 20
    ⋯
      |---|---|---|
      | Price | The style's Priority price | The style's Relax price, never above Priority |
    - | Deadline | `max_job_seconds`; past it the job ends `timeout`, not charged | None: the job waits in line until it runs |
    - | When the product is full | `429 PRODUCT_BUSY` | Never refused for that; the job waits as `queued` |
    + | Deadline | `max_job_seconds` from when the job starts; past it the job ends `timeout`, not charged | None: the job waits in line until it runs |
    + | When the product is full | The job waits as `queued` and starts as slots free (oldest first) | The same: the job waits as `queued` |
      
      The job body is the same for both lanes (it has no `lane` field). Both prices are in the public catalog (`GET /v2/public/styles`, `price.priority` and `price.relax`).
    ⋯
      | 409 | `JOB_NOT_CANCELLABLE` | false | Only queued jobs can be cancelled. |
      | 429 | `RATE_LIMITED` | true | Too many jobs submitted this minute for this product. Retry after `Retry-After`. |
    - | 429 | `PRODUCT_BUSY` | true | Your product's concurrency slots and its queue are full. Retry after `Retry-After` (about 5 s). |
    - | 429 | `END_USER_LIMIT_REACHED` | true | This end user reached the daily job cap. Retry after `Retry-After` (resets 00:00 UTC). |
    + | 429 | `PRODUCT_BUSY` | true | Only under an emergency queue limit (normally a full product queues the job): your product's slots and its queue are full. Retry after `Retry-After` (about 5 s). |
    + | 429 | `END_USER_LIMIT_REACHED` | true | This end user reached the daily job cap your org set (none unless your org sets one). Retry after `Retry-After` (resets 00:00 UTC). |
      | 500 | `INTERNAL_ERROR` | true | Something went wrong on Wandura's side. Retry with the same `Idempotency-Key`. |
      | 503 | `SERVICE_UNAVAILABLE` | true | This style cannot run on a live key right now (test keys still return a sample). Or the job queue is briefly unavailable: nothing was created or charged; retry after `Retry-After` with the same `Idempotency-Key`. |
    ⋯
      HTTP/1.1 429
      Retry-After: 12
    - X-RateLimit-Limit: 60
    + X-RateLimit-Limit: 2400
      X-RateLimit-Remaining: 0
      X-RateLimit-Reset: 1791897360
    ⋯
      | What | Today | Notes |
      |---|---|---|
    - | Submit rate | 60 jobs per minute per product | Live and test keys count apart. Over it: `429 RATE_LIMITED` with `Retry-After`. Every submit answers `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`. |
    - | Jobs running at once | 20 per product | Further jobs wait as `queued`. As many jobs can wait as you have slots; past that, `429 PRODUCT_BUSY` with `Retry-After`. A job still waiting at its maximum job time ends `timeout`, not charged. Submit answers show the numbers (`X-Concurrency-*`). |
    - | Per end user | 20 jobs per day | Only when you send `end_user_id`. Resets 00:00 UTC; `429 END_USER_LIMIT_REACHED`. |
    - | Maximum job time | image 60 s, video 300 s | Per style (`max_job_seconds`). Past it the job ends `timeout`, not charged. |
    + | Submit rate | 2400 jobs per minute per product (40 a second) on live keys; 60 on test keys | Live and test keys count apart. Over it: `429 RATE_LIMITED` with `Retry-After`. Every submit answers `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`. |
    + | Jobs running at once | 20 per product | Further jobs wait as `queued`, oldest first, with no queue limit: a busy product makes jobs slower, it does not refuse them. The maximum job time starts when a job starts, not while it waits. A job still waiting after 6 hours ends `timeout`, not charged (a safety net). Submit answers show the numbers (`X-Concurrency-*`). |
    + | Per end user | none | Only if your org sets a daily cap, and only when you send `end_user_id`: `429 END_USER_LIMIT_REACHED`, resets 00:00 UTC. |
    + | Maximum job time | image 60 s, video 300 s | Per style (`max_job_seconds`), counted from when the job starts (`processing`). Past it the job ends `timeout`, not charged. |
      | Submit answer time | well under 3 seconds | The submit only validates, reserves the price and queues the job. |
      | Output files | at least 7 days | See [Output](#output). |
    ⋯
  10. 17 Oct 2026 · +3 −3 lines
    Show changes
    ⋯
      
      - `url` is an HTTPS link on Wandura storage (the Wandura CDN), downloadable directly with a plain GET. It is not a link to any third party.
    - - **Kept for 72 hours.** `expires_at` says exactly when. Copy the file to your own storage before then.
    + - **Works for at least 7 days.** `expires_at` says until when the link is guaranteed. Copy the file to your own storage before then if you need it longer.
      - Metadata is read from the file: `type`, `width`, `height`, `duration` and `fps` (video), `size_bytes`, `seed`. A value that cannot be read is `null`.
      - Test-key samples carry `null` metadata and do not expire.
    - - The job record itself is kept well past 72 hours: `GET /v2/jobs/{job_id}` keeps answering for old jobs.
    + - The job record itself is kept well past 7 days: `GET /v2/jobs/{job_id}` keeps answering for old jobs.
      
      ## Webhooks {#webhooks}
    ⋯
      | Maximum job time | image 60 s, video 300 s | Per style (`max_job_seconds`). Past it the job ends `timeout`, not charged. |
      | Submit answer time | well under 3 seconds | The submit only validates, reserves the price and queues the job. |
    - | Output files | 72 hours | See [Output](#output). |
    + | Output files | at least 7 days | See [Output](#output). |
      
      Live status and maintenance notices: [wandura.instatus.com](https://wandura.instatus.com). No uptime SLA is committed yet.
    ⋯
  11. 16 Oct 2026 · +39 −1 lines
    Show changes
      # Image and video generation: the Jobs API
      
    - > **TL;DR** — `POST /v2/jobs` with a model, a style and your inputs returns a `job_id` in about a second. Wandura generates in the background and POSTs the signed final job to your `webhook_url`; `GET /v2/jobs/{job_id}` is the fallback. Test keys (`wdr_test_…`) are a free sandbox. A bad body is refused at once with `422` and the reason; a job that fails, times out, is cancelled or is blocked by moderation is **not charged**.
    + > **TL;DR** — `POST /v2/jobs` with a model, a style and your inputs returns a `job_id` in about a second. Wandura generates in the background and POSTs the signed final job to your `webhook_url`; `GET /v2/jobs/{job_id}` is the fallback. Test keys (`wdr_test_…`) are a free sandbox. A bad body is refused at once with `422` and the reason; a job that fails, times out, is cancelled or is blocked by moderation is **not charged**. This is the recommended way in for every new integration.
      
      ## Basics {#basics}
    ⋯
      | `webhook_url` | Optional. A public https URL that gets the final job, signed with your product's Jobs API signing secret or, if it has none, its Webhook endpoint's signing secret. Needs one of the two first (see [Webhooks](#webhooks)). |
      | `end_user_id` | Optional. Your id for the person the job is for; when you send it, a per-person daily cap applies (see [Limits](#limits)). |
    + | `lane` | **Rolling out.** Optional: `priority` (default) or `relax`. See [Relax lane and a style's own inputs](#lane-and-inputs). |
    + | `inputs` | **Rolling out.** Optional object: the style's own inputs that no field above carries. See [Relax lane and a style's own inputs](#lane-and-inputs). |
      
      - **Input URLs are downloaded when the job starts**, not when you submit. A URL that cannot be downloaded ends the job `failed`, not charged. Keep a presigned URL valid for at least the style's `max_job_seconds` plus 10 minutes.
      - **Cancel** works while the job is `queued`: `200`, status `cancelled`, not charged, and the webhook fires. Once the job is `processing` it runs to the end, and cancel answers `409 JOB_NOT_CANCELLABLE`.
      
    + ## Relax lane and a style's own inputs {#lane-and-inputs}
    + 
    + **Rolling out.** Two optional fields of `POST /v2/jobs`, so every style a key can run also runs as a job. A body without them is answered exactly as before.
    + 
    + **`lane`**: `priority` (default) or `relax`.
    + 
    + | | `priority` | `relax` |
    + |---|---|---|
    + | Price | The style's Priority price | The style's Relax price, never above Priority |
    + | Deadline | `max_job_seconds`; past it the job ends `timeout`, not charged | None: the job waits in line until it runs |
    + | When the product is full | `429 PRODUCT_BUSY` | Never refused for that; the job waits as `queued` |
    + 
    + The job body is the same for both lanes (it has no `lane` field). Both prices are in the public catalog (`GET /v2/public/styles`, `price.priority` and `price.relax`).
    + 
    + **`inputs`**: an object of the style's own inputs that no field of the table above carries, named as in the style's input schema. Examples: a `keep_audio` switch, a second text field (`prompt` fills the first), a `mask_url`, or a `video_url` on an image style.
    + 
    + ```bash
    + curl -X POST https://api.wandura.ai/v2/jobs \
    +   -H "Authorization: Bearer $WANDURA_KEY" -H "Content-Type: application/json" \
    +   -d '{"model": "wandura-video-v1", "style": "<style id>", "image_urls": ["https://…/photo.jpg"], "lane": "relax", "inputs": {"keep_audio": false}}'
    + ```
    + 
    + - **Where to find a style's inputs**: `GET /v2/public/styles/{style}` → `inputs` (no key). Each style's OpenAPI, `GET /v2/public/styles/{style}/openapi.json`, carries the exact `POST /v2/jobs` body for that style, with an example.
    + - An input that a field above carries goes in that field, not in `inputs`: `{"field": "inputs.image_urls", "reason": "send it as image_urls"}`.
    + - A style whose **required** input is not one of the fields above runs only when the body sends `inputs`. It is not listed in `GET /v2/styles` or the model schema; without `inputs` it gets the same `422` as an unknown style.
    + - `GET /v2/models/{model_id}/schema` lists only the fields of the table above; `lane` and `inputs` are in the [OpenAPI](https://api.wandura.ai/v2/openapi.json) (`JobRequest`).
    + - Audio styles are not on the Jobs API yet.
    + 
    + Problems with these fields come back as `422 INVALID_INPUT` details, like every other field:
    + 
    + | `field` | `reason` |
    + |---|---|
    + | `lane` | `must be priority or relax` |
    + | `inputs` | `must be an object of the style's own inputs` |
    + | `inputs.<name>` | `send it as <field>` · `style <id> does not take this input` · `must be true or false` · `must be a public https URL (at most 8192 characters)` · `must be a list of 1 to 10 https URLs` · `must be a string of at most 4000 characters` · `required by style <id>` |
    + 
      ## Validation is strict and synchronous {#validation}
      
    ⋯
  12. 16 Oct 2026 · +3 −3 lines
    Show changes
    ⋯
      | `negative_prompt`, `aspect_ratio`, `resolution`, `duration`, `seed` | Only for styles that list them in `inputs`. See [Validation](#validation). |
      | `num_outputs` | Optional, must be `1`: one output per job. |
    - | `webhook_url` | Optional. A public https URL that gets the final job, signed. Needs your product's Jobs API signing secret first (see [Webhooks](#webhooks)). |
    + | `webhook_url` | Optional. A public https URL that gets the final job, signed with your product's Jobs API signing secret or, if it has none, its Webhook endpoint's signing secret. Needs one of the two first (see [Webhooks](#webhooks)). |
      | `end_user_id` | Optional. Your id for the person the job is for; when you send it, a per-person daily cap applies (see [Limits](#limits)). |
      
    ⋯
      Each job with a `webhook_url` gets **one** POST when it reaches a final status (no intermediate webhooks). The body is exactly what `GET /v2/jobs/{job_id}` returns at that moment.
      
    - 1. **Create your product's Jobs API signing secret once**: in the [console](https://open.wandura.ai/webhooks), "Jobs API signing secret" → Create. It is shown once; Roll replaces it at once. Until it exists, a submit with `webhook_url` is refused with `422`.
    + 1. **Have a signing secret once**: in the [console](https://open.wandura.ai/webhooks), either save a Webhook endpoint URL (its signing secret then signs job webhooks too), or create a dedicated "Jobs API signing secret" (Create; it is shown once; Roll replaces it at once). When the product has a Jobs API signing secret, that one signs job webhooks. Until it has one of the two, a submit with `webhook_url` is refused with `422`.
      2. **Verify every request** on the **raw body**: `X-Signature` is the hex HMAC-SHA256 of `X-Timestamp + "." + raw body` with your secret, and `X-Timestamp` (unix seconds) is within 5 minutes of now.
      3. **Answer `2xx` within 10 seconds**, then do your work. Dedupe on `job_id` (or the `Wandura-Event-Id` header, the same on every retry): delivery is at least once.
    ⋯
      ## Errors {#errors}
      
    - Every error answer is `{"error": {"code", "message", "retryable"}}`, plus `details` for `INVALID_INPUT`. Branch on `code`; quote the `X-Request-Id` header when you ask for support.
    + Every error answer is `{"error": {"code", "message", "retryable"}}`, plus `details` for `INVALID_INPUT`. Branch on `code`; quote the `X-Request-Id` header when you ask for support. **Rolling out:** each error also carries `docs_url`, a link to its section on the [Errors](errors.md#jobs-errors) page, and the headers `Wandura-Error-Code` and `Wandura-Should-Retry` (see [Error body and headers](errors.md#error-body)).
      
      | HTTP | `code` | `retryable` | Meaning |
    ⋯
  13. 16 Oct 2026 · +1 −1 lines
    Show changes
    ⋯
      | 401 | `UNAUTHORIZED` | false | Missing, unknown, revoked or expired API key. |
      | 402 | `INSUFFICIENT_CREDITS` | false | The product's wallet cannot cover the job. Add funds, then retry. |
    - | 403 | `FORBIDDEN` | false | The key is valid but may not do this. Reserved: not returned today. |
    + | 403 | `FORBIDDEN` | false | The key is valid but may not do this. Rolling out: a key with the Read only permission submitting or cancelling, or a key limited to other styles (see [API keys](concepts.md#api-keys)). Not returned before that. |
      | 404 | `NOT_FOUND` | false | No such job, model or endpoint for this key. |
      | 409 | `IDEMPOTENCY_KEY_REUSED` | false | This `Idempotency-Key` was already used with a different body. |
    ⋯
  14. 15 Oct 2026 · +7 −3 lines
    Show changes
    ⋯
      # X-RateLimit-Remaining: 59
      # X-RateLimit-Reset: 1791897360
    + # X-Concurrency-Limit: 20
    + # X-Concurrency-Running: 3
    + # X-Concurrency-Waiting: 0
      # {"job_id":"run_QVqsXwr7VGSP","status":"queued","model":"wandura-video-v1","created_at":"2026-10-13T13:15:40.825Z"}
      
    ⋯
      | 409 | `JOB_NOT_CANCELLABLE` | false | Only queued jobs can be cancelled. |
      | 429 | `RATE_LIMITED` | true | Too many jobs submitted this minute for this product. Retry after `Retry-After`. |
    + | 429 | `PRODUCT_BUSY` | true | Your product's concurrency slots and its queue are full. Retry after `Retry-After` (about 5 s). |
      | 429 | `END_USER_LIMIT_REACHED` | true | This end user reached the daily job cap. Retry after `Retry-After` (resets 00:00 UTC). |
      | 500 | `INTERNAL_ERROR` | true | Something went wrong on Wandura's side. Retry with the same `Idempotency-Key`. |
    - | 503 | `SERVICE_UNAVAILABLE` | true | This style cannot run on a live key right now. Test keys still return a sample. |
    + | 503 | `SERVICE_UNAVAILABLE` | true | This style cannot run on a live key right now (test keys still return a sample). Or the job queue is briefly unavailable: nothing was created or charged; retry after `Retry-After` with the same `Idempotency-Key`. |
      
    - A `429` always carries a `Retry-After` header (seconds). Wait that long, add a little random jitter, and retry with the **same** `Idempotency-Key`. Retry only the errors marked `retryable`.
    + A `429` always carries a `Retry-After` header (seconds). Wait that long, add a little random jitter, and retry with the **same** `Idempotency-Key`. Retry only the errors marked `retryable`. Submit answers, `429` included, also carry `X-Concurrency-Limit`, `X-Concurrency-Running` and `X-Concurrency-Waiting`: see [Queue and congestion](queue-and-congestion.md).
      
      ```http
    ⋯
      |---|---|---|
      | Submit rate | 60 jobs per minute per product | Live and test keys count apart. Over it: `429 RATE_LIMITED` with `Retry-After`. Every submit answers `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`. |
    - | Jobs running at once | 20 per product | Further jobs wait as `queued`. A job still waiting at its maximum job time ends `timeout`, not charged. |
    + | Jobs running at once | 20 per product | Further jobs wait as `queued`. As many jobs can wait as you have slots; past that, `429 PRODUCT_BUSY` with `Retry-After`. A job still waiting at its maximum job time ends `timeout`, not charged. Submit answers show the numbers (`X-Concurrency-*`). |
      | Per end user | 20 jobs per day | Only when you send `end_user_id`. Resets 00:00 UTC; `429 END_USER_LIMIT_REACHED`. |
      | Maximum job time | image 60 s, video 300 s | Per style (`max_job_seconds`). Past it the job ends `timeout`, not charged. |
    ⋯
  15. 13 Oct 2026 · Page created
↑↓ selectEnter openEsc close

Send feedback

Your message goes straight to the Wandura team. It includes the address of this page.

0 / 4000