图像转 3D
POST
https://stablediffusionapi.com/api/v3/img_to_3d该接口从图像生成 3D 图像,同时传递适当的参数。
POST
向https://stablediffusionapi.com/api/v3/img_to_3d端点发出请求,并将所需参数作为请求正文传递。
请求参数
Body 参数application/json
key
string
必需
您的 API 密钥用于请求授权。
image
string
链接到初始图像
guidance_scale
integer
必需
无分类器指导的量表(最小值:1;最大值:20)
steps
integer
必需
去噪步骤数(最小:1;最大:50)
frame_size
integer
帧数尺寸)
batch_size
integer
每个提示的图像数量
seed
integer
必需
种子用于重现结果,相同的种子将再次为您提供相同的图像。为随机数传递null 。
safety_checker
string
必需
NSFW 图像检查器。如果检测到此类图像,它将被空白图像替换。
seconds
integer
每个提示的图像数量
webhook
null
必需
设置 URL 以在图像生成完成后获取 POST API 调用。
track_id
null
必需
此 ID 在 Webhook API 调用的响应中返回。这将用于识别 Webhook 请求。
示例
{
"key": "",
"image": "https://img.freepik.com/premium-photo/red-roses-rose-petals-white-backgroundvalentines-day-concept_167862-5720.jpg",
"guidance_scale": 5,
"steps": 64,
"frame_size": 128,
"batch_size": 10,
"seed": 20,
"safety_checker": "no",
"seconds": 4,
"webhook": null,
"track_id": null
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
status
string
必需
generationTime
integer
必需
id
integer
必需
output
array[string]
必需
meta
object
必需
file_prefix
string
必需
frame_size
integer
必需
guidance_scale
integer
必需
negative_prompt
string
必需
outdir
string
必需
output_type
string
必需
prompt
string
必需
safetychecker
string
必需
seconds
integer
必需
seed
integer
必需
steps
integer
必需
示例
{
"status": "success",
"generationTime": 6,
"id": 326,
"output": [
"https://cdn.stablediffusionapi.com/generations/2d74af44-825c-4cff-9fe9-3716bd40c9fd.gif"
],
"meta": {
"file_prefix": "2d74af44-825c-4cff-9fe9-3716bd40c9fd",
"frame_size": 256,
"guidance_scale": 15,
"negative_prompt": "",
"outdir": "out",
"output_type": "gif",
"prompt": "A birthday cupcake",
"safetychecker": "no",
"seconds": 3,
"seed": 1110454524,
"steps": 64
}
}
修改于 1 年前