外画
POST
/v3/outpainting扩展图像的边界或为图像的边缘提供额外的变化。您可以在这里获取指导:https://novita.ai/get-started/UseCase_ImageEnhancement.html#_4-outpainting。
请求参数
Header 参数
Authorization
string
必需
Content-Type
string
必需
Body 参数application/json
image_file
string
必需
原图base64,最大分辨率1024*1024,最大文件大小30Mb。
prompt
string
必需
肯定提示词,用“,”分隔。
negative_prompt
string
可选
否定提示词,用“,”分隔
width
integer
必需
外画图像的宽度(px),需要大于原图的宽度,允许的值范围为:256 ~ 1024(px)。
height
integer
必需
外画图像的高度(px),需要大于原图的高度,允许的值范围是:256 ~ 1024 (px)。
center_x
integer
必需
原始图像中心与扩展图像中心在 X 轴方向上的偏移量 (px)。默认值为 0。允许的值范围为 -width/2 ~ width/2。
center_y
integer
必需
原始图像中心与扩展图像中心之间在 Y 轴方向上的偏移量 (px)。默认值为 0。允许的值范围为 -height/2 ~ height/2。
extra
object
必需
response_image_type
string
返回图像的格式。
enterprise_plan
object
可选
示例
{
"image_file": "{{base64 encoded images}}",
"prompt": "analog film photo, photo of a beautiful woman, (wearing a colorful bikini:1.1), short blonde hair, flashing, female model, fashion show, catwalk, small breasts, sunny beach , RAW Photograph, dslr, soft lighting, high quality, film grain, Fujifilm XT3 detailed skin with visible pores, insane details, masterpiece, 8k, 35mm photograph, dslr, kodachrome, faded film, desaturated, 35mm photo, grainy, vintage, Kodachrome, Lomography, stained, highly detailed, found footage",
"negative_prompt": "",
"width": 768,
"height": 1024,
"center_x": 0,
"center_y": 0,
"extra": {
"response_image_type": "png",
"enterprise_plan": {
"enabled": false
}
}
}
示例代码
返回响应
成功(200)
请求有误(400)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
image_file
string
必需
image_type
string
必需
示例
成功示例
{
"image_file": "{{base64 of returned image_file}}",
"image_type": "png"
}
修改于 7 个月前