POST /v1/images/generations
Reference · Images — an OpenAI-images-compatible endpoint for guarded image generation. Prompts pass content + NSFW moderation before they ever reach the image model.
Overview
Guarded image generation
POST /v1/images/generations is OpenAI-images-compatible and uses your API key (Bearer auth). Every prompt passes the shared media guard (child-safety, violent extremism, NSFW, content moderation; English + Bahasa Indonesia) before it reaches the image model, validated personal data is masked, and each image is priced at the provider's price plus our margin, drawn from your prepaid balance. Images are generated by fal.ai, outside Indonesia.
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 | flux-schnell (default, Fast, Rp 71/image), flux-1.1-pro or recraft-v3 (Quality, Rp 924/image), flux-1.1-pro-ultra (Rp 1.386) or ideogram-v3 (Rp 1.386) (Premium). Current prices are on the models page. Your plan decides which you can use (403 image_model_not_entitled otherwise). Any other value returns 400. |
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. Free plan: 5 Fast images a day, up to 50 a month, at no charge with a verified email, while the monthly free image budget lasts.
- Timeout. 45 seconds per generation.
- Media guard. Runs on the prompt (and on the enhanced prompt when enhance is on). Blocked prompts never reach the model and are not charged.
- Plan gate. A model above your plan returns
403 image_model_not_entitled. - 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, a plan-aware model picker, palettes — all guarded.