图像深度
POST
https://stablediffusionapi.com/api/v5/depth2imgV5 API Depth to Image 端点允许深度生成图片。
将图像 URL 与init_image
参数一起传递,并将所需修改的描述添加到参数中prompt
。
POST
向 https://stablediffusionapi.com/api/v5/depth2img 接口发出请求,并在请求正文中传递所需的参数。
请求参数
Body 参数application/json
key
string
必需
您用于请求授权的 API Key
init_image
string
必需
文本提示,包含您想要在图像中生成的内容的描述
prompt
string
链接到初始图像
示例
{
"key": "",
"init_image": "https://d1okzptojspljx.cloudfront.net/generations/b3341a09-082e-474e-989f-72ec3f3bf7aa-0.png",
"prompt": "give him glasses"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
status
string
必需
generationTime
number
必需
id
integer
必需
output
string
必需
示例
{
"status": "success",
"generationTime": 1.322338581085205,
"id": 14754476,
"output": "https://pub-8b49af329fae499aa563997f5d4068a4.r2.dev/generations/87e450a1-f0e6-4f95-a6c5-c081fd80f635-0.png"
}
修改于 1 年前