Skip to content

Image Generation

Text-to-image POST /v1/images/generations · Image-to-image POST /v1/images/edits · Token group media / media-gen

Available Models

Model nameDescriptionResolutionReference images
gpt-image-2OpenAI image model1K≤3
firefly-gpt-image-2Firefly × GPT image1K · 2K · 4K≤6
nano-banana-2Google — strong at both creating and editing images1K · 2K · 4K≤6
seedream-4.5ByteDance Seedream 4.52K · 4K≤6
flux-kontext-maxFlux — great at editing images on command1K≤4
flux-klein-2Krea Flux Klein1K · 2K≤4
firefly-image-5Adobe Firefly 51K · 2K≤1
imagine-1.5Imagine text-to-image2K
imagine-1.5proImagine Pro text-to-image4K

Express resolution / aspect ratio via the size parameter

In the API, pass size (width x height in pixels) to specify both the aspect ratio and the resolution tier at once: long side ≈1024 → 1K, ≈2048 → 2K, ≈3840 → 4K. Example: "2048x1152" = 16:9 at 2K. In the playground, just click to select. See the live per-tier pricing in the Generation Playground.

Easiest: Use the Generation Playground

  1. Open the Generation Playground and stay on the "🖼 Image" tab
  2. Enter your token (from the media / media-gen group)
  3. Pick a model → write your prompt → choose an aspect ratio / resolution → click "Generate"
  4. Once the image is ready you can download it directly, and your history is kept too

Image-to-Image (Reference Images)

Upload reference images and let the model generate or edit based on them (change the style, tweak details, combine multiple images, and more):

  • Playground: click the "Reference image" area to upload — multiple images supported (limits per the table above, each ≤8MB)
  • API: use POST /v1/images/edits (multipart; the image file field can be passed multiple times), see Calling via the API

Supported Aspect Ratios

Commonly 1:1 · 16:9 · 9:16 · 4:3 · 3:4; some models also support 21:9, 3:2, 2:3, etc. — go by the options shown for that model in the Generation Playground.

How to Write Prompts

  • Be specific: subject + scene + style + lighting. Example: "At dusk, a golden retriever running through a golden wheat field, cinematic, shallow depth of field"
  • If you want a certain quality or style (realistic, illustration, 3D, cyberpunk, etc.), just say so
  • Both Chinese and English work

Integrating Into Your Program

For the full API format plus code examples, see Calling via the API. If something goes wrong, check Common Errors.

Got a problem? Contact support or join our group.