Bria Ad Delayer API Documentation
Playground
Try it on WaveSpeedAI!Bria Ad Delayer splits flat advertisement images into editable image, text, and vector layers, returning a complete structured layer document as JSON for ad editing, localization, redesign, marketing creatives, and production workflows. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
Features
Bria Ad Delayer converts a flat advertisement image into editable layer data. It separates the source ad into components such as background, product cutouts, logo cutouts, text, and vector shapes, then returns the complete layer document as JSON.
Why Choose This?
-
Ad layer decomposition
Convert a flat advertisement into structured editable layers. -
Text and vector extraction
Extract text and vector-style elements as structured layer data. -
Product and logo cutouts
Separate key visual assets such as products and logos from the original ad. -
Editable text modes
Usesvgto preserve traced letterforms orfontfor editable text with the nearest matching font. -
JSON workflow output
Receive the upstream layer document for custom editors, rendering pipelines, and design workflows.
Parameters
| Parameter | Required | Description |
|---|---|---|
| image | Yes | Public URL of the source advertisement image, supplied directly or through the image uploader. |
| text_mode | No | Text layer mode: svg or font. Default: svg. svg preserves traced letterforms, while font uses editable text with the nearest matching font. |
Use a flat advertisement image rather than an ordinary photograph.
How to Use
- Upload an advertisement image — Provide a flat ad image through the uploader or a public URL.
- Choose text mode optional — Use
svgfor traced letterforms orfontfor editable text. - Submit — Generate the layer document.
- Use the JSON output — Read the layer data from json.
Pricing
Pricing is fixed at $0.30 per successful request.
| Output | Cost |
|---|---|
| One layer document | $0.30 |
Both svg and font modes use the same fixed price. The number of returned layers does not add separate charges.
Best Use Cases
- Ad creative editing — Break flat ad images into editable components.
- Design reconstruction — Recover layout elements from existing ad creatives.
- Text and logo workflows — Extract text, logos, and vector-like elements for editing.
- Custom rendering pipelines — Use JSON layer data to rebuild ads in your own editor.
- Marketing asset reuse — Separate products, backgrounds, and text for downstream creative work.
Pro Tips
- Use flat advertisement images for better layer separation.
- Use
svgwhen preserving original letter shapes matters. - Use
fontwhen editable text is more important than exact traced appearance. - Check whether each layer has
asset_pathbefore treating it as a downloadable asset. - Download the layer document and required linked assets promptly.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
set -euo pipefail
export WAVESPEED_API_KEY="your-api-key"
REQUEST_BODY=$(cat <<'JSON'
{
"image": "https://interactive-examples.mdn.mozilla.net/media/cc0-images/painted-hand-298-332.jpg",
"text_mode": "svg"
}
JSON
)
# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
-X POST "https://api.wavespeed.ai/api/v3/bria/ad-delayer" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
-H "Content-Type: application/json" \
-d "${REQUEST_BODY}")
TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
printf 'Submission response did not contain a prediction id
' >&2
exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"
# 2. Poll until the prediction finishes.
while true; do
RESPONSE=$(curl --silent --show-error --fail-with-body \
"${RESULT_URL}" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}")
RESULT=$(printf '%s' "${RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')
case "${STATUS}" in
completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
failed|cancelled|timeout|deleted) printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
*) sleep 2 ;;
esac
doneParameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| image | string | Yes | - | Public URL of the flat advertisement image to split into editable layers. | |
| text_mode | string | No | svg | svg, font | Use svg to preserve traced letterforms, or font for editable text in the nearest matching font. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Output values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Task status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses. |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction |
| data.model | string | Model ID used for the prediction |
| data.outputs | array<string | object> | Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model. |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Status: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses |
| data.created_at | string | ISO timestamp of when the request was created |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |