GPTNB Docs
Docs
Docs
  1. SD3
  • 发出请求
  • OpenAI接口
    • Realtime文档
    • 聊天接口(Chat)
      • 生成音乐
      • 生成图像(chat 格式)
    • 自动补全接口(Completions)
      • 创建完成
    • 图像接口(Images)
      • 创建图像
      • 生成
    • 向量生成接口(Embeddings)
      • 创建嵌入
    • 音频接口(Audio)
      • 创建转录
      • 创建翻译
      • 创建语音
  • 图片接口
    • Midjourney
      • 补充 - 其他参数以及回调
      • 换脸任务提交
        • 提交swap_face任务
      • 任务提交
        • 执行动作(所有的关联按钮动作UPSCALE; VARIATION; REROLL; ZOOM等)
        • 绘图变化-simple(UPSCALE; VARIATION; REROLL)
        • 提交Blend任务(图生图)
        • 提交Describe任务(图生文)
        • 提交Imagine任务(文生图、文图生图)
        • 提交Modal(提交局部重绘、ZOOM)
        • Change
        • 提交Shorten任务(prompt分析)
      • 任务查询
        • 根据ID列表查询任务
        • 指定ID获取任务
        • 获取任务图片的seed
    • Stable Diffusion(官方格式)
      • SD3
        • Stable Image Ultra
          POST
        • Stable Image Core
          POST
        • Stable Diffusion 3
          POST
      • SDXL
        • Text-to-image
    • Flux
      • 官方格式
        • 生成图像(image)
        • 查询任务(get_result)
      • OpenAI格式
        • Flux
    • Ideogram(官方格式)
      • Generate(文生图)
      • Remix(混合图)
      • Upscale(放大高清)
      • Describe(描述)
    • 其他图像API1(开发中)
      • 创建抠图任务
      • 获取图片压缩结果
      • 获取抠图结果
      • 创建图片变清晰任务
      • 获取图片变清晰结果
      • 创建图像修复任务
      • 获取图像修复结果
      • 创建背景生成任务
      • 获取背景生成结果
      • 创建证件照制作任务
      • 获取证件照制作结果
      • 创建图像上色任务
      • 获取黑白图像上色结果
      • 创建图片压缩任务
      • 创建OCR任务
      • 获取OCR结果
      • 创建图片智能切边任务
      • 获取图片智能切边结果
    • 其他图像API2(开发中)
      • 开放API接口
        • 生成图片融合(图片融合)
        • 生成图片(AI艺术二维码)
        • 生成创意文字(AI艺术字(艺术、光影、隐藏文字))
        • 回调演示
        • 查询详情
        • 获取模板列表
        • 获取模型列表
      • 示例
        • 生成图片融合示例
        • 1.自定义调用- 普通示例(艺术二维码调用示例)
        • 2.自定义调用 - 不同版本(艺术二维码调用示例)
        • 3.自定义调用 -二维码强度(艺术二维码调用示例)
        • 4.模版调用 - 普通示例(艺术二维码调用示例)
        • 5.模版调用 - 二维码强度(艺术二维码调用示例)
        • 6.自定义调用 - 上传图片(艺术二维码调用示例)
        • 7.不同码眼调用(艺术二维码调用示例)
        • 8.不同版本(艺术二维码调用示例)
        • 1.光影文字 - 使用模版(AI艺术字调用示例)
        • 2.光影文字 - 自定义prompt调用(AI艺术字调用示例)
        • 3.艺术字调用 - 使用模版(AI艺术字调用示例)
        • 基础调用(MX绘画-生成类接口-Cute-生成示例(必看))
        • 基础调用 - 自定义尺寸(MX绘画-生成类接口-Cute-生成示例(必看))
        • 基础调用-开启审核(MX绘画-生成类接口-Cute-生成示例(必看))
        • 融合模型调用(MX绘画-生成类接口-Cute-生成示例(必看))
        • 反词 - 替换默认反词(MX绘画-生成类接口-Cute-生成示例(必看))
        • 反词 - 追加反词(MX绘画-生成类接口-Cute-生成示例(必看))
  • 音乐接口
    • Suno
      • 官方格式(v2)
        • 所有接口
          • 音乐链接转成suno(upload)
          • 音乐生成(generations)
          • 查询任务(feed)
          • 获取完整音乐(concat)
        • 场景1 生成自定义音乐(带歌词)
          • 音乐生成(generations)
          • 查询任务(feed)
        • 场景 2 通过提示词直接生成音乐(带歌词)
          • 音乐生成(generations)
          • 查询任务(feed)
        • 场景 4 通过提示词直接生成音乐(纯音乐)
          • 音乐生成(generations)
          • 查询任务(feed)
        • 场景 3 生成自定义音乐(纯音乐)
          • 音乐生成(generations)
          • 查询任务(feed)
        • 场景 5 上传自定义音频并续写
          • 续写自定义音频步骤介绍
          • 音乐链接转成suno(upload)
          • 音乐生成(generations)
          • 查询任务(feed)
        • 场景 6 续写音乐并获取完整音乐
          • 步骤 1 音乐生成
          • 步骤 3 扩展音乐
          • 步骤 2 查询任务
          • 步骤 4 查询拓展的任务
          • 步骤 6 查询完整音乐的任务
          • 步骤 5 获取完整音乐
        • 场景 7 Cover音乐(音乐翻版,修改风格)
          • 步骤 1 音乐生成
          • 步骤 2 查询任务
          • 步骤 3 Cover 音乐
          • 步骤 4 查询拓展的任务
        • 场景 8 Replace Section (替换片段)
          • 步骤 1 音乐生成
          • 步骤 2 查询任务
          • 步骤 3 Replace Section
          • 步骤 4 查询拓展的任务
    • Udio
      • Udio 说明
      • 根据描述创建音乐 - 场景1
      • 根据歌词创建音乐 - 场景2
      • 音乐续写 - 场景3
      • 获取任务进度
  • 视频接口
    • Luma
      • 官方格式(v2)
        • 提交生成视频任务
        • 获取视频无水印链接
        • 查询单个任务
        • 扩展视频
    • CogVideoX(官方格式)
      • 生成(generations)
      • 查询(async-result)
    • Vidu(开发中)
      • 普通
        • 创建视频(tasks)
        • 高清视频(tasks)
        • 视频状态(state)
        • 视频查询(tasks-get)
    • Pika
      • generate(文本)
      • generate(参考图片)
      • generate(参考视频/扩展视频)
      • feed
    • Runway
      • v1格式
        • generate(文本)
        • generate(参考图片)
        • feed
      • 官方格式(v2)
        • 生成视频(tasks)
        • 查询任务
    • Pixverse
      • @回调说明
      • @接口说明
      • generate(文本)
      • feed
      • generate(参考图片)
    • 可灵(官方格式)
      • 图像生成(暂不支持)
      • 文生视频
      • 图生视频
      • 查询任务
    • Viggle(开发中)
      • Mix上传视频并生成视频
      • 查询视频任务
      • Multi模板列表
      • Mix官方模板列表
      • Mix上传视频素材库
      • Mix上传图片素材库
      • 剩余积分查询
      • Multi上传视频并生成视频
      • Move上传视频并生成视频
    • Sora(官方格式 - 开发中)
      • 创建视频
      • 查询视频
  • PPT接口
    • 文多多(官方格式)
      • 创建接口token
      • 查询API信息
      • 分页查询 PPT 模板
      • 更换 PPT 模板
      • 修改大纲
      • 接口鉴权
      • 解析文件内容
      • 生成大纲
      • 生成大纲内容
      • 随机 PPT 模板
      • 直接生成PPT
      • 获取 PPT 列表
      • 加载 PPT 数据
      • 下载 PPT
      • 更新 PPT 属性
      • 保存 PPT
      • 删除PPT
      • 生成大纲内容同时异步生成PPT
      • 查询异步生成PPT信息
      • ppt转json
      • json转ppt
    • 韦尼克(官方格式)
      • 申请PPT生成任务(PPT描述/主题一键生成)
      • 获取PPT生成状态和预览页(PPT描述/主题一键生成)
      • 通过描述生成PPT标题大纲(逐步生成PPT)
      • 申请PPT生成任务(逐步生成PPT)
      • 获取PPT生成状态和预览页(逐步生成PPT)
      • 根据标题生成封面预览图(模版封面图预览)
      • 根据标题以及封面预览信息生成不同主题色的预览(设置主题色)
      • 通过task_id增加PPT单页(PPT中插入单页)
      • 基于当前模板生成(基于当前模版生成)
      • 短文本文件生成PPT(文件内容解析)
      • 获取PPT生成状态和预览页(文件内容解析)
      • 获取PPT生成状态和预览页(文件内容解析)
      • 通过文件生成PPT(文件内容解析)
      • 更换模版(更换模版)
      • 生成PPT备注(演讲稿备注)
      • 获取PPT下载链接(获取下载链接)
  • 帮助中心
    • 常见问题及解决办法
  • OpenAI官方文档
    • 介绍
    • 项目说明
    • 导言
    • 身份验证
    • 发出请求
    • 参数详情
    • 音频(Audio)
      • 创建翻译
    • 聊天(Chat)
      • gpts 请求
      • 聊天完成块对象
      • 创建聊天补全
    • 自动补全(Completions)
      • 完成对象
    • 嵌入(Embeddings)
      • 嵌入对象
    • 微调(Fine-tuning)
      • 微调作业对象
      • 微调作业事件对象
      • 创建微调作业
      • 列出微调作业
      • 检索微调作业
      • 取消微调
      • 列出微调事件
    • 图像(Images)
      • README
      • 图像对象
      • 创建图片编辑
      • 创建图像变体
    • 模型(Models)
      • 模型对象
      • 列出模型
      • 检索模型
      • 删除微调模型
    • 文件(Files)
      • README
      • 文件对象
      • 上传文件
      • 删除文件
      • 检索文件
      • 检索文件内容
      • 列出文件
    • 审查(Moderations)
      • 调节对象
      • 创建内容审核
    • 助手测试版(AssistantsBeta)
      • 辅助对象
      • 辅助文件对象
      • 创建助手
      • 检索助手
      • 修改助手
      • 删除助手
      • 列出助手
      • 创建辅助文件
      • 检索助手文件
      • 删除辅助文件
      • 列出助手文件
    • 线程数(Threads)
      • 线程对象
      • 创建线程
      • 检索线程
      • 修改线程
      • 删除话题
    • 留言(Messages)
      • 消息对象
      • 消息文件对象
      • 创建消息
      • 检索消息
      • 修改留言
      • 列出消息
      • 检索消息文件
      • 列出消息文件
    • 运行(Runs)
      • 运行对象
      • 运行步骤对象
      • 创建运行
      • 检索运行
      • 修改运行
      • 列表运行
      • 提交工具输出以运行
      • 取消运行
      • 创建线程并运行
      • 检索运行步骤
      • 列出运行步骤
    • 已弃用-音频(Audio)
      • 创建转录
  1. SD3

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.

请求参数

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

示例代码

Python
JavaScript
Shell
Java
Swift
Go
PHP
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Python
JavaScript
Shell
Java
curl --location --request POST 'https://api.gptnb.ai/sd/v2beta/stable-image/generate/core' \
--header 'authorization;' \
--header 'accept;' \
--form 'prompt=""' \
--form 'aspect_ratio="1:1"' \
--form 'negative_prompt=""' \
--form 'seed=""' \
--form 'style_preset=""' \
--form 'output_format="png"'

返回响应

🟢200Generation was successful.
application/json
Body
object {0}
示例
{}
🟠400Invalid parameter(s), see the `errors` field for details.
🟠403Your request was flagged by our content moderation system.
🟠422You made a request with an unsupported language.
🟠429You have made more than 150 requests in 10 seconds.
🔴500An internal error occurred. If the problem persists [contact support](https://stabilityplatform.freshdesk.com/support/tickets/new).
上一页
Stable Image Ultra
下一页
Stable Diffusion 3
Built with