> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Stability AI

> Generate images with Stable Diffusion models and check engines, account, and credit balance via the Stability AI API

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: API key.
* **Connection**: The key comes from `STABILITY_API_KEY`.
* **Docs**: [https://platform.stability.ai/docs/api-reference](https://platform.stability.ai/docs/api-reference)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

| Variable            | Required | Description                                                                                |
| ------------------- | -------- | ------------------------------------------------------------------------------------------ |
| `STABILITY_API_KEY` | Yes      | Stability AI API key (starts with sk-) [Docs](https://platform.stability.ai/account/keys). |

## Setup

1. **Create a Stability AI account**: Sign up at [https://platform.stability.ai](https://platform.stability.ai) - new accounts receive 25 free credits, enough to test image generation.
2. **Create an API key**: Open [https://platform.stability.ai/account/keys](https://platform.stability.ai/account/keys) and copy your API key (starts with sk-). Create a dedicated key per application if you prefer.
3. **Store the key**: Add it to your .env file as STABILITY\_API\_KEY=sk-...
4. **Verify access**: Run the Get Balance tool to confirm the key works, then List Engines and try Text to Image with a simple prompt.

* Image generation is billed in credits per image - buy credits at [https://platform.stability.ai/account/credits](https://platform.stability.ai/account/credits)
* Text to Image defaults the Accept header to application/json so images return as base64 artifacts (each with its seed and finishReason)
* The newer v2beta Stable Image endpoints require multipart/form-data uploads and are not exposed here; tools use the JSON v1 generation API (SDXL)

Provider API reference: [https://platform.stability.ai/docs/api-reference](https://platform.stability.ai/docs/api-reference)

## Tools

| Tool          | Access | Description                                                                          |
| ------------- | ------ | ------------------------------------------------------------------------------------ |
| List Engines  | Read   | List the generation engines (models) available to your account                       |
| Get Balance   | Read   | Get the credit balance of your Stability AI account                                  |
| Get Account   | Read   | Get profile and organization details for the account that owns the API key           |
| Text to Image | Write  | Generate images from a text prompt with a Stable Diffusion engine (consumes credits) |

## Example prompts

* Generate an image with Stability AI from a prompt I provide and show me the seed used.
* Check my Stability AI credit balance and list the engines available to my account.
