Qwen Image 2.1 (Unrestricted) API
Qwen Image 2.1 variant with looser content filtering
qwen-image-2-1-unrestrictedSynchronousImage inputimageLive price on TokPort: $0.085 per imageFields marked * are required. The same definitions are published as OpenAPI 3.0 (https://tokport.io/api/openapi?model=qwen-image-2-1-unrestricted), ready for code generators and agents.
Text to image
POST /v1/images/generationsInput
| Field | Type | Description |
|---|---|---|
| model* | string | Model id. Always "qwen-image-2-1-unrestricted". |
| prompt* | string | What to generate. Be concrete about subject, style, lighting and composition. |
| size | string (enum) | Output size as "WIDTHxHEIGHT" pixels.1024x10241536x10241024x1536default: 1024x1024 |
| n | integer | Number of images to generate in one request. Each image is billed.default: 1range: 1–4 |
| response_format | string (enum) | Return hosted URLs (expire after a while) or inline base64 PNG data.urlb64_jsondefault: url |
Output
Synchronous. `data[]` holds one entry per generated image with `url` (or `b64_json` when requested). The `X-Oneapi-Request-Id` response header identifies the request in your usage log.
{
"created": 1726400000,
"data": [
{
"url": "https://cdn.example.com/generated/abc.png",
"revised_prompt": "a neon koi swimming through clouds, cinematic lighting"
}
]
}Runnable example: API tab.
Image to image
POST /v1/images/editsInput
| Field | Type | Description |
|---|---|---|
| model* | string | Model id. Always "qwen-image-2-1-unrestricted". |
| image* | string (url | data:) | Reference image as a public URL or a data: URL (PNG, JPEG or WebP, up to 8 MB). |
| prompt* | string | How the reference image should change. The model keeps what you do not mention. |
| size | string (enum) | Output size as "WIDTHxHEIGHT" pixels.1024x10241536x10241024x1536default: 1024x1024 |
| n | integer | Number of images to generate in one request. Each image is billed.default: 1range: 1–4 |
| response_format | string (enum) | Return hosted URLs (expire after a while) or inline base64 PNG data.urlb64_jsondefault: url |
Output
Synchronous. `data[]` holds one entry per generated image with `url` (or `b64_json` when requested). The `X-Oneapi-Request-Id` response header identifies the request in your usage log.
{
"created": 1726400000,
"data": [
{
"url": "https://cdn.example.com/generated/abc.png",
"revised_prompt": "a neon koi swimming through clouds, cinematic lighting"
}
]
}Runnable example: API tab.