Quickstart
What this lets you do
Make your first DreamLayer image from the command line, using nothing butcurl and an API key.
What you need
- A DreamLayer account at platform.dreamlayer.io
- Credits on that account. Every successful image costs one credit, and a new account starts at zero, so buy a pack before your first call
- An API key from the Developer console
curl
Steps
1. Store the key
2. Send the first request
started, thinking, progress, job, question, asset, and done. Only done is terminal. thinking carries no text and simply means work is in flight.
3. Choose deterministic execution when you already know the operation
By default DreamLayer reads the prompt and decides what you meant, which can come back as aquestion event asking you to clarify. A script that already knows what it wants can say so and skip that entirely:
text_to_image must not carry an input_asset_id. Every other operation requires one:
image_to_image, background_remove, and upscale.
upscale doubles each side, so the input’s longest side must be 2048 or smaller. An
oversize request is refused before any provider is paid.
4. Download the result
Theasset event carries a download_url. Follow redirects when you fetch it: large images are served straight from storage rather than proxied.
For example, the stream includes an event shaped like this:
Confirm it worked
The stream ends with adone event whose status is completed, the download writes a PNG, and the Usage page in the console shows one settled credit.