Skip to main content
POST
  • Google Gemini 2.5 Flash efficient image generation model (Nano banana)
  • Use model parameter to select gemini-2.5-flash-image-preview model
  • Supports text-to-image generation
  • Async task management, query results by task ID
Important Change: For better performance and cost control, we no longer support passing base64 image data directly in image_urls. Please use the Upload 画像API first to upload images and get URLs, then call this endpoint.

Authorizations

string
必須
All endpoints require Bearer Token authenticationGet your API Key from the API Key Management PageAdd to request header:

Body

string
デフォルト:"gemini-2.5-flash-image-preview"
必須
Image generation model nameモデル alias: nano-bananaExample: "gemini-2.5-flash-image-preview"
string
必須
Text description for image generationMaximum 1000 characters
string
Image size ratioSupported formats:
integer
デフォルト:1
Number of images to generateFixed at 1⚠️ Note: Must be a pure number (e.g. 1), do not add quotes, otherwise it will error
object[]
List of reference image URLs for image-to-image or image editingLimit: Maximum 14 images
object
Metadata parameters for passing additional configuration options

レスポンス

string
Unique task identifier for status queries
string
Object type, always generation.task
string
モデル name used
string
Task status
  • queued - Queued for processing
  • in_progress - Processing
  • completed - Successfully completed
  • failed - Failed
integer
Task progress percentage (0-100)
integer
Task creation timestamp (Unix timestamp)
object
Task metadata