{"openapi":"3.0.2","info":{"title":"beeble/switchx","description":"The request body Comfy Router accepts for the model \"beeble/switchx\", 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":"ad5d63fb0c98"},"paths":{"/v2/models/beeble/switchx":{"post":{"operationId":"runRouterModel","summary":"Run beeble/switchx synchronously.","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"Request to create and start a SwitchX generation job.","example":{"alpha_mode":"auto","generation_type":"image","max_resolution":720,"prompt":"A cinematic product photo of a glass lamp on a marble table","source_uri":"https://img.freepik.com/free-photo/portrait-woman_395237-33.jpg?w=740\u0026q=80"},"properties":{"alpha_mode":{"$ref":"#/components/schemas/BeebleAlphaMode"},"alpha_uri":{"description":"URI of a custom alpha matte. Required when alpha_mode is custom or select. Ignored for auto or fill.","nullable":true,"type":"string"},"callback_url":{"description":"HTTPS URL for webhook notification on completion or failure.","nullable":true,"type":"string"},"generation_type":{"$ref":"#/components/schemas/BeebleGenerationType"},"idempotency_key":{"description":"Idempotency key for safe retries. If a job with the same key already exists for your account, the API returns the existing job's status instead of creating a duplicate.","maxLength":256,"minLength":1,"nullable":true,"type":"string"},"max_resolution":{"default":1080,"description":"Maximum output resolution: 720 or 1080 (default: 1080).","nullable":true,"type":"integer"},"prompt":{"description":"Text description of desired output (max 2,000 chars). At least one of prompt or reference_image_uri is required.","maxLength":2000,"nullable":true,"type":"string"},"reference_image_uri":{"description":"URI of the reference image for style transfer. Accepts the same URI types as source_uri.","nullable":true,"type":"string"},"source_uri":{"description":"URI of the source image or video. Accepts beeble://uploads/{id}/{filename}, https URLs, or data:{mime};base64 URIs (max 50 MB).","type":"string"}},"required":["generation_type","source_uri","alpha_mode"],"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":{"allOf":[{"$ref":"#/components/schemas/BeebleSwitchXStatusResponse"}],"description":"Comfy Router output schema for Beeble SwitchX: the terminal `GET /v1/switchx/generations/{job_id}` status document, forwarded unchanged. The operation is submit-and-poll — `routerresult/classification.go` records `{provider: beeble, endpoint: /v1/switchx/generations}` as `ReturnModeSubmitPoll` — and Router polls on the caller's behalf, so the body a caller receives is the finished status document (`status: completed`) rather than the `{id, status}` handle the underlying submit answers with.\nThe relit composite is at `output.render`. The sibling fields are NOT interchangeable with it and a caller should not treat them as the result: `source` is the caller's own input echoed back after preprocessing, and `alpha` is the alpha matte — which, when `alpha_mode` is `custom` or `select`, is the caller's own `alpha_uri`. Either can therefore be present on a job that composited nothing, which is why `routerpollstate.classifyBeeble` keys success on `output.render` ALONE and why the nightly SDK case for this family asserts the dotted path `output.render` rather than the `output` container (`testing/e2e/router_sdk/cases.json`).\n`output` is absent or null until the job reaches `completed`. A caller polling this document directly must key completion off `output.render` rather than off a `200` alone; through Router that distinction is already settled, because a `completed` job carrying no `render` is answered as a Comfy Router error rather than with the provider document.\nThe URLs are SIGNED and expire roughly 72 hours after the job completes, so download them promptly rather than storing them; re-fetching the status document mints fresh ones. `status` is Beeble's own lowercase vocabulary (`in_queue`, `processing`, `completed`, `failed`), forwarded unchanged and compared without a case fold.","example":{"alpha_mode":"auto","completed_at":"2027-01-01T00:01:04Z","created_at":"2027-01-01T00:00:00Z","generation_type":"image","id":"swx_1a2b3c4d5e6f7a8b","modified_at":"2027-01-01T00:01:04Z","output":{"alpha":"https://example.invalid/beeble/switchx/alpha.png","render":"https://example.invalid/beeble/switchx/render.png","source":"https://example.invalid/beeble/switchx/source.png"},"progress":100,"status":"completed"}}}}}}}}},"components":{"schemas":{"BeebleAlphaMode":{"description":"Alpha mode: auto, fill, custom, or select","enum":["auto","fill","custom","select"],"type":"string"},"BeebleGenerationType":{"description":"Output type: image or video","enum":["image","video"],"type":"string"},"BeebleSwitchXOutputUrls":{"description":"Signed URLs for SwitchX job outputs.","properties":{"alpha":{"description":"Alpha matte URL.","nullable":true,"type":"string"},"render":{"description":"Composited output URL.","nullable":true,"type":"string"},"source":{"description":"Preprocessed source URL.","nullable":true,"type":"string"}},"type":"object"},"BeebleSwitchXStatusResponse":{"description":"Status response for a SwitchX job.","properties":{"alpha_mode":{"description":"auto, fill, custom, or select","nullable":true,"type":"string"},"completed_at":{"description":"ISO 8601 timestamp when the job completed or failed.","nullable":true,"type":"string"},"created_at":{"description":"ISO 8601 timestamp when the job was created.","nullable":true,"type":"string"},"error":{"description":"Error message (present when status is failed).","nullable":true,"type":"string"},"generation_type":{"description":"image or video","nullable":true,"type":"string"},"id":{"description":"Job identifier (swx_...)","type":"string"},"modified_at":{"description":"ISO 8601 timestamp of the last status change.","nullable":true,"type":"string"},"output":{"allOf":[{"$ref":"#/components/schemas/BeebleSwitchXOutputUrls"}],"description":"Output URLs (present when status is completed). URLs are signed and expire after 72 hours; re-fetch this endpoint for fresh URLs.","nullable":true},"progress":{"description":"Progress percentage (0-100).","nullable":true,"type":"integer"},"status":{"description":"Current job status.","enum":["in_queue","processing","completed","failed"],"type":"string"},"webhook":{"allOf":[{"$ref":"#/components/schemas/BeebleWebhookStatus"}],"description":"Webhook delivery status (present only when callback_url was provided).","nullable":true}},"required":["id","status"],"type":"object"},"BeebleWebhookStatus":{"description":"Webhook delivery status for a SwitchX job.","properties":{"attempts":{"description":"Number of delivery attempts so far.","nullable":true,"type":"integer"},"last_error":{"description":"Error message from the last failed delivery attempt.","nullable":true,"type":"string"},"status":{"description":"pending, delivered, or failed","nullable":true,"type":"string"}},"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"x-comfy-router-model-id":"beeble/switchx","x-comfy-input-schema-authored":true,"x-comfy-output-schema-authored":true,"x-comfy-router-input-modalities":["image","video","text"],"x-comfy-router-output-modalities":["image","video"]}
