替换对象
POST
/v3/async/replace-object根据您的意愿替换不需要的对象、缺陷、目标人员。返回的图像可以通过 API 访问:https://docs.novita.ai/operation/operation-get-v3-async-task-result,参数为“task_id”。您可以在此处获取指导:https://novita.ai/get-started/UseCase_ImageEnhancement.html#_11-replace-object。
请求参数
Header 参数
Authorization
string
必需
Content-Type
string
必需
Body 参数application/json
image_file
string
必需
原始图像的base64,最大分辨率为16兆像素,最大文件大小为30 Mb。
prompt
string
必需
正向提示词,长度[1, 512],除以','
extra
object
额外信息。
response_image_type
string
返回图像的格式。
enterprise_plan
object
可选
negative_prompt
string
必需
否定提示词,长度[0, 512],除以','
object_prompt
string
必需
需要替换的对象的提示,用于指定对象,长度[1, 512],除以','
示例
{
"image_file": "{{base64 encoded image}}",
"prompt": "a dog",
"extra": {
"response_image_type": "png",
"enterprise_plan": {
"enabled": false
}
},
"negative_prompt": "ng_deepnegative_v1_75t, (badhandv4:1.2), (worst quality:2), (low quality:2), (normal quality:2), lowres, bad anatomy, bad hands, ((monochrome)), ((grayscale)) watermark, moles",
"object_prompt": "1girl"
}
示例代码
返回响应
成功(200)
请求有误(400)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
task_id
string
必需
示例
成功示例
{
"task_id": "df7c6754-7b5b-48d6-9757-be14003edb07"
}
修改于 7 个月前