Skip to main content
POST
Stable Image Core

Headers

authorization
string
required

Your Stability API key, used to authenticate your requests. Although you may have multiple keys in your account, you should use the same key for all requests to this API.

Minimum string length: 1
content-type
string
required

The content type of the request body. Do not manually specify this header; your HTTP client library will automatically include the appropriate boundary parameter.

Minimum string length: 1
Example:

"multipart/form-data"

accept
enum<string>
default:image/*
required

Specify image/* to get the image bytes directly. Otherwise specify application/json to receive the image as base64 encoded JSON.

Available options:
application/json,
image/*

Body

multipart/form-data
prompt
string
required

What you wish to see in the output image. A strong, descriptive prompt that clearly defines elements, colors, and subjects will lead to better results.

To control the weight of a given word use the format (word:weight), where word is the word you'd like to control the weight of and weight is a value between 0 and 1. For example: The sky was a crisp (blue:0.3) and (green:0.8) would convey a sky that was blue and green, but more green than blue.

Required string length: 1 - 10000
Example:

""

aspect_ratio
enum<string>
default:1:1

Controls the aspect ratio of the generated image.

Available options:
16:9,
1:1,
21:9,
2:3,
3:2,
4:5,
5:4,
9:16,
9:21
Example:

"1:1"

negative_prompt
string

A blurb of text describing what you do not wish to see in the output image.
This is an advanced feature.

Maximum string length: 10000
Example:

""

seed
number
default:0

A specific value that is used to guide the 'randomness' of the generation. (Omit this parameter or pass 0 to use a random seed.)

Required range: 0 <= x <= 4294967294
Example:

""

style_preset
enum<string>

Guides the image model towards a particular style.

Available options:
3d-model,
analog-film,
anime,
cinematic,
comic-book,
digital-art,
enhance,
fantasy-art,
isometric,
line-art,
low-poly,
modeling-compound,
neon-punk,
origami,
photographic,
pixel-art,
tile-texture
Example:

""

output_format
enum<string>
default:png

Dictates the content-type of the generated image.

Available options:
jpeg,
png,
webp
Example:

"png"

Response

Request succeeded.

The response is of type file.