Skip to content

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: 1K and 2K.

  • Supported image sizes: 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16, and 21:9.

  • Supported output formats: png and jpeg.

  • 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.

Request Parameters ​

Body (application/json) ​

ParameterTypeRequiredDescription
modelstringYesThe 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。
callBackUrlstringNoCallback 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。
inputobjectYesInput parameters for the text-to-image generation task.
  input.promptstringYesThe 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.resolutionstringNoThe output image resolution. Allowed values:1K / 2K。 示例:1K。
  input.image_sizestringNoThe 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_formatstringNoOutput format: png or jpeg. Set this field explicitly. Allowed values:png / jpeg。 示例:png。
  input.prompt_extendbooleanNoWhether 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_promptstringNoThe negative prompt that describes content you do not want to appear in the image. 示例:blurry, low quality, distorted。
  input.seedintegerNoRandom seed, 0–2147483647. If omitted, a random seed is used. 示例:1。
  input.nsfw_checkerbooleanNoWhether 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 ​

bash
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
  }
}'
json
{
  "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 ​

json
{
  "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

参数类型必填说明
codeinteger否200: success. 501: failure; see data.failCode and data.failMsg. Allowed values:200 / 501。 示例:200。
msgstring否Status message 示例:Playground task completed successfully.。
dataobject否—
  data.completeTimeinteger否Task completion time, represented as a Unix timestamp in milliseconds 示例:1786435601000。
  data.costTimeinteger否Processing time in seconds. Present on both success and failure callbacks. 示例:69。
  data.createTimeinteger否Task creation time, represented as a Unix timestamp in milliseconds 示例:1786435532000。
  data.creditsConsumednumber否Credits consumed by the task; 0 for failed tasks. 示例:6.4。
  data.modelstring否Image generation model used for the task 示例:qwen3/pro-text-to-image。
  data.paramstring否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.resultJsonstring否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.statestring否Task status Allowed values:success / fail。 示例:success。
  data.taskIdstring否Task ID 示例:5da7fb31a9784f0319df97783d8d32f7。
  data.updateTimeinteger否Use completeTime as the completion time; updateTime may equal createTime. 示例:1786435601000。
  data.failCodestring否Failure code, a numeric string such as "400" or "500". Present only when state is fail. 示例:500。
  data.failMsgstring否Failure reason. Present only when state is fail. 示例:&lt;error detail&gt;。

Success

json
{
  "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

json
{
  "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
  }
}

ModelFold — one API for all the best AI models.