- OpenAI通用接口
- gemini
- Midjourney API文档
- Flux(文生图)
- Replicate格式
- OpenAI DallE3格式POST
- Runway视频接口
- Luma视频接口
- 可灵API(官方接口)
- 工作流接口
- suno
- ideogram
生成图片
POST
/replicate/v1/models/black-forest-labs/{model}/predictions
请求参数
Path 参数
model
string
必需
示例值:
flux-schnell
Header 参数
Authorization
string
必需
默认值:
{{Authorization}}
Body 参数application/json
input
object
必需
prompt
string
提示词
num_outputs
integer
出图数量
aspect_ratio
string
可选
1:1
,16:9
,9:16
,4:3
,3:4
image
string
垫图
示例
{
"input": {
"prompt": "string",
"num_outputs": 0,
"aspect_ratio": "string",
"image": "string"
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/replicate/v1/models/black-forest-labs/flux-schnell/predictions?members&reference&Type&_postman_listIndexKey=key&_postman_listAllowsMultipleValues' \
--data-raw ''
返回响应
🟢200成功
application/json
Body
id
string
任务ID
input
object
输入
prompt
string
必需
model
string
模型名
output
array[string]
输出
status
string
任务状态
示例
{
"created_at": "2024-12-02T01:34:05.988Z",
"id": "9172be78-0c7d-4f63-8351-a20e12b8d836",
"input": {
"prompt": "a cat"
},
"model": "black-forest-labs/flux-schnell",
"output": [
"https://oss.yunrobot.cn/123/images/2024/12/02/674c9d4067cef.png"
],
"status": "processing"
}
修改于 2024-12-15 07:11:34