AI-YIAPI-全球AI分发站
  1. Generate
AI-YIAPI-全球AI分发站
  • 关于我们
  • Open AI
    • gpt-4-all(生成图片)
    • 内容补全接口
    • DALL·E 3
    • 创建嵌入
    • 创建转录
    • 创建翻译
    • TTS文本转语音
    • 合并音乐
  • InsightFace任务提交
    • 提交swap_face任务
  • 任务管理
    • 任务查询
  • Midjourney接口
    • 任务提交
      • 执行动作
      • 提交Blend任务
      • 提交Describe任务
      • 提交Imagine任务
      • 提交Modal
      • 提交Shorten任务
    • 任务查询
      • 指定ID获取任务
      • 获取任务图片的seed(需设置mj或niji的私信ID)
  • 暂时未启用
    • Generate
      • Stable Image Ultra
        POST
      • Stable Image Core
        POST
      • Stable Diffusion 3
        POST
    • SDXL & SD1.6
      • Text-to-image
    • styles
      • 创建样式
    • images
      • 生成图像
      • 图像矢量化
      • 移除背景
      • 清晰度提升
      • 生成式放大
    • 视频生成
      • 图生视频
    • 生成音乐
      POST
    • 获取音乐
      GET
    • 生成音乐
      POST
    • 获取音乐
      GET
    • flux-pro-1.1
      POST
    • flux-pro
      POST
    • flux-dev
      POST
    • flux-查询
      GET
    • Generate(文生图)
      POST
    • Remix(混合图)
      POST
    • Upscale(放大高清)
      POST
    • Describe(描述)
      POST
    • 图像生成
      POST
    • 文生视频
      POST
    • 图生视频
      POST
    • 查询任务
      GET
    • 获取视频
      GET
    • 生成视频
      POST
    • 图片描述
      POST
    • 文生图
      POST
    • 合成图
      POST
    • 放大图片
      POST
    • ideogram任务查询
      POST
    • CogVideoX视频生成
      POST
    • CogVideoX视频查询
      GET
    • Mix上传视频并生成视频
      POST
    • 查询视频任务
      GET
    • Multi模板列表
      GET
    • Mix官方模板列表
      GET
    • Mix上传视频素材库
      GET
    • Mix上传图片素材库
      GET
    • 剩余积分查询
      GET
    • Multi上传视频并生成视频
      POST
    • Move上传视频并生成视频
      POST
  1. Generate

Stable Image Core

POST
/sd/v2beta/stable-image/generate/core
Generate
Our primary service for text-to-image generation, Stable Image Core represents the best quality achievable at high
speed. No prompt engineering is required! Try asking for a style, a scene, or a character, and see what you get.

Try it out#

Grab your API key and head over to Open Google Colab

How to use#

Please invoke this endpoint with a POST request.
The headers of the request must include an API key in the authorization field. The body of the request must be
multipart/form-data, and the accept header should be set to one of the following:
image/* to receive the image in the format specified by the output_format parameter.
application/json to receive the image encoded as base64 in a JSON response.
The body of the request should include:
prompt
The body may optionally include:
aspect_ratio
negative_prompt
seed
style_preset
output_format
Note: for more details about these parameters please see the request schema below.

Output#

The resolution of the generated image will be 1.5 megapixels.

Credits#

Flat rate of 3 credits per successful generation. You will not be charged for failed generations.

请求参数

Authorization
Bearer Token
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
or
Header 参数
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.
>= 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.
>= 1 字符
示例值:
multipart/form-data
accept
enum<string> 
必需
Specify image/* to get the image bytes directly. Otherwise specify application/json to receive the image as base64 encoded JSON.
枚举值:
application/jsonimage/*
默认值:
image/*
Body 参数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.
>= 1 字符<= 10000 字符
示例值:
aspect_ratio
enum<string> 
可选
Controls the aspect ratio of the generated image.
枚举值:
16:91:121:92:33:24:55:49:169:21
默认值:
1:1
示例值:
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.
<= 10000 字符
示例值:
seed
number 
可选
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<= 4294967294
默认值:
0
示例值:
0
style_preset
enum<string> 
可选
Guides the image model towards a particular style.
枚举值:
3d-modelanalog-filmanimecinematiccomic-bookdigital-artenhancefantasy-artisometricline-artlow-polymodeling-compoundneon-punkorigamiphotographicpixel-arttile-texture
示例值:
output_format
enum<string> 
可选
Dictates the content-type of the generated image.
枚举值:
jpegpngwebp
默认值:
png
示例值:
png

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/sd/v2beta/stable-image/generate/core' \
--header 'authorization;' \
--header 'accept;' \
--form 'prompt=""'

返回响应

🟢200成功
application/json
Body
object {0}
示例
{}
🟠400请求有误
🟠403禁止访问
🟠422参数错误
🟠429429
🔴500服务器错误
上一页
Stable Image Ultra
下一页
Stable Diffusion 3
Built with