dreamlayer_generate
Generate original images, edits, cutouts, upscales, or sprite animations from a text prompt or reference image, with paid work capped by your credit budget.
Instructions
Use when the user needs an original image, raster logo concept, product or marketing visual, an edit, transparent cutout, upscale, or reference-based sprite animation. Starts paid work within the user's authorized scope and budget. Text-to-image needs a prompt; other operations need input_asset_id. Select operation explicitly. Image operations cost one credit; sprite beta accepts 7–100 frames and returns a ZIP. Read sprite_pricing, round the whole quote upward once to 0.1 credit and set max_credits. Returns execution_id, status, asset, question and last_event_id. needs_input is a question; running work must be resumed, not replaced. No sprite cancellation; failed/expired holds are restored. Not a vector-logo, print-validation, product-fidelity or animation-quality guarantee.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | No | What to generate, or how to change the reference, in plain language (1–4000 characters). Required unless respond is used; text_to_image needs it, and a short statement of intent is enough for background_remove or upscale. | |
| options | No | Sprites: supply exactly one of action (legacy preset) or animation_prompt (any subject/action, including turntables). animation_mode defaults to loop for presets, once for custom prompts. Broad requests do not guarantee quality; partial transparency depends on background removal. | |
| respond | No | Answer a previous question. Requires conversation_id. | |
| operation | No | Name it to run deterministically and skip interpretation, so the request cannot come back as a question. Omit it to let DreamLayer read the prompt. | |
| max_credits | No | Spending cap for this request in credits (0.1–100, default 1). Image operations require exactly 1. Sprite jobs must be capped at or above the sprite_pricing quote rounded up to one decimal. | |
| aspect_ratio | No | Output aspect ratio (default 1:1). | |
| input_asset_id | No | From dreamlayer_upload_image. Required for every operation except text_to_image. | |
| conversation_id | No | UUID of an existing conversation to continue, as returned by an earlier dreamlayer_generate call. Required with respond; omit to start a new conversation. | |
| idempotency_key | No | Choose and save one key per logical request before calling. Reuse that key AND identical arguments after an uncertain response. If omitted, a generated key is returned for recovery. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset | No | ||
| error | No | ||
| events | No | ||
| status | No | ||
| question | No | ||
| execution_id | No | ||
| last_event_id | No |