Choose your path
Use the compatibility service if you have working Stability API code and want it running on Comfy with no other changes.
Use native Comfy Router for new integrations. It is the same API as every other model on Router, with the Comfy SDKs, queued delivery, idempotent retries and one error format.
Both paths need a Comfy API key. Create one in your Comfy workspace and export it:
Compatibility service
The compatibility service athttps://stability.comfy.org accepts Stability’s own paths and request bodies, runs each call on Comfy Router, and answers in Stability’s response and error shapes. To migrate, change two things:
- The base URL, from
https://api.stability.aitohttps://stability.comfy.org. - The key in the
Authorization: Bearerheader, from your Stability key to your Comfy API key.
Accept header, and how you read the response.
Before and after
Authentication
Send your Comfy API key asAuthorization: Bearer <key>, the same header Stability uses. A request with no Bearer token, or with a key Comfy rejects, answers 401 with name set to unauthorized.
GET /v1/engines/list, GET /v1/user/account and GET /v1/user/balance answer so that Stability SDKs that call them at startup keep working. They return fixed Stability-shaped JSON: the balance is always 0 and is not your Comfy credit balance. Generation is not gated on it. When your credits run out, a generation answers 402. Check your balance and usage in your Comfy workspace.
Response shapes
Responses follow Stability’s rules for each API version:/v2beta/...returns the raw image bytes whenAcceptisimage/*or is not set, and{"image": "<base64>", "finish_reason": "...", "seed": N}whenAcceptisapplication/json./v1/generation/...returns{"artifacts": [{"base64": "...", "seed": N, "finishReason": "..."}]}by default, with one artifact per image, and raw bytes whenAcceptisimage/png./v2beta/3d/...returns the 3D model as a binary glTF (.glb) body.
Accept value the path cannot answer is refused with 406.
Asynchronous endpoints
Two paths run asynchronously, as they do on Stability:/v2beta/stable-image/edit/replace-background-and-relight and /v2beta/stable-image/upscale/creative. The submit call answers 200 with a generation id. Poll GET /v2beta/results/{id} with the same key until it returns the result:
Errors
Errors use Stability’s envelope. A/v1/... path answers {"id": "...", "name": "...", "message": "..."}. A /v2beta/... path answers {"id": "...", "name": "...", "errors": ["..."]}. The message carries Router’s error detail. A validation failure lists one entry per invalid field, as field: message.
Router errors map onto Stability statuses and names like this:
A
429 or 503 carries Router’s Retry-After header when Router sent one. Wait that long before you retry.
Endpoint mapping
Every Stability endpoint available on Comfy, with its compatibility path and its native Router model ID. The compatibility path is the Stability path onhttps://stability.comfy.org. The three SD3.5 models and SD3.5 Flash share Stability’s generate/sd3 path and are chosen by the model form field, which defaults to sd3.5-large.
“Async” means the compatibility path answers with an id you poll at /v2beta/results/{id}. On native Router, every model answers on the synchronous route, and can also be queued.
A Stability path that is not in this table is not available on Comfy.
Native Comfy Router
Native Router calls send a JSON body toPOST https://api.comfy.org/v2/models/stability/<slug> with your key in X-API-Key. The body uses Stability’s field names. Image inputs are Comfy-signed asset URLs rather than file uploads, and the response is JSON with a Comfy-signed URL valid for up to 24 hours. Image models return it in image. When an SDXL request returns more than one image (samples above 1), the response also carries images, which lists every Comfy-signed image URL in output order. image holds only the first, so read images to get every result. The two 3D models (stability/stable-fast-3d and stability/stable-point-aware-3d) return the GLB URL in model instead. Download each result before its URL expires.
Each model page carries the full request schema, Python and TypeScript SDK snippets, and the queued variant for that model.
Synchronous example
stability/generate-core:
Response
Asynchronous example
stability/upscale-creative runs asynchronously at Stability. On the synchronous route, Router submits the job and polls it for you, then answers with the finished result in the same shape as above. It is billed once, when the job succeeds. For a long run, or to collect the result from another process, queue it instead:
image value in these examples is a placeholder; a real call must pass a Comfy-signed asset URL.