Skip to content

Qwen - Image Edit ​

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-edit for this endpoint Default:"qwen/image-edit"。 Allowed values:qwen/image-edit。 Example:qwen/image-edit。
promptstringYesPrompt required by the ModelFold gateway; at most 2000 characters. The prompt to generate the image with (Max length: 2000 characters) maxLength: 2000. Example:Make the sky a warm sunset.。
image_urlstringYesThe URL of the image to edit. (File URL after upload, not file content; Accepted types: image/jpeg, image/png, image/webp; Max size: 10.0MB) Example:https://file.aiquickdraw.com/custom-page/akr/section-images/1755603225969i6j87xnw.jpg。
accelerationstringNoAcceleration level for image generation. Options: 'none', 'regular', 'high'. Higher acceleration increases speed. 'regular' balances speed and quality. Default value: "none" Default:"none"。 Allowed values:none / regular / high。 Example:none。
image_sizestringNoThe size of the generated image. Default value: landscape_4_3 Default:"landscape_4_3"。 Allowed values:square / square_hd / portrait_4_3 / portrait_16_9 / landscape_4_3 / landscape_16_9。 Example:landscape_4_3。
num_inference_stepsnumberNoThe number of inference steps to perform. Default value: 30 (Min: 2, Max: 49, Step: 1) (step: 1) Default:25。 minimum: 2. maximum: 49. Example:25。
seedintegerNoThe same seed and the same prompt given to the same version of the model will output the same image every time.
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. Default value: 4 (Min: 0, Max: 20, Step: 0.1) (step: 0.1) Default:4。 minimum: 0. maximum: 20. Example:4。
enable_safety_checkerbooleanNoIf set to true, the safety checker will be enabled. Default value: true (Boolean value (true/false)) Example:true。
output_formatstringNoThe format of the generated image. Default value: "png" Default:"png"。 Allowed values:jpeg / png。 Example:png。
negative_promptstringNoThe negative prompt for the generation Default value: " " (Max length: 500 characters) maxLength: 500. Example:blurry, ugly。
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-edit",
  "prompt": "Make the sky a warm sunset.",
  "image_url": "https://file.aiquickdraw.com/custom-page/akr/section-images/1755603225969i6j87xnw.jpg",
  "acceleration": "none",
  "image_size": "landscape_4_3",
  "num_inference_steps": 25,
  "guidance_scale": 4,
  "output_format": "png"
}'
json
{
  "model": "qwen/image-edit",
  "prompt": "Make the sky a warm sunset.",
  "image_url": "https://file.aiquickdraw.com/custom-page/akr/section-images/1755603225969i6j87xnw.jpg",
  "acceleration": "none",
  "image_size": "landscape_4_3",
  "num_inference_steps": 25,
  "guidance_scale": 4,
  "output_format": "png"
}

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.