Skip to main content

Basic Generation

Generate an image by providing a model and a text prompt.

Image Sizes

Control the output dimensions with the size parameter.

Quality Settings

The quality parameter controls the detail level and generation time.
Use auto for most use cases. It provides the best balance without manual tuning.

Generating Multiple Images

Set n to generate multiple images in a single request.
Generating multiple images multiplies token/credit usage accordingly.

Response Format

Choose between a temporary URL or base64-encoded image data.
URLs are temporary and expire after a short period. If you need to persist the image, download it immediately or use b64_json.

Saving Images Locally

Tips for Better Prompts

Instead of “a dog”, try “a golden retriever sitting in a sunlit meadow, photorealistic, soft bokeh background”. More detail gives the model stronger guidance.
Include style cues like “watercolor”, “3D render”, “pixel art”, “oil painting”, or “studio photography” to steer the aesthetic.
Mention framing details such as “close-up”, “bird’s-eye view”, “centered”, or “rule of thirds” for more intentional compositions.