🌐 US-Proxy
class="antialiased">
Skip to main content
The Stability AI REST API generates and edits images, audio, and 3D models. Every endpoint in this reference has an interactive playground: add your API key and send a real request from the page.

Base URL

All requests go to:
Current endpoints live under /v2beta, for example POST /v2beta/stable-image/generate/core.

Authentication

Authenticate every request with your API key in the Authorization header, using the Bearer scheme:
Create and manage keys on the API keys page. Requests with a missing or invalid key return 401.
Keep your API key secret. Don’t share it or commit it to a repository. If a key leaks, create a new one and delete the old one.

Requests

Generation and editing endpoints accept multipart/form-data. Send text parameters as form fields and images or audio as file fields.

Responses

Use the Accept header to choose how you receive generated media: Image endpoints also return the seed and finish reason in the seed and finish-reason response headers. A finish reason of CONTENT_FILTERED means the output violated the content moderation policy and was blurred.

Async generations

Some services take longer to run, such as Stable Audio 3.0, Creative Upscale, and Replace Background and Relight. These endpoints return an id immediately instead of the result:
Poll the matching results endpoint with that id until it returns the result: Both endpoints report progress the same way:
  • 202 means the generation is still in progress.
  • 200 returns the finished result.
Fetch results with the same API key you used to start the generation. Results are stored for 24 hours.

Errors

Errors return a JSON body with a machine-readable name and a list of human-readable errors:
Include the error id when you contact support. It helps us find the failed request.

Rate limits

You can make up to 150 requests in any 10-second window. If you exceed the limit, the API returns 429 and blocks your requests for 60 seconds. If you need a higher limit, contact support.

Credits

Each successful request consumes credits. The cost depends on the service. See Pricing for per-service costs.