{"openapi":"3.0.2","info":{"title":"stability/edit-erase","description":"The request body Comfy Router accepts for the model \"stability/edit-erase\", and the response body it returns. The INPUT schema is the same schema the server validates a call against before it reaches the provider, so what is published and what is enforced cannot differ. `x-comfy-router-input-modalities` records the media kinds the model is documented to accept; the request schema is shared across sibling models and may admit media kinds this model ignores. The OUTPUT schema describes the provider's native result document exactly as Router returns it: Router does not validate, narrow or re-envelope the response, so the output schema is descriptive rather than enforced, and Comfy owns no output shape of its own.","version":"9a8036a7e9af"},"paths":{"/v2/models/stability/edit-erase":{"post":{"operationId":"runRouterModel","summary":"Run stability/edit-erase synchronously.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"Comfy Router request for Stability erase, in Stability's edit fields sent as a JSON object. Erases the masked part of `image`. `mask` is optional; without it the image's own alpha is the mask. Returns one PNG and is billed once per call.","example":{"grow_mask":5,"image":"https://storage.googleapis.com/example-bucket/source.png","mask":"https://storage.googleapis.com/example-bucket/mask.png","seed":12345},"properties":{"grow_mask":{"description":"How far, in pixels, to grow the mask. Default 5.","maximum":20,"minimum":0,"type":"integer"},"image":{"description":"A Comfy-signed asset URL of the source image.","format":"uri","type":"string"},"mask":{"description":"A Comfy-signed asset URL of the mask. White marks the area to erase. Omitted, the image's own alpha is the mask.","format":"uri","type":"string"},"output_format":{"description":"Omitted is `png`. `jpeg` and `webp` are served only while the deployment's stability output-format switch is on; otherwise they are refused with a 400 before any job runs. The format never changes the price.","enum":["png","jpeg","webp"],"type":"string"},"seed":{"description":"0 or omitted picks a random seed.","maximum":4294967294,"minimum":0,"type":"integer"}},"required":["image"],"type":"object"}}}},"responses":{"200":{"description":"OK - the model's native JSON output, returned unchanged; the schema describes the provider's terminal result document as Router returns it.","content":{"application/json":{"schema":{"description":"Comfy Router output schema for the Stability image models. The image is generated on Comfy-hosted infrastructure and stored on Comfy storage: `image` is a Comfy-signed URL valid for up to 24 hours, not a Stability URL, so download it before then. If the image cannot be stored, the call answers 502 and is not billed; no other URL is returned.","example":{"finish_reason":"SUCCESS","image":"https://example.invalid/stability/image.png","seed":12345},"properties":{"finish_reason":{"description":"Always SUCCESS on a 200.","type":"string"},"image":{"description":"Comfy-signed URL of the (first) PNG image, valid for up to 24 hours.","format":"uri","type":"string"},"images":{"description":"SDXL only, when more than one image was returned. Every Comfy-signed image URL, in output order, each valid for up to 24 hours.","items":{"format":"uri","type":"string"},"type":"array"},"seed":{"description":"The seed the image was generated with.","type":"integer"}},"required":["image","finish_reason","seed"],"type":"object"}}}}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"x-comfy-router-model-id":"stability/edit-erase","x-comfy-input-schema-authored":true,"x-comfy-output-schema-authored":true,"x-comfy-router-input-modalities":["image"],"x-comfy-router-output-modalities":["image"]}
