- 发出请求
- 模型接口
- 完成对象
- OpenAI接口 (Chat)
- Realtime (实时语音、对话)
- Anthropic Claude
- 谷歌Gemini
- Midjourney
- GPTs 相关
- 文生音乐
- 文生视频
- Rerank API
- 自动补全接口(Completions)
- 文生图接口
- 向量生成接口(Embeddings)
- 音频接口(Audio)
- 审查(Moderations)
- Python配置方式
- 帮助中心
- 回收站
stable-diffusion(OpenAI图像格式)
POST
/images/generations
请求参数
Header 参数
Authorization
string
可选
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
prompt
string
必需
n
integer
可选
size
string
可选
示例
{
"model": "flux.1.1-pro",
"prompt": "a beautiful landscape with a river and mountains",
"size": "1024x1024"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.aigc369.com/v1/images/generations' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "flux.1.1-pro",
"prompt": "a beautiful landscape with a river and mountains",
"size": "1024x1024"
}'
返回响应
🟢200Create image
application/json
Body
created
integer
必需
data
array [object {1}]
必需
url
string
必需
示例
{
"created": 1589478378,
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}