Skip to main content
POST
/
v1
/
tasks
Gemini Image Series
curl --request POST \
  --url https://www.qingbo.dev/v1/tasks \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "action": "<string>",
  "prompt": "<string>",
  "n": 123,
  "seed": 123,
  "aspect_ratio": "<string>",
  "resolution": "<string>",
  "image_urls": [
    "<string>"
  ],
  "callback_url": "<string>",
  "callback_events": [
    "<string>"
  ]
}
'
import requests

url = "https://www.qingbo.dev/v1/tasks"

payload = {
"model": "<string>",
"action": "<string>",
"prompt": "<string>",
"n": 123,
"seed": 123,
"aspect_ratio": "<string>",
"resolution": "<string>",
"image_urls": ["<string>"],
"callback_url": "<string>",
"callback_events": ["<string>"]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
action: '<string>',
prompt: '<string>',
n: 123,
seed: 123,
aspect_ratio: '<string>',
resolution: '<string>',
image_urls: ['<string>'],
callback_url: '<string>',
callback_events: ['<string>']
})
};

fetch('https://www.qingbo.dev/v1/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://www.qingbo.dev/v1/tasks"

payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"action\": \"<string>\",\n \"prompt\": \"<string>\",\n \"n\": 123,\n \"seed\": 123,\n \"aspect_ratio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"callback_url\": \"<string>\",\n \"callback_events\": [\n \"<string>\"\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://www.qingbo.dev/v1/tasks")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"action\": \"<string>\",\n \"prompt\": \"<string>\",\n \"n\": 123,\n \"seed\": 123,\n \"aspect_ratio\": \"<string>\",\n \"resolution\": \"<string>\",\n \"image_urls\": [\n \"<string>\"\n ],\n \"callback_url\": \"<string>\",\n \"callback_events\": [\n \"<string>\"\n ]\n}")
.asString();
{
  "task_id": "task-wave1775309821b950328499",
  "model": "gemini-3-pro-image-preview",
  "action": "generate",
  "status": "queued",
  "created_at": 1775309821040,
  "progress": 0
}
Google Gemini’s native multimodal image series, three generations of Nano Banana plus dual-tier access:
  • Nano Banana 2 (Gemini 3.1 Flash Image Preview) — lightweight fast tier, low latency, low cost, exclusive support for Google text / image search augmentation, ideal for previewing, batches, and iteration
  • Nano Banana Pro (Gemini 3 Pro Image Preview) — flagship tier, native 4K output, professional fidelity, multi-step planning, built-in quality analysis
  • Nano Banana (Gemini 2.5 Flash Image Preview) — previous-generation workhorse, low latency, high cost-performance, multi-image fusion, character consistency
Each generation offers two tiers: standard tier (economical, value-oriented) and official direct tier (higher SLA, higher stability, higher price). The two tiers share the same model and capabilities; the difference lies in the channel and billing. We recommend selecting the corresponding -official model id directly to switch channels (clearer semantics), or you can set official_fallback: true on the standard tier to switch at runtime. Per-image billing. All versions support both Chinese and English prompts.

Pricing

ModelPrice (per image)
gemini-3-pro-image-preview-official$0.1139
gemini-3-pro-image-preview$0.0425
gemini-3.1-flash-image-preview-official$0.05695
gemini-3.1-flash-image-preview$0.031875
gemini-2.5-flash-image-preview-official$0.03315
gemini-2.5-flash-image-preview$0.01328125

Mode Quick Reference

ModeTrigger FieldsSupported Versions
Text-to-imageprompt onlyAll
Image-to-image+ image_urls + action: "image2image"All
Image editing (instruction-based)+ image_urls + action: "edit"All
Multi-image reference fusion+ image_urls (multiple) + action: "reference"All
Search augmentation (grounding)action: "search_grounded" or google_search: true3.1 Flash series only

Examples

curl -X POST https://www.qingbo.dev/v1/tasks \
  -H "Authorization: Bearer $WAVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3-pro-image-preview",
    "prompt": "极简主义工作室人像,柔和侧光,胶片质感,4K 锐利",
    "resolution": "4K",
    "aspect_ratio": "3:2"
  }'
curl -X POST https://www.qingbo.dev/v1/tasks \
  -H "Authorization: Bearer $WAVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3-pro-image-preview",
    "action": "reference",
    "prompt": "把第一张图的角色融入第二张图的场景,保持光影一致",
    "image_urls": [
      "https://cdn.example.com/character.jpg",
      "https://cdn.example.com/scene.jpg"
    ],
    "resolution": "4K",
    "aspect_ratio": "16:9"
  }'
curl -X POST https://www.qingbo.dev/v1/tasks \
  -H "Authorization: Bearer $WAVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-2.5-flash-image-preview",
    "action": "edit",
    "prompt": "把背景换成海边日落,人物保持不变",
    "image_urls": ["https://cdn.example.com/portrait.jpg"],
    "aspect_ratio": "1:1"
  }'
curl -X POST https://www.qingbo.dev/v1/tasks \
  -H "Authorization: Bearer $WAVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.1-flash-image-preview",
    "action": "search_grounded",
    "prompt": "画一张本周登顶 App Store 的热门游戏的关键画面海报",
    "google_search": true,
    "google_image_search": true,
    "resolution": "2K",
    "aspect_ratio": "16:9"
  }'
curl -X POST https://www.qingbo.dev/v1/tasks \
  -H "Authorization: Bearer $WAVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3-pro-image-preview-official",
    "prompt": "复杂排版海报,包含中英双语标语和密集小字,要求清晰可读",
    "resolution": "4K",
    "aspect_ratio": "2:3"
  }'
{
  "task_id": "task-wave1775309821b950328499",
  "model": "gemini-3-pro-image-preview",
  "action": "generate",
  "status": "queued",
  "created_at": 1775309821040,
  "progress": 0
}
After submitting, poll task status with GET /v1/tasks/{task_id}. See Task System for details.

Available Models

Model IDSeriesDescription
gemini-3-pro-image-preview-officialNano Banana Pro · Official DirectFlagship tier, official direct, higher stability
gemini-3-pro-image-previewNano Banana Pro · StandardFlagship tier, native 4K, professional fidelity, multi-step planning
gemini-3.1-flash-image-preview-officialNano Banana 2 · Official DirectFast tier with direct channel, search augmentation
gemini-3.1-flash-image-previewNano Banana 2 · StandardFast tier with Google text + image search augmentation
gemini-2.5-flash-image-preview-officialNano Banana · Official DirectPrevious-gen direct, high cost-performance
gemini-2.5-flash-image-previewNano Banana · StandardPrevious-gen workhorse, low latency, multi-image fusion

Common Parameters

model
string
required
Pick one from the Available Models list
action
string
default:"generate"
Operation type, allowed values:
  • generate — text-to-image (default)
  • image2image — image-to-image (requires image_urls)
  • edit — image editing (instruction-based / inpainting)
  • reference — multi-image reference fusion
  • search_grounded — search augmentation (3.1 Flash series only)
prompt
string
required
Image description text; supports CN/EN. The Gemini series excels at natural-language instructions and handles multi-step, multi-constraint prompts well.
n
integer
default:"1"
Number of images to generate (multiple per call)
seed
integer
default:"-1"
Random seed; -1 means random. A fixed value reproduces similar results.
aspect_ratio
string
default:"1:1"
Aspect ratio. Allowed values depend on the model:Standard 10 (supported by all models):
  • 1:1 — square
  • 2:3 / 3:2 — portrait/landscape camera
  • 3:4 / 4:3 — portrait/landscape standard
  • 4:5 / 5:4 — portrait/landscape social
  • 9:16 / 16:9 — portrait/landscape widescreen
  • 21:9 — ultra-wide
Extreme ratios (3.1 Flash series only):
  • 1:4 / 4:1 — tall column / banner
  • 1:8 / 8:1 — extreme column / extreme banner
resolution
string
default:"1K"
Output resolution, depends on model:
  • 3 Pro: 1K / 2K / 4K
  • 3.1 Flash: 0.5K / 1K / 2K / 4K
  • 2.5 Flash: 1K
image_urls
string[]
Reference image URL array. image2image / edit typically takes one image; reference takes multiple.
callback_url
string
Webhook callback URL, invoked when the task reaches a terminal state. See Callback Mechanism.
callback_events
string[]
Callback event filter, e.g. ["completed", "failed"]

Model-Specific Parameters

model id: gemini-3-pro-image-preview-officialSeries: Nano Banana Pro · Official DirectSupported actions: generate / image2image / edit / referenceresolution: 1K / 2K / 4Kaspect_ratio: standard 10Highlights: Identical model to the 3 Pro standard tier, with a better channel and stability — suited for SLA-sensitive production lines. Priced ~2.7× the standard tier.
official_fallback
boolean
default:"false"
This model is already on the official direct tier, so this is typically unnecessary. The field is kept for upstream parameter-template compatibility.

Resource Limits

ItemLimit
Reference imagesreference mode recommends ≤ 4; edit / image2image typically 1
Per-image size≤ 30MB; supports JPG / PNG / WEBP
Output resolutionSee each tab (3 Pro up to 4K / 3.1 Flash up to 4K / 2.5 Flash 1K only)
Output fileJPG; URLs valid for 24 hours
Search augmentation3.1 Flash series only; enabling google_search / google_image_search may slightly increase latency