Generate an image
generate_imageGenerate an image from a text prompt with optional style, quality, aspect ratio, and negative prompt. Uses 2DAI account credits and returns the result or a queue ID for async polling.
Instructions
Generate an image on the 2DAI account from a text prompt. This SPENDS the account's credit. Returns the finished creation when it lands within the wait budget, otherwise a queueId to poll with check_generation. Style and quality default to "auto" (the server picks by tier).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Block until the image is ready (default true). Set false to get a queueId immediately. | |
| style | No | Style id, or "auto" (default) to let the server choose. | |
| prompt | Yes | What to generate. Be specific; this drives the whole image. | |
| quality | No | Quality preset id, or "auto" (default) to pick by tier. | |
| allowNSFW | No | Permit adult content, if the account allows it. | |
| aspectRatio | No | Shape of the output. Defaults to 1:1. | |
| negativePrompt | No | What to avoid in the image. |