anoman
Reference · Images

POST /v1/images/generations

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:

curl https://api.anoman.io/v1/images/generations \
  -H "Authorization: Bearer anm-sk-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "flux-schnell",
    "prompt": "A ceramic coffee mug on a walnut desk, soft morning light",
    "n": 1,
    "enhance": true,
    "style": "product-photo",
    "response_format": "b64_json"
  }'
FieldDescription
modelModel allowlist: flux-schnell (default, ~$0.003/image) and flux-1.1-pro (~$0.04/image). Any other value returns 400.
promptThe text prompt. Required.
nNumber of images, 1–4. Defaults to 1.
enhanceWhen 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.
styleOptional preset that steers the look: product-photo, editorial, flat-illustration, 3d-render, cinematic.
response_formatPass 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.

{
  "created": 1740086400,
  "data": [
    {
      "b64_json": "iVBORw0KGgoAAAANSUhEUg...",
      "revised_prompt": "Studio product photograph of a matte ceramic coffee mug..."
    }
  ],
  "_anoman": {
    "enhanced": true,
    "enhanced_prompt": "Studio product photograph of a matte ceramic coffee mug on a walnut desk, soft directional morning light, shallow depth of field, 50mm"
  }
}

Design in the studio.

Prompt composer, styles, Fast/Quality, palettes — all guarded.