POST /v1/images/generations
Reference · Images — an OpenAI-images-compatible endpoint for guarded image generation. Prompts pass content + NSFW moderation before they ever reach Flux.
Overview
Guarded image generation
POST /v1/images/generations is OpenAI-images-compatible and uses your API key (Bearer auth). Every prompt runs through content moderation and an NSFW guard (English + Bahasa Indonesia) before it reaches the image model, and spend is metered like any other usage.
This page is the terse request/response reference. For the full walkthrough — enhance, styles, the studio UI, and cost — see the Image generation guide.
Request
Request body
Send a JSON body with the prompt and generation options:
| Field | Description |
|---|---|
model | Model allowlist: flux-schnell (default, flux-1.1-pro ( |
prompt | The text prompt. Required. |
n | Number of images, 1–4. Defaults to 1. |
enhance | When true, a cheap LLM art-director rewrites the prompt for quality and strips 'AI slop'. The guard re-runs on the enhanced prompt before the image model. |
style | Optional preset that steers the look: product-photo, editorial, flat-illustration, 3d-render, cinematic. |
response_format | Pass b64_json to receive base64 images inline. Otherwise the response returns ephemeral provider URLs. |
Limits & guards
What's enforced
- Daily cap. 100 images per API key per day.
- Timeout. 90 seconds per generation.
- Content + NSFW guard. Runs on the prompt (and on the enhanced prompt when enhance is on). Blocked prompts never reach the model.
- Unknown model. Any model outside the allowlist returns
400.
Response
Response body
Each item carries data[].b64_json (when response_format is b64_json) or data[].url (ephemeral). revised_prompt reflects the final prompt actually sent to the model, and _anoman.enhanced_prompt surfaces the art-director's rewritten prompt.
Design in the studio.
Prompt composer, styles, Fast/Quality, palettes — all guarded.