Qwen3 Image 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 image-to-image generation task. Upload an input image and provide a prompt describing the desired changes.
The
image_urlsarray supports up to 3 input images. Supported formats:image/jpeg,image/png,image/webp,image/bmp, andimage/gif,image/tiff. Maximum file size: 10 MB per image.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.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/image-to-image model. Default:"qwen3/image-to-image"。 Allowed values:qwen3/image-to-image。 示例:qwen3/image-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 image-to-image generation task. |
input.image_urls | array<string> | Yes | Input image URL array. Upload images and provide their URLs rather than the file content. Supports up to 3 images. Supported file types: image/jpeg, image/png, image/webp, image/bmp, and image/gif,image/tiff. Maximum file size: 10 MB per image. |
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. 示例:Turn the input image into a cinematic watercolor illustration.。 |
input.resolution | string | No | The output image resolution. Default:"1K"。 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/image-to-image",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"image_urls": [
"https://example.com/input.png"
],
"prompt": "Turn the input image into a cinematic watercolor illustration.",
"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/image-to-image",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"image_urls": [
"https://example.com/input.png"
],
"prompt": "Turn the input image into a cinematic watercolor illustration.",
"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 示例:1786436473000。 |
data.costTime | integer | 否 | Processing time in seconds. Present on both success and failure callbacks. 示例:38。 |
data.createTime | integer | 否 | Task creation time, represented as a Unix timestamp in milliseconds 示例:1786436435000。 |
data.creditsConsumed | number | 否 | Credits consumed by the task; 0 for failed tasks. 示例:5.3。 |
data.model | string | 否 | Image-to-image model used for the task 示例:qwen3/image-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\",\"image_urls\":[\"https://static.aiquickdraw.com/tools/example/1786021267002_2vLU3iDm.png\"],\"prompt\":\"Convert the input image into a cinematic watercolor illustration.\",\"resolution\":\"1K\",\"nsfw_checker\":false}","callBackUrl":"https://your-domain.com/api/callback","model":"qwen3/image-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/1786436471808-b8apkvect1.png"]}。 |
data.state | string | 否 | Task status Allowed values:success / fail。 示例:success。 |
data.taskId | string | 否 | Task ID 示例:301e6044f5e9774f8f44e2b1c754bbbf。 |
data.updateTime | integer | 否 | Use completeTime as the completion time; updateTime may equal createTime. 示例:1786436473000。 |
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": "301e6044f5e9774f8f44e2b1c754bbbf",
"model": "qwen3/image-to-image",
"state": "success",
"param": "{\"input\":\"{\\\"output_format\\\":\\\"png\\\",\\\"seed\\\":1,\\\"image_size\\\":\\\"1:1\\\",\\\"prompt_extend\\\":true,\\\"negative_prompt\\\":\\\"blurry, low quality, distorted\\\",\\\"image_urls\\\":[\\\"https://static.aiquickdraw.com/tools/example/1786021267002_2vLU3iDm.png\\\"],\\\"prompt\\\":\\\"Convert the input image into a cinematic watercolor illustration.\\\",\\\"resolution\\\":\\\"1K\\\",\\\"nsfw_checker\\\":false}\",\"callBackUrl\":\"https://your-domain.com/api/callback\",\"model\":\"qwen3/image-to-image\"}",
"resultJson": "{\"resultUrls\":[\"https://tempfile.aiquickdraw.com/qwen3/1786436471808-b8apkvect1.png\"]}",
"completeTime": 1786436473000,
"createTime": 1786436435000,
"costTime": 38,
"creditsConsumed": 5.3,
"updateTime": 1786436473000
}
}Failure
{
"code": 501,
"msg": "Playground task failed.",
"data": {
"taskId": "301e6044f5e9774f8f44e2b1c754bbbf",
"model": "qwen3/image-to-image",
"state": "fail",
"param": "{\"input\":\"{\\\"output_format\\\":\\\"png\\\",\\\"seed\\\":1,\\\"image_size\\\":\\\"1:1\\\",\\\"prompt_extend\\\":true,\\\"negative_prompt\\\":\\\"blurry, low quality, distorted\\\",\\\"image_urls\\\":[\\\"https://static.aiquickdraw.com/tools/example/1786021267002_2vLU3iDm.png\\\"],\\\"prompt\\\":\\\"Convert the input image into a cinematic watercolor illustration.\\\",\\\"resolution\\\":\\\"1K\\\",\\\"nsfw_checker\\\":false}\",\"callBackUrl\":\"https://your-domain.com/api/callback\",\"model\":\"qwen3/image-to-image\"}",
"failCode": "500",
"failMsg": "<error detail>",
"completeTime": 1786436473000,
"createTime": 1786436435000,
"costTime": 38,
"creditsConsumed": 0,
"updateTime": 1786436473000
}
}