Skip to main content
POST
Start or replay an execution

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

DreamLayer-Version
string
required
Allowed value: "1"
Idempotency-Key
string
required
Required string length: 1 - 200

Body

application/json
operation
enum<string>
required

Optional. Name the operation to execute it deterministically: DreamLayer skips interpreting the prompt, so the request cannot be reclassified and cannot return a question event. No word in the prompt changes a named operation, and a named operation ignores an image remembered from an earlier turn in the same conversation. Omit it to let DreamLayer decide from the prompt. text_to_image must not carry input_asset_id; image_to_image, background_remove, upscale and sprite_sheet require it. sprite_sheet requires exactly one of options.action or options.animation_prompt. Set max_credits to at least the rounded quote for the requested frame_count using sprite_pricing from capabilities. Put custom animation instructions in options.animation_prompt, not prompt. Sprite requests have no customer cancellation. Other operations require max_credits of 1 and do not accept options.

upscale doubles each side, so the input's longest side must be 2048 or smaller: 4096 is the delivery ceiling and an oversize request is refused at execution admission before paid processing starts. That also means an upscaled image is AT maximum_input_dimension and cannot be upscaled again.

Available options:
text_to_image,
image_to_image,
background_remove,
upscale,
sprite_sheet
Allowed value: "sprite_sheet"
input_asset_id
string<uuid>
required
options
object
required

Supply exactly one non-null action or animation_prompt. Presets default to loop playback; custom instructions default to once. Frame size affects the square export canvas, not price or guaranteed source detail. Insufficient distinct frames fail explicitly; frames are not duplicated or interpolated to meet the count.

Example:
prompt
string
Required string length: 1 - 4000
respond
string
Required string length: 1 - 4000
conversation_id
string<uuid>
aspect_ratio
string
default:1:1
max_credits
number
default:1
Required range: 0.1 <= x <= 100

Response

Sanitized server-sent events

The response is of type string.