# Decompose an ad into layers

Turn a flat ad image into editable layers, returned as one structured JSON document: a background plate, product and logo cutouts, live text with typography, and vector shapes. Trained exclusively on licensed data for safe commercial use. Latency is on average under 1 minute.
**How it works**
1. Submit the ad. The response carries a `request_id` and a `status_url`.
2. Poll the `status_url` ([status endpoint](/status)) or pass a `webhook_url` ([webhooks](/getting-started/async-requests#webhooks)). Both deliver the completion payload shown under **Callbacks** below.
3. On completion, `result.url` points to the hosted layer document; each image layer's `asset_path` is a hosted file. The document and its assets stay downloadable for 30 days.

**Input assumptions**
The input is assumed to be a flat ad. Ordinary photographs are out of scope and the result is not guaranteed. Unknown fields are currently ignored rather than rejected, so a misspelled parameter silently falls back to its default. Submissions are not idempotent: a retried POST is a new job. Failed jobs are never billed.
**Reporting a problem**
The `request_id` in an error body identifies that response, not your job. The durable handle is the id inside the `status_url` you received at submit; quote that.
**The layer document**
The field-by-field contract (document, layer, image, vector and text fields), the two halves of every copy layer, a real example and a rendering guide are in the [Ad Delayer guide](/ad-delayer-overview#the-layer-document).

Endpoint: POST /ads/delayer
Security: api_token

## Request fields (application/json):

  - `attachments` (array, required)
    Exactly one image: a publicly reachable URL, or a `data:image/…;base64,…` URI. PNG, JPEG or WEBP, up to 10 MB and 1350 px per dimension (Enterprise accounts have no dimension cap). More than one entry is rejected. This parameter is required.

  - `webhook_url` (string)
    Optional URL that receives the completion payload by POST when the job reaches a terminal state, with the same body as a status poll. See [webhooks](/getting-started/async-requests#webhooks).

## Response 200 fields (application/json):

  - `request_id` (string, required)
    Example: 860f1a2b73f847e59f284d6f860f2ddb

  - `status_url` (string, required)
    Example: https://engine.prod.bria-api.com/v2/status/860f1a2b73f847e59f284d6f860f2ddb

## Response 400 fields (application/json):

  - `error` (object, required)

  - `error.code` (integer, required)
    Example: 422

  - `error.message` (string, required)
    Example: Unprocessable Entity

  - `error.details` (string, required)
    Example: ['Invalid Input -> only one image URL is supported per request']

  - `request_id` (string, required)
    Identifies this response, not your job; the durable handle is the id inside the `status_url` you received at submit.
    Example: 3a51f1c2f0de4b6c9a3e2b41a7c9d0e8

## Response 401 fields (application/json):

  - `error` (object, required)

  - `error.code` (integer, required)
    Example: 422

  - `error.message` (string, required)
    Example: Unprocessable Entity

  - `error.details` (string, required)
    Example: ['Invalid Input -> only one image URL is supported per request']

  - `request_id` (string, required)
    Identifies this response, not your job; the durable handle is the id inside the `status_url` you received at submit.
    Example: 3a51f1c2f0de4b6c9a3e2b41a7c9d0e8

## Response 413 fields (application/json):

  - `error` (object, required)

  - `error.code` (integer, required)
    Example: 422

  - `error.message` (string, required)
    Example: Unprocessable Entity

  - `error.details` (string, required)
    Example: ['Invalid Input -> only one image URL is supported per request']

  - `request_id` (string, required)
    Identifies this response, not your job; the durable handle is the id inside the `status_url` you received at submit.
    Example: 3a51f1c2f0de4b6c9a3e2b41a7c9d0e8

## Response 422 fields (application/json):

  - `error` (object, required)

  - `error.code` (integer, required)
    Example: 422

  - `error.message` (string, required)
    Example: Unprocessable Entity

  - `error.details` (string, required)
    Example: ['Invalid Input -> only one image URL is supported per request']

  - `request_id` (string, required)
    Identifies this response, not your job; the durable handle is the id inside the `status_url` you received at submit.
    Example: 3a51f1c2f0de4b6c9a3e2b41a7c9d0e8

## Response 429 fields (application/json):

  - `error` (object, required)

  - `error.code` (integer, required)
    Example: 422

  - `error.message` (string, required)
    Example: Unprocessable Entity

  - `error.details` (string, required)
    Example: ['Invalid Input -> only one image URL is supported per request']

  - `request_id` (string, required)
    Identifies this response, not your job; the durable handle is the id inside the `status_url` you received at submit.
    Example: 3a51f1c2f0de4b6c9a3e2b41a7c9d0e8

## Response 5XX fields (application/json):

  - `error` (object, required)

  - `error.code` (integer, required)
    Example: 422

  - `error.message` (string, required)
    Example: Unprocessable Entity

  - `error.details` (string, required)
    Example: ['Invalid Input -> only one image URL is supported per request']

  - `request_id` (string, required)
    Identifies this response, not your job; the durable handle is the id inside the `status_url` you received at submit.
    Example: 3a51f1c2f0de4b6c9a3e2b41a7c9d0e8

