Qwen3 Pro Text to Image
This page is generated from the upstream official OpenAPI documentation. Endpoints, parameters and examples match the official docs; brand and API domain are replaced with ModelFold.
Endpoint
POST /jobs/createTask
Full URL: https://ai.modelfold.online/v1/jobs/createTask
Authentication: every request must include the
Authorization: Bearer <API_KEY>header.
Create Task
Use this endpoint to create a new text-to-image generation task from a positive prompt.
Supported resolutions:
1Kand2K.Supported image sizes:
1:1,3:2,2:3,4:3,3:4,16:9,9:16, and21:9.Supported output formats:
pngandjpeg.Intelligent prompt rewriting is enabled by default to improve results from simple prompts.
Get Task Details — After submission, use the unified query endpoint to check task progress and retrieve results
TIP
For production use, we recommend providing the callBackUrl parameter so your service can receive completion notifications instead of polling for task status.
Related Resources
- Model Marketplace — Explore all available models and capabilities
- Common API — Check account credits and usage
Request Parameters
Body (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model name used for generation. This field is required. This endpoint must use the qwen3/pro-text-to-image model. Default:"qwen3/pro-text-to-image"。 Allowed values:qwen3/pro-text-to-image。 示例:qwen3/pro-text-to-image。 |
callBackUrl | string | No | Callback URL for task completion notifications. Optional parameter. If provided, the system will send a POST request to this URL when the task completes, whether it succeeds or fails. If omitted, no callback notification will be sent. 示例:https://your-domain.com/api/callback。 |
input | object | Yes | Input parameters for the text-to-image generation task. |
input.prompt | string | Yes | The positive prompt that describes the image content, style, and composition you want to generate or edit. Both Chinese and English are supported. 示例:A futuristic city at sunset, cinematic lighting, ultra detailed.。 |
input.resolution | string | No | The output image resolution. Allowed values:1K / 2K。 示例:1K。 |
input.image_size | string | No | The output image size. Default:"16:9"。 Allowed values:1:1 / 3:2 / 2:3 / 4:3 / 3:4 / 16:9 / 9:16 / 21:9。 示例:1:1。 |
input.output_format | string | No | Output format: png or jpeg. Set this field explicitly. Allowed values:png / jpeg。 示例:png。 |
input.prompt_extend | boolean | No | Whether to enable intelligent prompt rewriting. Default: true (recommended). When enabled, the model optimizes the positive prompt, which significantly improves results for simple descriptions. Default:true。 示例:true。 |
input.negative_prompt | string | No | The negative prompt that describes content you do not want to appear in the image. 示例:blurry, low quality, distorted。 |
input.seed | integer | No | Random seed, 0–2147483647. If omitted, a random seed is used. 示例:1。 |
input.nsfw_checker | boolean | No | Whether to enable content filtering. Optional. Defaults to false. When set to false, content filtering is disabled and all results are returned directly by the model. Note: Content filtering cannot guarantee that all inappropriate content will be detected. If the filtering results do not meet your requirements, you must implement additional content moderation measures. Default:false。 示例:false。 |
Request Example
curl -X POST "https://ai.modelfold.online/v1/jobs/createTask" \
-H "Authorization: Bearer $MODELFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3/pro-text-to-image",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"prompt": "A futuristic city at sunset, cinematic lighting, ultra detailed.",
"resolution": "1K",
"image_size": "1:1",
"output_format": "png",
"prompt_extend": true,
"nsfw_checker": false,
"negative_prompt": "blurry, low quality, distorted",
"seed": 1
}
}'{
"model": "qwen3/pro-text-to-image",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"prompt": "A futuristic city at sunset, cinematic lighting, ultra detailed.",
"resolution": "1K",
"image_size": "1:1",
"output_format": "png",
"prompt_extend": true,
"nsfw_checker": false,
"negative_prompt": "blurry, low quality, distorted",
"seed": 1
}
}Response
200 — Request successful
{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_qwen3_1765180586443"
}
}Callback
onImageGenerated
Callback URL: {$request.body#/callBackUrl} (the callBackUrl in the request body).
Sent when the task succeeds or fails.
Callback body parameters
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
code | integer | 否 | 200: success. 501: failure; see data.failCode and data.failMsg. Allowed values:200 / 501。 示例:200。 |
msg | string | 否 | Status message 示例:Playground task completed successfully.。 |
data | object | 否 | — |
data.completeTime | integer | 否 | Task completion time, represented as a Unix timestamp in milliseconds 示例:1786435601000。 |
data.costTime | integer | 否 | Processing time in seconds. Present on both success and failure callbacks. 示例:69。 |
data.createTime | integer | 否 | Task creation time, represented as a Unix timestamp in milliseconds 示例:1786435532000。 |
data.creditsConsumed | number | 否 | Credits consumed by the task; 0 for failed tasks. 示例:6.4。 |
data.model | string | 否 | Image generation model used for the task 示例:qwen3/pro-text-to-image。 |
data.param | string | 否 | Parameters submitted when creating the task, in JSON string format 示例:{"input":"{\"output_format\":\"png\",\"seed\":1,\"image_size\":\"1:1\",\"prompt_extend\":true,\"negative_prompt\":\"blurry, low quality, distorted\",\"prompt\":\"A futuristic city at sunset, with cinematic lighting and richdetails.\",\"resolution\":\"1K\",\"nsfw_checker\":false}","callBackUrl":"https://your-domain.com/api/callback","model":"qwen3/pro-text-to-image"}。 |
data.resultJson | string | 否 | Image generation result in JSON string format. resultUrls contains the list of generated image URLs. Present only when state is success. 示例:{"resultUrls":["https://tempfile.aiquickdraw.com/qwen3/1786435599582-qjumky2p3s.png"]}。 |
data.state | string | 否 | Task status Allowed values:success / fail。 示例:success。 |
data.taskId | string | 否 | Task ID 示例:5da7fb31a9784f0319df97783d8d32f7。 |
data.updateTime | integer | 否 | Use completeTime as the completion time; updateTime may equal createTime. 示例:1786435601000。 |
data.failCode | string | 否 | Failure code, a numeric string such as "400" or "500". Present only when state is fail. 示例:500。 |
data.failMsg | string | 否 | Failure reason. Present only when state is fail. 示例:<error detail>。 |
Success
{
"code": 200,
"msg": "Playground task completed successfully.",
"data": {
"taskId": "5da7fb31a9784f0319df97783d8d32f7",
"model": "qwen3/pro-text-to-image",
"state": "success",
"param": "{\"input\":\"{\\\"output_format\\\":\\\"png\\\",\\\"seed\\\":1,\\\"image_size\\\":\\\"1:1\\\",\\\"prompt_extend\\\":true,\\\"negative_prompt\\\":\\\"blurry, low quality, distorted\\\",\\\"prompt\\\":\\\"A futuristic city at sunset, with cinematic lighting and richdetails.\\\",\\\"resolution\\\":\\\"1K\\\",\\\"nsfw_checker\\\":false}\",\"callBackUrl\":\"https://your-domain.com/api/callback\",\"model\":\"qwen3/pro-text-to-image\"}",
"resultJson": "{\"resultUrls\":[\"https://tempfile.aiquickdraw.com/qwen3/1786435599582-qjumky2p3s.png\"]}",
"completeTime": 1786435601000,
"createTime": 1786435532000,
"costTime": 69,
"creditsConsumed": 6.4,
"updateTime": 1786435601000
}
}Failure
{
"code": 501,
"msg": "Playground task failed.",
"data": {
"taskId": "5da7fb31a9784f0319df97783d8d32f7",
"model": "qwen3/pro-text-to-image",
"state": "fail",
"param": "{\"input\":\"{\\\"output_format\\\":\\\"png\\\",\\\"seed\\\":1,\\\"image_size\\\":\\\"1:1\\\",\\\"prompt_extend\\\":true,\\\"negative_prompt\\\":\\\"blurry, low quality, distorted\\\",\\\"prompt\\\":\\\"A futuristic city at sunset, with cinematic lighting and richdetails.\\\",\\\"resolution\\\":\\\"1K\\\",\\\"nsfw_checker\\\":false}\",\"callBackUrl\":\"https://your-domain.com/api/callback\",\"model\":\"qwen3/pro-text-to-image\"}",
"failCode": "500",
"failMsg": "<error detail>",
"completeTime": 1786435601000,
"createTime": 1786435532000,
"costTime": 69,
"creditsConsumed": 0,
"updateTime": 1786435601000
}
}