Skip to main content
POST
Stable Image Ultra

请求头

authorization
string
必填

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
必填

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
示例:

"multipart/form-data"

accept
enum<string>
默认值:image/*
必填

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

可用选项:
application/json,
image/*

请求体

multipart/form-data
prompt
string
必填

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
示例:

""

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
示例:

""

aspect_ratio
enum<string>
默认值:1:1

Controls the aspect ratio of the generated image.

可用选项:
16:9,
1:1,
21:9,
2:3,
3:2,
4:5,
5:4,
9:16,
9:21
示例:

"1:1"

seed
number
默认值: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.)

必填范围: 0 <= x <= 4294967294
示例:

""

output_format
enum<string>
默认值:png

Dictates the content-type of the generated image.

可用选项:
jpeg,
png,
webp
示例:

"png"

响应

图片生成成功。返回格式由请求中的 Accept 头决定。

The response is of type file.