Appearance
qwen-image-3.0-pro
Request parameters and examples for qwen-image-3.0-pro.
POST /v1/images/generations · POST /v1/async/images/generations
POST /v1/images/edits · POST /v1/async/images/edits
Send JSON with Authorization: Bearer <PIXAPI_KEY> and Content-Type: application/json.
Request fields
Send the common fields at the top level. Put the model-specific controls listed below inside providerOptions.
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | qwen-image-3.0-pro. Case-sensitive model ID. |
prompt | string | Yes | Describe the subject, composition, style, and requested edits. Pixapi keeps the first 2,000 characters; provide a non-empty prompt for both generation and editing. |
n | integer | No | Integer 1–6, default 1. |
size | string | No | Use pixel dimensions WIDTHxHEIGHT, for example 1024x1024. Pixel area 512×512–2048×2048. Ratio 1:8–8:1. Omit or use auto for automatic sizing. |
image | string / string[] | For edits | Public HTTP(S) image URL or URL array; required on /images/edits. 1–3 images, ≤ 10 MB each; recommended 384–2048 pixels per edge. JPEG/PNG/BMP/TIFF/WebP/GIF. Also accepts complete data:image/...;base64,... URLs (≤10 MB per image, ≤20 MB total); raw Base64 and files are not accepted. |
providerOptions | object | No | Model-specific options; see the table below. |
providerOptions
All fields in this table are nested inside providerOptions, not alongside model.
| Field | Type | Description |
|---|---|---|
seed | integer | Random seed, 0–2147483647; omitted means random. The same seed does not guarantee identical output. |
prompt_extend | boolean | Rewrite and expand the prompt for generation; default true. |
negative_prompt | string | Describe content to exclude. |
watermark | boolean | Add a visible AI watermark. Default false. |
prompt_extend_mode | string | direct (default) for generation/editing; agent for text-to-image only. Requires prompt_extend=true. |
enable_thinking | boolean | Default true; improves reasoning but increases latency. Requires prompt rewriting. Setting prompt_extend=false also disables thinking. |
Input rules
Use JSON requests. Do not send quality, resolution, mask, or output_format for these Bailian models. Z-Image supports text-to-image only.
Example
bash
curl https://api.pixapi.ai/v1/images/generations \
-H "Authorization: Bearer $PIXAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-image-3.0-pro",
"prompt": "A poster for a coffee shop with the title Good Morning",
"n": 1,
"size": "1024x1024",
"providerOptions": {
"prompt_extend": true
}
}'py
import os
import requests
response = requests.post(
"https://api.pixapi.ai/v1/images/generations",
headers={"Authorization": f"Bearer {os.environ['PIXAPI_KEY']}"},
json={
"model": "qwen-image-3.0-pro",
"prompt": "A poster for a coffee shop with the title Good Morning",
"n": 1,
"size": "1024x1024",
"providerOptions": {
"prompt_extend": True
}
},
)
response.raise_for_status()
print(response.json())js
const response = await fetch('https://api.pixapi.ai/v1/images/generations', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PIXAPI_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"model": "qwen-image-3.0-pro",
"prompt": "A poster for a coffee shop with the title Good Morning",
"n": 1,
"size": "1024x1024",
"providerOptions": {
"prompt_extend": true
}
}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());go
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
body := []byte(`{
"model": "qwen-image-3.0-pro",
"prompt": "A poster for a coffee shop with the title Good Morning",
"n": 1,
"size": "1024x1024",
"providerOptions": {
"prompt_extend": true
}
}`)
req, err := http.NewRequest("POST", "https://api.pixapi.ai/v1/images/generations", bytes.NewBuffer(body))
if err != nil { panic(err) }
req.Header.Set("Authorization", "Bearer " + os.Getenv("PIXAPI_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
result, err := io.ReadAll(resp.Body)
if err != nil { panic(err) }
if resp.StatusCode >= 400 { panic(string(result)) }
fmt.Println(string(result))
}For asynchronous requests, save the returned id and poll GET /v1/tasks/{id} until completed or failed. See task results and billing.
