Skip to main content
POST
/
v1
/
images
/
generations
/
gemini-2.5-flash-image-preview
Gemini-2.5-Flash-Image-preview Image Generation
curl --request POST \
  --url https://apiif.com/v1/images/generations/gemini-2.5-flash-image-preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "gemini-2.5-flash-image-preview",
  "prompt": "A bamboo forest path under moonlight",
  "size": "1:1",
  "n": 1
}
'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01K8SGYNNNVBQTXNR4MM964S7K"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
string
required

Image generation model name

prompt
string
required

Text description for image generation

size
string

Aspect ratio (e.g., 1:1, 16:9)

resolution
string

Output resolution (1K/2K/4K)

n
integer

Number of images to generate

Required range: 1 <= x <= 15
image_urls
string<uri>[]

Reference image URLs (for image-to-image / editing)

mask_url
string

Mask image URL (PNG) for editing

watermark
boolean

Whether to add a watermark

sequential_image_generation
string

Controls sequential generation (auto/disabled)

sequential_image_generation_options
object
optimize_prompt_options
object

Response

Task submitted