/v1/tasks. Image generation typically completes in 1-30 seconds. After submission, you receive a task_id and retrieve results via polling or webhook callback.
Endpoint
Supported Models
Gemini Image Series
The three Nano Banana official tiers and Nano Banana 2.1 billed from actual token usage, five economy tiers at a fixed price per image, up to 14 reference images
GPT Image Series
GPT Image 1 / 1.5 / 2 / 2.5 official lines billed from actual token usage, GPT Image 2 / 2.5 reverse lines at a fixed price per image
Seedream Series
ByteDance Seedream 4.0 / 4.5 / 5.0 Lite / 5.0 Pro / 5.0 Flash, text-to-image and reference-image editing
Qwen Image Series
Alibaba Qwen Image 2.0 / 2.0 Pro / 3.0 / 3.0 Pro, strong text rendering
Wan Image Series
Alibaba Wan 2.7 Image / Image Pro: text-to-image, reference editing, bbox selection and color palettes
Z-Image
Z-Image-Turbo, lightweight and fast, bilingual CN/EN
FLUX Series
Black Forest Labs FLUX.2 Pro / Max / Flex and Kontext Pro / Max, text-to-image and reference-image editing
FLUX 3 Image
Black Forest Labs FLUX 3 Image: text-to-image, single-image editing and up to 10 reference images, up to 4K
Grok Imagine Series
xAI Grok Imagine 1.5 reverse tiers, 2.0 official and reverse tiers, and the quality tier: text-to-image and editing
Midjourney
imagine returns four images per call, plus 12 chained actions: upscale, variation, zoom, pan, inpaint and more
MAI-Image-2.6
Microsoft MAI-Image-2.6 and Flash: text-to-image, single-image editing and composition from up to 5 references, billed from actual token usage
Two request paths
Images have two entries. Billing is identical on both; they differ in parameter validation and how results come back:To migrate with the OpenAI SDK, set
base_url to https://api.qingbo.ai/v1 and change model to one of our model IDs.
Model-specific capabilities (the mask_url mask, the 1k / 2k / 4k resolution tiers, reference-image limits and so on)
follow the task API documentation — the parameters on our model pages describe the task API.Common Parameters (shared across models)
Actual support varies per model — see each vendor doc for details.
string
required
Model ID (group_name); pick one from the vendor docs above
string
default:"generate"
generate— text to image (default)edit— image editing; pair withimage_urls
prompt alone is text-to-image; one image_urls entry is image-to-image; several are multi-image reference; add mask_url for inpainting.string
required
Image description text; supports both Chinese and English
integer
default:"1"
Number of images to generate (some vendors cap per-call count)
integer
default:"-1"
Random seed;
-1 means random. A fixed value reproduces similar results.string
Aspect ratio, e.g.
16:9 / 9:16 / 1:1. Some vendors support auto (smart selection).string
Output resolution, e.g.
1K / 2K / 4K. Supported range varies per vendor.string[]
Reference image URL array (for image-to-image / multi-image reference)
string
Webhook callback URL, invoked when the task reaches a terminal state. See Task System.
Submit Response Example
task_id, call GET /v1/tasks/{task_id} to poll until status = completed, then read the image URLs.
Mode Quick Reference
Not every model supports every mode — check each vendor doc for the actual
action list and field range. The backend validates request fields against the vendor’s declared capabilities and rejects out-of-range requests.Field Naming Conventions
- Media references are always plural — always
image_urls, even for a single image use a one-element array["one.jpg"] - Aspect ratio is unified as
aspect_ratio— vendor internals usingsize/ratioare implementation details you don’t need to track - Resolution is unified as
resolution— vendor internals usingqualityare implementation details - Mask field
mask_url(used for GPT Image official inpainting)
Related
- Task System — task state machine / polling cadence / webhook
- Request & Response — common error codes / headers / rate limits
- Authentication — API key application and usage
- Models — full model lookup endpoint