{ "openapi": "3.0.3", "info": { "title": "Layers (default): Qwen-Image-Layered", "version": "2026-11-21", "description": "Curated ZeroGPU tool from the ZeroGPU lineup catalog. Calls go straight to the upstream Space Qwen/Qwen-Image-Layered; send your own HF token as a bearer token so the call uses your ZeroGPU quota." }, "servers": [ { "url": "https://qwen-qwen-image-layered.hf.space" } ], "x-zerogpu": { "category": "Image editing", "slot": "Layers", "need": "Split an image into editable RGBA layers for design tools.", "role": "default", "space": "Qwen/Qwen-Image-Layered", "space_url": "https://huggingface.co/spaces/Qwen/Qwen-Image-Layered", "model": "Qwen-Image-Layered", "license": "Apache-2.0", "license_class": "open", "gpu_seconds_booked": "180", "notes": "Official. Returns the layers as a PowerPoint deck and a ZIP of PNGs.", "caveats": "Slow (180 s booking), and no turbo variant exists.", "lineup_call": "/infer_1(input_image, layer=4, num_inference_steps=50, true_guidance_scale=4, seed, prompt=\"\") \u2192 gallery + PPTX + ZIP", "api_style": "v1" }, "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/infer_1": { "post": { "description": "Split an image into editable RGBA layers for design tools. Step 1 of 2: returns {\"event_id\"}; then GET /gradio_api/call/infer_1/{event_id} reads an SSE stream whose `event: complete` data is the JSON output array (`event: error` on failure). Upstream: https://huggingface.co/spaces/Qwen/Qwen-Image-Layered. License: Apache-2.0. Caveats: Slow (180 s booking), and no turbo variant exists. \n\nUpstream description: \nReturns, in order: Layers: list[dict(image: dict(path: str | None (Path to a local file), url: str | None (Publicly available url or base64 encoded image), size: int | None (Size of image in bytes), orig_name: str | None (Original filename), mime_type: str | None (mime type of image), is_stream: bool (Can always be set to False), meta: dict(str, Any)), caption: str | None) | dict(video: filepath, caption: str | None)]; Download PPTX: filepath; Download ZIP: filepath", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "minItems": 1, "maxItems": 10, "items": {}, "description": "Positional inputs, in this order:\n0. input_image: dict(path: str | None (Path to a local file), url: str | None (Publicly available url or base64 encoded image), size: int | None (Size of image in bytes), orig_name: str | None (Original filename), mime_type: str | None (mime type of image), is_stream: bool (Can always be set to False), meta: dict(str, Any)) (required)\n1. seed: float (default 0)\n2. randomize_seed: bool (default true)\n3. prompt: str (default \"\")\n4. neg_prompt: str (default \" \")\n5. true_guidance_scale: float (default 4.0)\n6. num_inference_steps: float (default 50)\n7. layer: float (default 4)\n8. cfg_norm: bool (default true)\n9. use_en_prompt: bool (default true)" } } } } } }, "x-gradio-parameters": [ { "name": "input_image", "schema": { "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" ] } } } } }, "required": true, "default": null }, { "name": "seed", "schema": { "type": "number", "description": "numeric value between 0 and 2147483647" }, "required": false, "default": 0 }, { "name": "randomize_seed", "schema": { "type": "boolean" }, "required": false, "default": true }, { "name": "prompt", "schema": { "type": "string" }, "required": false, "default": "" }, { "name": "neg_prompt", "schema": { "type": "string" }, "required": false, "default": " " }, { "name": "true_guidance_scale", "schema": { "type": "number", "description": "numeric value between 1.0 and 10.0" }, "required": false, "default": 4.0 }, { "name": "num_inference_steps", "schema": { "type": "number", "description": "numeric value between 1 and 50" }, "required": false, "default": 50 }, { "name": "layer", "schema": { "type": "number", "description": "numeric value between 2 and 10" }, "required": false, "default": 4 }, { "name": "cfg_norm", "schema": { "type": "boolean" }, "required": false, "default": true }, { "name": "use_en_prompt", "schema": { "type": "boolean" }, "required": false, "default": true } ], "operationId": "image_edit_layers", "tags": [ "Image editing" ], "security": [ { "hfToken": [] }, {} ], "summary": "Layers (default): Qwen-Image-Layered", "responses": { "200": { "description": "Job accepted.", "content": { "application/json": { "schema": { "type": "object", "required": [ "event_id" ], "properties": { "event_id": { "type": "string" } } } } } } } } }, "/gradio_api/call/infer_1/{event_id}": { "get": { "summary": "Read the result stream for /infer_1", "description": "Server-sent events. The final `event: complete` carries a JSON array of outputs; `event: error` means the call failed.", "parameters": [ { "name": "event_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "SSE stream", "content": { "text/event-stream": { "schema": { "type": "string" } } } } }, "operationId": "image_edit_layers_result", "tags": [ "Image editing" ], "security": [ { "hfToken": [] }, {} ] } } } }