Base URL
All requests go to:/v2beta, for example POST /v2beta/stable-image/generate/core.
Authentication
Authenticate every request with your API key in theAuthorization header, using the Bearer scheme:
401.
Requests
Generation and editing endpoints acceptmultipart/form-data. Send text parameters as form fields and images or audio as file fields.
Responses
Use theAccept 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 anid immediately instead of the result:
id until it returns the result:
Both endpoints report progress the same way:
202means the generation is still in progress.200returns the finished result.
Errors
Errors return a JSON body with a machine-readablename 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 returns429 and blocks your requests for 60 seconds. If you need a higher limit, contact support.