{
 "openapi": "3.0.3",
 "info": {
  "title": "Relighting (default): Qwen-Image-2.1-Turbo",
  "version": "2026-11-21",
  "description": "Curated ZeroGPU tool from the ZeroGPU lineup catalog. Calls go straight to the upstream Space hugging-apps/qwen-qwen-image-2-1-turbo; send your own HF token as a bearer token so the call uses your ZeroGPU quota."
 },
 "servers": [
  {
   "url": "https://hugging-apps-qwen-qwen-image-2-1-turbo.hf.space"
  }
 ],
 "x-zerogpu": {
  "category": "Image editing",
  "slot": "Relighting",
  "need": "Match lighting for composites, or change mood and time of day.",
  "role": "default",
  "space": "hugging-apps/qwen-qwen-image-2-1-turbo",
  "space_url": "https://huggingface.co/spaces/hugging-apps/qwen-qwen-image-2-1-turbo",
  "model": "Qwen-Image-2.1-Turbo",
  "license": "Qwen Research (non-commercial)",
  "license_class": "nc",
  "gpu_seconds_booked": "11\u201338",
  "notes": "Free-text relighting through a strong open editor (AA editing 1063 on 9 Nov), in one call on a large GPU.",
  "caveats": "Light direction is given in words, not numbers.",
  "lineup_call": "/generate(prompt=\"Relight the scene as warm golden hour from the left\", input_images=[image], resolution=\"1024\") \u2192 RGBA image",
  "api_style": "v2",
  "mcp_url": "https://hugging-apps-qwen-qwen-image-2-1-turbo.hf.space/gradio_api/mcp/"
 },
 "components": {
  "securitySchemes": {
   "hfToken": {
    "type": "http",
    "scheme": "bearer",
    "description": "Your own Hugging Face token (read scope is enough). It is sent only to the upstream Space and bills that call to your account's ZeroGPU quota. Without it the call runs on the small anonymous quota."
   }
  },
  "schemas": {}
 },
 "paths": {
  "/gradio_api/call/v2/generate": {
   "post": {
    "summary": "Relighting (default): Qwen-Image-2.1-Turbo",
    "description": "Match lighting for composites, or change mood and time of day. Step 1 of 2: returns {\"event_id\"}; then GET /gradio_api/call/generate/{event_id} reads an SSE stream whose `event: complete` data is the JSON output array (`event: error` on failure). Upstream: https://huggingface.co/spaces/hugging-apps/qwen-qwen-image-2-1-turbo. License: Qwen Research (non-commercial). Caveats: Light direction is given in words, not numbers. \n\nUpstream description: Generate or edit an image with Qwen-Image-2.1-Turbo (8 steps). With no input images this is text-to-image; with one to ten input images it is image editing, and the prompt may refer to them as <image1>\u2026<image10>.Output must be fetched from GET /gradio_api/call/generate/{event_id}. Returns an array of 1 elements of the following format: [\"output ({'type': 'object', 'description': 'JSON object with url key to fetch the output'})\"]",
    "operationId": "image_edit_relighting",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "prompt": {
          "type": "string"
         },
         "input_images": {
          "items": {
           "anyOf": [
            {
             "properties": {
              "image": {
               "type": "object",
               "required": [
                "path",
                "meta"
               ],
               "description": "A file. Set path to a public https URL (or a path returned by POST /gradio_api/upload on the same Space) and meta to {\"_type\": \"gradio.FileData\"}.",
               "properties": {
                "path": {
                 "type": "string"
                },
                "url": {
                 "type": "string"
                },
                "orig_name": {
                 "type": "string"
                },
                "meta": {
                 "type": "object",
                 "properties": {
                  "_type": {
                   "type": "string",
                   "enum": [
                    "gradio.FileData"
                   ]
                  }
                 }
                }
               }
              },
              "caption": {
               "type": "string",
               "default": null,
               "title": "Caption",
               "nullable": true
              }
             },
             "required": [
              "image"
             ],
             "title": "GalleryImage",
             "type": "object"
            },
            {
             "properties": {
              "video": {
               "type": "object",
               "required": [
                "path",
                "meta"
               ],
               "description": "A file. Set path to a public https URL (or a path returned by POST /gradio_api/upload on the same Space) and meta to {\"_type\": \"gradio.FileData\"}.",
               "properties": {
                "path": {
                 "type": "string"
                },
                "url": {
                 "type": "string"
                },
                "orig_name": {
                 "type": "string"
                },
                "meta": {
                 "type": "object",
                 "properties": {
                  "_type": {
                   "type": "string",
                   "enum": [
                    "gradio.FileData"
                   ]
                  }
                 }
                }
               }
              },
              "caption": {
               "type": "string",
               "default": null,
               "title": "Caption",
               "nullable": true
              }
             },
             "required": [
              "video"
             ],
             "title": "GalleryVideo",
             "type": "object"
            }
           ]
          },
          "title": "GalleryData",
          "type": "array"
         },
         "seed": {
          "type": "number",
          "description": "numeric value between 0 and 2147483647"
         },
         "resolution": {
          "type": "integer",
          "enum": [
           1024,
           1536,
           2048
          ]
         },
         "aspect_ratio": {
          "type": "string",
          "enum": [
           "Auto",
           "1:1",
           "4:3",
           "3:4",
           "3:2",
           "2:3",
           "16:9",
           "9:16"
          ]
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Job accepted.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "required": [
          "event_id"
         ],
         "properties": {
          "event_id": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    },
    "tags": [
     "Image editing"
    ],
    "security": [
     {
      "hfToken": []
     },
     {}
    ]
   }
  },
  "/gradio_api/call/generate/{event_id}": {
   "get": {
    "summary": "Fetch results for /generate",
    "description": "Returns a stream of server-sent events (SSE). The final event has `event: complete` with `data` containing a JSON array of outputs.",
    "operationId": "image_edit_relighting_result",
    "parameters": [
     {
      "name": "event_id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "The event_id returned by the POST request"
     }
    ],
    "responses": {
     "200": {
      "description": "SSE stream with event: complete containing a JSON array of outputs",
      "content": {
       "text/event-stream": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    },
    "tags": [
     "Image editing"
    ],
    "security": [
     {
      "hfToken": []
     },
     {}
    ]
   }
  },
  "/gradio_api/upload": {
   "post": {
    "summary": "Upload File",
    "operationId": "image_edit_relighting_upload",
    "parameters": [
     {
      "name": "upload_id",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "nullable": true,
       "default": null
      },
      "description": "Optional ID to track upload progress"
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "properties": {
         "files": {
          "type": "array",
          "items": {
           "type": "string",
           "format": "binary"
          },
          "description": "One or more files to upload"
         }
        },
        "required": [
         "files"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "List of file paths where the uploaded files were saved",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "type": "string"
         }
        }
       }
      }
     },
     "400": {
      "description": "Invalid content type or invalid file name",
      "content": {
       "text/plain": {
        "schema": {
         "type": "string"
        }
       }
      }
     },
     "413": {
      "description": "File exceeds maximum allowed size",
      "content": {
       "text/plain": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    },
    "security": [
     {
      "hfToken": []
     },
     {}
    ]
   }
  }
 }
}