Skip to main content
POST
Layerize Assets

Authorizations

Authorization
string
header
required

API key from Settings > Developer > REST API

Headers

Moda-Version
enum<string>
default:2026-05-01

Calendar-dated API version pin. New integrations should pin 2026-05-01 to opt into the newest response shapes. For back-compat the server also accepts requests with no header and resolves them to the current default (today: 2026-04-12); that default advances on each sunset date. Any unsupported value returns 400 unsupported_version.

Available options:
2026-04-12,
2026-05-01
Example:

"2026-05-01"

Body

application/json
image
string
required

Accessible file_ upload reference or HTTP(S) raster image URL.

Required string length: 1 - 8192
mode
enum<string>
default:full

Full reconstruction, or text separation over the remaining artwork.

Available options:
full,
text
idempotency_key
string | null
Required string length: 1 - 255
callback_url
string | null
Required string length: 1 - 2048

Response

Successful Response

Canonical wire-format for every async design operation.

All consumers -- REST, webhooks, SSE, MCP -- serialize through Task.from_db() so the shape is always consistent.

id
string
required

Prefixed task_... identifier.

Pattern: ^task_[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
Example:

"task_01HT9WK8N3M2J4A5Z6P7Q8R9TV"

kind
enum<string>
required

Discriminator for the kind-specific result payload.

Available options:
design,
export,
remix,
brand_kit_extract,
layerize_assets
status
enum<string>
required

Current lifecycle status.

Available options:
queued,
running,
succeeded,
failed,
canceled,
expired
attempt
integer
required

Current attempt number (1-based).

max_attempts
integer
required

Maximum attempts before dead-lettering.

attempts_started
integer
required

Number of attempts STARTED (claimed by a worker) — never attempts completed. 0 means the task has never been claimed. The claim itself increments the counter, so a task on its first attempt reports 1 while RUNNING and stays at 1 through that attempt's retry backoff. The retry signal is therefore status == "queued" && attempts_started >= 1 (a queued task that has already burned an attempt), NOT >= 2. Unlike attempt, this is the raw counter and is not floored to 1.

HATEOAS links for this task.

created_at
string | null

ISO 8601 timestamp.

started_at
string | null

ISO 8601 timestamp.

completed_at
string | null

ISO 8601 timestamp.

progress
TaskProgress · object | null

Live progress for running tasks. Null when not applicable.

first_started_at
string | null

ISO 8601 timestamp of when the FIRST attempt was claimed. null means unknown — either the task has never started, or it predates this field being recorded. started_at remains the CURRENT attempt's start, so on a retried task the two differ and the gap is the real wall-clock age of the work.

input
Input · object | null

Sanitized echo of the original request.

result
TaskResult · object

Result payload of a design or remix task.

Populated when status is succeeded, and partially populated for some in-flight tasks (a remix surfaces its source canvas before the design task finishes). Extra keys are permitted so synchronous-completion payloads pass through without schema churn.

error
Error · object | null

Error info: {message, retryable, attempt}. Present for failed tasks, and also for a NON-terminal task that carries an error from an earlier attempt — on a non-terminal task this always describes the PREVIOUS, already-dead attempt, never the one currently in flight. attempt is the attempts_started value the error is tied to (0 when the failure happened before any claim).

credits
CreditUsage · object | null

Credit usage. Present only for completed tasks when billing is enabled.

retry_after_ms
integer | null

Suggested milliseconds to wait before the next poll. Null for terminal tasks.