Skip to main content

Stability AI

Connects to the Stability AI image generation API (Stable Diffusion 3 / SDXL). An agent can generate images from text prompts.

Add to an agent node's tools array with _node_type: "tool-stability". See Connector Reference — How connectors are used.

Authentication

FieldRequiredDescription
api_keyYes (or stability_api_key)Stability AI API key, sent as Authorization: Bearer <api_key>.
stability_api_keyYes (if api_key not set)Used if api_key is not set.
{
"name": "stability",
"_node_type": "tool-stability",
"api_key": "{{ secret.STABILITY_API_KEY }}"
}

Tools

stability_generate

Generate an image from a text prompt using Stability AI (SD3 or SDXL). Returns base64-encoded PNG.

Parameters

ParameterTypeRequiredDescription
promptstringYesImage description
negative_promptstringNoWhat to avoid in the image
modelstringNosd3 | sd3-turbo | stable-diffusion-xl-1024-v1-0 (default: sd3)
widthnumberNoImage width (default 1024)
heightnumberNoImage height (default 1024)
stepsnumberNoInference steps (default 25)
cfg_scalenumberNoGuidance scale (default 7)
seednumberNoRandom seed (-1 for random)

When model is sd3 or sd3-turbo, the request goes to /v2beta/stable-image/generate/sd3 (only prompt, model, negative_prompt, and seed apply — width/height/steps/cfg_scale are ignored). For other models, the request goes to /v1/generation/{model}/text-to-image using width, height, cfg_scale, steps, and seed.

Returns: JSON with image_base64 (base64-encoded PNG), format ("png"), model, and provider ("stability").

Next