Google Gemini
Gemini 3.1 Flash Image Preview (Nano Banana 2)
Create asynchronous image tasks with gemini-3.1-flash-image-preview (alias Nano Banana 2) via POST /v1/predictions (function image).
POST
Authorizations
Authorization: Bearer YOUR_API_KEY
Body
application/json
Model ID. Use gemini-3.1-flash-image-preview (alias Nano Banana 2) for this endpoint.
Available options:
gemini-3.1-flash-image-preview Example:
"gemini-3.1-flash-image-preview"
Task type. Must be image for image generation.
Available options:
image Example:
"image"
Optional HTTPS callback URL when the task completes, fails, or is cancelled (Predictions API).
Response
Async task created