alibaba/qwen-image-2/pro/text-to-image
Qwen Image 2 Pro by Alibaba - generate stunning images from text prompts with state-of-the-art AI. Supports multiple aspect ratios, styles, and high-resolution output for creative and commercial use.
Example output — click Run to generate your own
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
https://api.sandbase.ai/v1/runalibaba/qwen-image-2/pro/text-to-imageInput Schema
4 parameters · 1 required · 3 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Required | Text prompt describing the desired image. Supports Chinese and English;. · Min length: 1 |
seed | integer | Optional | Random seed for reproducibility (0-2147483647). |
aspect_ratio | string | Optional | The aspect ratio of the generated image. · Options: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 21:916:93:24:35:41:14:53:42:39:16 |
output_format | string | Optional | The format of the generated image. · Options: jpeg, png · Default: "png" jpegpng |
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "alibaba/qwen-image-2/pro/text-to-image",
"prompt": "# 1930s Luxury Automobile Manufacturing – 11-Stage Infographic\n## LAYOUT\n- 3 rows, flowchart with arrows left→right, curving down between rows\n- Row 1: Stages 1–3 | Row 2: Stages 4–6 | Row 3: Stages 7–11\n- Style: hand-drawn sketch, watercolor coloring. Car color: deep burgundy/cream accents\n- Car style: 1930s grand tourer (long hood, flowing fenders, wire wheels, art deco chrome)\n---\n## ROW 1\n### STAGE 1 – DESIGN & COACHBUILDING PLANNING\n- Isometric design studio with wooden drafting tables\n- 3 designers in waistcoats: one drawing side-profile with French curves, one sculpting a cream clay scale model on turntable, one reviewing a full-size blueprint on wall\n- Art Deco posters on walls, inkwells, callipers, blackboard with chassis dimensions\n### STAGE 2 – SUPPLY CHAIN & RAW MATERIALS\n- Components spread out with label lines:\n - **STEEL INGOTS & BILLETS** – dark gray blocks, warm foundry glow\n - **ALUMINUM SHEETS** – silver sheets on wooden pallet\n - **ASH WOOD TIMBER** – honey-brown planks bundled (for body frame)\n - **LEATHER HIDES** – rolled cognac-brown full-grain hides\n - **WIRE SPOKES & HUB CASTINGS** – bundled steel spokes, gray castings\n - **GLASS PANES** – transparent sheets in straw-packed crates\n - **CHROME & BRASS FITTINGS** – shiny strips, handles, hood ornament blanks\n- Background: foundry/tannery silhouettes with smoking chimneys\n### STAGE 3 – PART FABRICATION (METALWORK & WOODWORK)\nTwo bordered sub-boxes:\n**Top – \"METALWORK & FORGING\":**\nSteel billets → **DROP FORGE** (hammer press, glowing orange part) → **PRECISION LATHE** (belt-driven, machinist in flat cap) → **HAND GAUGING** (micrometers, go/no-go gauges on wooden bench)\n**Bottom – \"COACHWORK FRAME & PANEL BEATING\":**\n**ASH CUTTING** (bandsaw, sawdust) → **FRAME JIG ASSEMBLY** (skeletal wooden body on jig, car shape visible) → **HAND PANEL BEATING** (craftsman hammering aluminum over wooden buck) → **ENGLISH WHEEL** (rolling panel for smooth curves)\n---\n## ROW 2\n### STAGE 4 – CHASSIS & MECHANICAL ASSEMBLY\n- **LADDER CHASSIS** – dark steel twin rails + cross-members on trestles, riveted. Workers fitting braces\n- **FRONT AXLE & LEAF SPRINGS** – beam axle with semi-elliptic springs, worker with wrench\n- **REAR AXLE & DIFFERENTIAL** – live axle with pumpkin-shaped housing\n- **DRUM BRAKES** – cable-operated assemblies at each wheel position\n- **STEERING GEARBOX** – worm-and-sector box, drag link to front axle\n### STAGE 5 – ENGINE BUILDING & INSTALLATION\n- Left: **ENGINE BENCH** – inline-8 block (dark green/gray), forged crankshaft being lowered in, pistons in a row, twin brass carburetors, magneto ignition, cylinder head being torqued. Oil cans, rags, hand tools\n- Right: **ENGINE DROP-IN** – completed engine lowered by chain hoist on A-frame crane into chassis. Two workers guiding. Transmission bell housing visible\n### STAGE 6 – BODY MOUNTING\n- Bare aluminum body shell (silver, on wooden frame) lowered by overhead gantry onto rolling chassis\n- 4–5 workers guiding body down. Red alignment lines between mount points\n- Labels: \"Body mount bolts\", \"Firewall alignment\", \"Running board brackets\"\n- Full car silhouette now recognizable: long hood, set-back cabin, swept tail\n---\n## ROW 3\n### STAGE 7 – PAINTING & FINISHING\n- Painter in white coveralls spraying with gun: gray primer on rear half, deep burgundy lacquer on front half\n- Second worker wet-sanding between coats\n- Labels: \"Lead filler & primer\", \"Nitrocellulose lacquer\", \"Hand rubbing & polishing\"\n### STAGE 8 – INTERIOR TRIMMING\n- Cabin cutaway showing: hand-stitched diamond-tufted cognac leather seats, burled walnut dashboard with round gauge holes and chrome bezels, leather door panels with chrome cranks, dark maroon wool carpet, cream cloth headliner\n### STAGE 9 – CHROME & BRIGHTWORK\n- Vignettes: chrome bumpers bolted on, art deco hood ornament (leaping figurine) on radiator cap, round chrome headlamps on fenders, tall vertical-bar radiator grille, trim strips and door handles. Worker polishing fender to mirror shine\n### STAGE 10 – MECHANICAL TESTING\n- Completed burgundy car with cream fenders and full chrome\n- Labels: \"Ignition timing & carburetor tuning\" (mechanic with timing light), \"Brake balance test\", \"Wheel alignment\" (string method), \"Electrical check\" (lights glowing), \"Fluid fill & leak check\"\n- Handwritten checklist on clipboard resting on fender\n### STAGE 11 – ROAD TEST & DELIVERY\n- Left: car in motion on country road, dust trail, driver in goggles/leather cap. Green hills in watercolor background\n- Right: car at Art Deco showroom entrance. Factory director in three-piece suit, client in top hat receiving leather key fob, chauffeur in uniform by driver's door\n---\n## STYLE GUIDE\n- **Colors:** Burgundy body (#6B1024), cream accents (#F5E6C8), dark steel chassis, silver aluminum, honey-brown ash wood, cognac leather, bright chrome highlights\n- **Typography:** Bold uppercase sans-serif titles (\"STAGE [#] – [NAME]\"), smaller labels with thin connector lines\n- **Style:** Ink outlines, watercolor flat fill, isometric/3/4 view, period-correct details (belt-driven machines, chain hoists, flat caps, Art Deco flourishes)\n- **Arrows:** Thin black, left→right, curving down between rows\n- **Proportions:** Landscape ~3:1, 3 equal rows, Stage 3 taller, Row 3 has 5 narrower stages",
"output_format": "png"
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"API README
Qwen Image 2
Qwen Image 2 is the Image 2 route for prompt-led image creation. It uses Qwen’s combined visual-semantic and appearance modeling to interpret subjects, relationships, typography, spatial structure, and surface detail as a connected composition, giving this exact route a clearer production purpose than a generic image request. This dedicated Pro text-to-image path reserves the higher-quality configuration for creating a completely new visual.
Use Qwen Image 2 when the project specifically requires a new visual built from a detailed brief. State the creative goal, then define composition, viewpoint, wording, materials, lighting, and finish; for edits, explicitly separate the intended transformation from identity, layout, or regions that must remain stable.
Highlights
- Image 2 Dense information composition. Organizes multiple concepts, subjects, and written elements into clear hierarchy.
- Image 2 High-precision typography. Renders compact Chinese and English text inside visual layouts.
- Image 2 Professional photographic detail. Produces controlled materials, lighting, texture, and camera-like finish.
- Image 2 Pro prompt-only finish. Uses the Pro model specifically for high-detail new-image creation without a source-image edit.
Pricing
| Configuration | Billing unit | Price |
|---|---|---|
| Base generation | Per request | $0.075 |
When to Use
| ✅ Good fit | ❌ Consider alternatives |
|---|---|
| The project needs a new image must be created from a written brief | The intended task belongs to a different media workflow |
| The available inputs match every required local field | Required source material or usage permission is unavailable |
| Creative direction can identify subject, style, and delivery | The output must be deterministic at pixel or waveform level |
| The supported route controls fit the final placement | Delivery requires unsupported formats or dimensions |
| An asynchronous generated result fits production | A live or frame-synchronous response is mandatory |
Prompt Guide
Write the request as a production brief. Identify the subject or source, state the intended result, describe composition and visual or vocal character, then list exact preservation and delivery constraints. For edits, explicitly separate what must change from what must remain unchanged.
{
"prompt": "A polished editorial composition with a clear subject, controlled lighting, balanced layout, and precisely preserved details",
"seed": 1,
"aspect_ratio": "21:9",
"output_format": "jpeg"
}
Technical Specs
| Spec | Value |
|---|---|
| Model ID | alibaba/qwen-image-2/pro/text-to-image |
| Input fields | seed (integer)<br>prompt (string)<br>aspect_ratio (string; 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16)<br>output_format (string; jpeg, png) |
| Required input | prompt |
| Output fields | url, content_type |
| Execution | Asynchronous job |
Related Models
alibaba/qwen-image-2alibaba/qwen-image-2/editalibaba/qwen-image-2/pro

