通用XL pro-图生图
方法: POST路径: /volcv/v1
https://www.volcengine.com/docs/6791/1279296详情请看官方对接文档
请求参数
Query 参数
text
Action
string
必需
示例:
CVProcess
Version
string
必需
示例:
2022-08-31Header 参数
text
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}Body 参数 application/json
text
object
示例
{
"req_key"
:
"i2i_xl_sft"
,
"image_urls"
:
[
"https://xxx"
]
,
"prompt"
:
"美女"
,
"seed"
:
-1
,
"ddim_steps"
:
20
,
"scale"
:
7.0
,
"controlnet_args"
:
[
{
"type"
:
"canny"
,
"strength"
:
0.4
,
"binary_data_index"
:
0
}
]
,
"style_reference_args"
:
{
"id_weight"
:
0.2
,
"style_weight"
:
0.0
,
"binary_data_index"
:
0
}
,
"return_url"
:
true
,
"logo_info"
:
{
"add_logo"
:
true
,
"position"
:
2
,
"language"
:
0
,
"opacity"
:
0.3
,
"logo_text_content"
:
"这里是明水印内容"
}
}请求示例代码
Shell
bash
curl --location --request POST '/volcv/v1?Action=CVProcess&Version=2022-08-31' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"req_key": "i2i_xl_sft",
"image_urls": [
"https://xxx"
],
"prompt": "美女",
"seed": -1,
"ddim_steps": 20,
"scale": 7.0,
"controlnet_args": [
{
"type": "canny",
"strength": 0.4,
"binary_data_index": 0
}
],
"style_reference_args": {
"id_weight": 0.2,
"style_weight": 0.0,
"binary_data_index": 0
},
"return_url": true,
"logo_info": {
"add_logo": true,
"position": 2,
"language": 0,
"opacity": 0.3,
"logo_text_content": "这里是明水印内容"
}
}'返回响应
🟢 200 成功
内容类型: application/json
响应结构
text
object示例
json
{
"code": 10000,
"data": {
"algorithm_base_resp": {
"status_code": 0,
"status_message": "Success"
},
"binary_data_base64": [],
"comfyui_cost": 11,
"controlnet_args": [
{
"binary_data_index": 0,
"strength": 0.4,
"type": "canny"
}
],
"controlnet_args.canny.binary_data_index": 0,
"controlnet_args.canny.strength": 0.4,
"controlnet_args.depth.binary_data_index": 0,
"controlnet_args.depth.strength": 0,
"controlnet_args.pose.binary_data_index": 0,
"controlnet_args.pose.strength": 0,
"custom_prompt": "美女",
"ddim_step": 20,
"height": 1024,
"image_urls": [
"https://xxx",
"https://xxx"
],
"logo_info": {
"add_logo": true,
"language": 0,
"opacity": 1,
"position": 2
},
"multi_pipeline_select_key": "t2i",
"prompt": "beautiful woman",
"prompt_translated": "beautiful woman",
"request_id": "8bcd844f913c89717d474d0af05f6bb96e0f4f2d409a379f84349a8952a92121",
"return_url": true,
"scale": 7,
"seed": -1,
"style_reference_args": {
"binary_data_index": 0,
"id_weight": 0.2,
"style_weight": 0
},
"style_reference_args.binary_data_index": 0,
"style_reference_args.id_weight": 0.2,
"style_reference_args.style_weight": 0,
"width": 1024
},
"message": "Success",
"request_id": "20240809145732F1B86B6E94464D05716A",
"status": 10000,
"time_elapsed": "12.696326169s"
}