Skip to content

Qwen - Image to Image ​

Endpoint ​

POST /images/generations

Full URL: https://modelfold.ai/v1/images/generations

Authentication: every request must include the Authorization: Bearer <API_KEY> header.

Send model parameters directly in the JSON body. Do not wrap them in input. This request waits for generation to finish and returns data[].url; supported media models also offer async jobs, polling and callbacks. Replace example media URLs with your own publicly accessible files. See API gateway for billing and errors.

Input parameters for the generation task

Request Parameters ​

Body (application/json) ​

ParameterTypeRequiredDescription
modelstringYesThe model name to use for generation. Required field.
- Must be qwen/image-to-image for this endpoint Default:"qwen/image-to-image"。 Allowed values:qwen/image-to-image。 Example:qwen/image-to-image。
promptstringYesPrompt required by the ModelFold gateway; at most 2000 characters. The prompt to generate the image with (Max length: 5000 characters) maxLength: 2000. Example:Change the season from winter to spring. Keep the same composition, with the cabin, lake, and mountains unchanged. Fill the scene with warmth and vitality using blooming flowers and lush greenery.。
image_urlstringYesThe reference image to guide the generation (File URL after upload, not file content; Accepted types: image/jpeg, image/png, image/webp; Max size: 10.0MB) Example:https://static.aiquickdraw.com/tools/example/1786021267002_2vLU3iDm.png。
strengthnumberNoDenoising strength. 1.0 = fully remake; 0.0 = preserve original (Min: 0, Max: 1, Step: 0.01) (step: 0.01) Default:0.8。 minimum: 0. maximum: 1. Example:0.8。
output_formatstringNoThe format of the generated image Default:"png"。 Allowed values:png / jpeg。 Example:png。
accelerationstringNoAcceleration level for image generation. Options: 'none', 'regular', 'high'. Higher acceleration increases speed. 'regular' balances speed and quality. 'high' is recommended for images without text Default:"none"。 Allowed values:none / regular / high。 Example:none。
negative_promptstringNoThe negative prompt for the generation (Max length: 500 characters) maxLength: 500. Example:blurry, ugly。
seedintegerNoThe same seed and the same prompt given to the same version of the model will output the same image every time
num_inference_stepsnumberNoThe number of inference steps to perform (Min: 2, Max: 250, Step: 1) (step: 1) Default:30。 minimum: 2. maximum: 250. Example:30。
guidance_scalenumberNoThe CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you (Min: 0, Max: 20, Step: 0.1) (step: 0.1) Default:2.5。 minimum: 0. maximum: 20. Example:2.5。
enable_safety_checkerbooleanNoThe safety checker is always enabled in Playground. It can only be disabled by setting false through the API. (Boolean value (true/false)) Example:true。
nsfw_checkerbooleanNoDefaults to false. When false, no additional content filtering is applied and results are returned directly by the model.

Request Example ​

bash
curl -X POST "https://modelfold.ai/v1/images/generations" \
  -H "Authorization: Bearer $MODELFOLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "qwen/image-to-image",
  "prompt": "Change the season from winter to spring. Keep the same composition, with the cabin, lake, and mountains unchanged. Fill the scene with warmth and vitality using blooming flowers and lush greenery.",
  "image_url": "https://static.aiquickdraw.com/tools/example/1786021267002_2vLU3iDm.png",
  "strength": 0.8,
  "output_format": "png",
  "acceleration": "none",
  "num_inference_steps": 30,
  "guidance_scale": 2.5
}'
json
{
  "model": "qwen/image-to-image",
  "prompt": "Change the season from winter to spring. Keep the same composition, with the cabin, lake, and mountains unchanged. Fill the scene with warmth and vitality using blooming flowers and lush greenery.",
  "image_url": "https://static.aiquickdraw.com/tools/example/1786021267002_2vLU3iDm.png",
  "strength": 0.8,
  "output_format": "png",
  "acceleration": "none",
  "num_inference_steps": 30,
  "guidance_scale": 2.5
}

Response ​

200 — Generation completed. usage contains actual billing details; result URLs are illustrative. ​

json
{
  "ok": true,
  "created": 1792134000,
  "data": [
    {
      "url": "https://modelfold.ai/uploads/outputs/result.png"
    }
  ],
  "usage": {}
}

ModelFold — one API for all the best AI models.