Spaces:
Running
Running
Download tools/image_edit_virtual_try_on.openapi.json from townbox/zerogpu-tool-catalog: direct link, hf CLI and curl.
- Browser
- Download file 7.89 kB
-
https://huggingface.co/spaces/townbox/zerogpu-tool-catalog/resolve/main/tools/image_edit_virtual_try_on.openapi.json
- Command line
-
hf download hf://spaces/townbox/zerogpu-tool-catalog/tools/image_edit_virtual_try_on.openapi.json
-
curl -L -o image_edit_virtual_try_on.openapi.json https://huggingface.co/spaces/townbox/zerogpu-tool-catalog/resolve/main/tools/image_edit_virtual_try_on.openapi.json
7.89 kB
| { | |
| "openapi": "3.0.3", | |
| "info": { | |
| "title": "Virtual try-on (default): FASHN VTON 1.5 (972M, maskless)", | |
| "version": "2026-11-21", | |
| "description": "Curated ZeroGPU tool from the ZeroGPU lineup catalog. Calls go straight to the upstream Space fashn-ai/fashn-vton-1.5; send your own HF token as a bearer token so the call uses your ZeroGPU quota." | |
| }, | |
| "servers": [ | |
| { | |
| "url": "https://fashn-ai-fashn-vton-1-5.hf.space" | |
| } | |
| ], | |
| "x-zerogpu": { | |
| "category": "Image editing", | |
| "slot": "Virtual try-on", | |
| "need": "E-commerce and fashion mockups from a person photo and a garment.", | |
| "role": "default", | |
| "space": "fashn-ai/fashn-vton-1.5", | |
| "space_url": "https://huggingface.co/spaces/fashn-ai/fashn-vton-1.5", | |
| "model": "FASHN VTON 1.5 (972M, maskless)", | |
| "license": "Apache-2.0", | |
| "license_class": "open", | |
| "gpu_seconds_booked": "60", | |
| "notes": "Official, stateless, needs no mask, and accepts flat-lay product photos.", | |
| "caveats": "", | |
| "lineup_call": "/try_on(person_image, garment_image, category=\"tops\"|\"bottoms\"|\"one-pieces\", garment_photo_type=\"model\"|\"flat-lay\", num_timesteps=50, seed=42) \u2192 image", | |
| "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/try_on": { | |
| "post": { | |
| "description": "E-commerce and fashion mockups from a person photo and a garment. Step 1 of 2: returns {\"event_id\"}; then GET /gradio_api/call/try_on/{event_id} reads an SSE stream whose `event: complete` data is the JSON output array (`event: error` on failure). Upstream: https://huggingface.co/spaces/fashn-ai/fashn-vton-1.5. License: Apache-2.0. \n\nUpstream description: Run virtual try-on inference.\nReturns, in order: Try-On Result: 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))", | |
| "requestBody": { | |
| "required": true, | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "object", | |
| "required": [ | |
| "data" | |
| ], | |
| "properties": { | |
| "data": { | |
| "type": "array", | |
| "minItems": 2, | |
| "maxItems": 8, | |
| "items": {}, | |
| "description": "Positional inputs, in this order:\n0. person_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. garment_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)\n2. category: Literal['tops', 'bottoms', 'one-pieces'] (default \"tops\")\n3. garment_photo_type: Literal['model', 'flat-lay'] (default \"model\")\n4. num_timesteps: float (default 50)\n5. guidance_scale: float (default 1.5)\n6. seed: int (default 42)\n7. segmentation_free: bool (default true)" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "x-gradio-parameters": [ | |
| { | |
| "name": "person_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": "garment_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": "category", | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "tops", | |
| "bottoms", | |
| "one-pieces" | |
| ] | |
| }, | |
| "required": false, | |
| "default": "tops" | |
| }, | |
| { | |
| "name": "garment_photo_type", | |
| "schema": { | |
| "type": "string", | |
| "enum": [ | |
| "model", | |
| "flat-lay" | |
| ] | |
| }, | |
| "required": false, | |
| "default": "model" | |
| }, | |
| { | |
| "name": "num_timesteps", | |
| "schema": { | |
| "type": "number", | |
| "description": "numeric value between 10 and 50" | |
| }, | |
| "required": false, | |
| "default": 50 | |
| }, | |
| { | |
| "name": "guidance_scale", | |
| "schema": { | |
| "type": "number", | |
| "description": "numeric value between 1.0 and 3.0" | |
| }, | |
| "required": false, | |
| "default": 1.5 | |
| }, | |
| { | |
| "name": "seed", | |
| "schema": { | |
| "type": "integer" | |
| }, | |
| "required": false, | |
| "default": 42 | |
| }, | |
| { | |
| "name": "segmentation_free", | |
| "schema": { | |
| "type": "boolean" | |
| }, | |
| "required": false, | |
| "default": true | |
| } | |
| ], | |
| "operationId": "image_edit_virtual_try_on", | |
| "tags": [ | |
| "Image editing" | |
| ], | |
| "security": [ | |
| { | |
| "hfToken": [] | |
| }, | |
| {} | |
| ], | |
| "summary": "Virtual try-on (default): FASHN VTON 1.5 (972M, maskless)", | |
| "responses": { | |
| "200": { | |
| "description": "Job accepted.", | |
| "content": { | |
| "application/json": { | |
| "schema": { | |
| "type": "object", | |
| "required": [ | |
| "event_id" | |
| ], | |
| "properties": { | |
| "event_id": { | |
| "type": "string" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "/gradio_api/call/try_on/{event_id}": { | |
| "get": { | |
| "summary": "Read the result stream for /try_on", | |
| "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_virtual_try_on_result", | |
| "tags": [ | |
| "Image editing" | |
| ], | |
| "security": [ | |
| { | |
| "hfToken": [] | |
| }, | |
| {} | |
| ] | |
| } | |
| } | |
| } | |
| } |