文本转 3D
POST
https://stablediffusionapi.com/api/v3/txt_to_3d该接口根据文本提示生成 3D 图像,同时传递适当的参数
POST
向https://stablediffusionapi.com/api/v3/txt_to_3d 接口发出请求,并将所需参数作为请求正文传递。
请求参数
Body 参数application/json
key
string
必需
您的 API 密钥用于请求授权。
prompt
string
必需
文本提示,包含您想要在图像中生成的内容的描述。
guidance_scale
integer
必需
无分类器指导的量表(最小值:1;最大值:20)
steps
integer
必需
去噪步骤数(最小:1;最大:50)
frame_size
integer
帧数尺寸)
output_type
string
必需
这是您要生成的 3D 图像的类型。它接受 gif 或 ply。
webhook
null
必需
设置 URL 以在图像生成完成后获取 POST API 调用。
track_id
null
必需
此 ID 在 Webhook API 调用的响应中返回。这将用于识别 Webhook 请求。
示例
{
"key": "",
"prompt": "beautiful man",
"guidance_scale": 20,
"steps": 64,
"frame_size": 256,
"output_type": "gif",
"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 年前