Gemini Flash Image

gemini-3.1-flash-image-preview — fast generation and multi-reference compositing (tested live)

gemini-3.1-flash-image-preview is a fast image model that shines at compositing from many reference images — it accepts up to 14 image_urls, so it's great for blending multiple subjects, styles or products into one scene. Async task; poll for status.

Tested live: the example below is a real call to api.aiclonevoicefree.com. Endpoint: POST /api/v2/image/generateAuth: Authorization: Bearer sk_...

Request

FieldTypeRequiredNotes
promptstringText prompt
modelstringgemini-3.1-flash-image-preview
sizestring1:1 (default) / 16:9 / 9:16
image_urlsstring[]Reference images, up to 14
seedintRandom seed
curl -X POST https://api.aiclonevoicefree.com/api/v2/image/generate \
  -H "Authorization: Bearer sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a corgi under cherry blossoms, cinematic",
    "model": "gemini-3.1-flash-image-preview",
    "size": "16:9"
  }'

Response 202

{ "task_id": "273e36005d4f40209ba92a48567a5db4", "status": "pending", "capability": "image", "action": "generate", "model": "gemini-3.1-flash-image-preview" }

Multi-reference compositing — up to 14 images:

curl -X POST https://api.aiclonevoicefree.com/api/v2/image/generate \
  -H "Authorization: Bearer sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "place all three products on a marble table, studio lighting",
    "model": "gemini-3.1-flash-image-preview",
    "image_urls": ["https://example.com/a.png", "https://example.com/b.png", "https://example.com/c.png"]
  }'

Getting the result

Poll GET /api/v2/tasks/{task_id}; when done (real result from the test call above):

{
  "status": "completed",
  "capability": "image",
  "_type": "image.generate",
  "imageUrl": "https://upload.apib.ai/f/image/...0.png"
}

Billing

Flat 3 video credits per image — independent of size or the number of reference images; n is fixed to 1.

Example: one image, even with 14 reference images = 3 credits.

Settled on completion, failures auto-refunded (see Conventions). Uses video credits.

On this page