Skip to content
EN

通用2.0Pro-文生图

方法: POST路径: /volcv/v1

{ "req_key":"high_aes_general_v20_L", "prompt":"千军万马", "req_schedule_conf":"general_v20_9B_pe", "seed":-1, "scale":3.5, "ddim_steps":16, "width":512, "height":512, "use_sr":True, "return_url":True, "logo_info": { "add_logo": False, "position": 0, "language": 0, "opacity": 0.3, "logo_text_content": "这里是明水印内容" } }

请求参数

Query 参数

text
Action
string
必需
示例:
CVProcess
Version
string
必需
示例:
2022-08-31

Header 参数

text
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}

Body 参数 application/json

text
object
示例
{
"req_key"
:
"high_aes_general_v21_L"
,
"prompt"
:
"千军万马"
,
"req_schedule_conf"
:
"general_v20_9B_pe"
,
"llm_seed"
:
-1
,
"seed"
:
-1
,
"scale"
:
3.5
,
"ddim_steps"
:
25
,
"width"
:
512
,
"height"
:
512
,
"use_pre_llm"
:
true
,
"use_sr"
:
true
,
"return_url"
:
true
,
"logo_info"
:
{
"add_logo"
:
false
,
"position"
:
0
,
"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": "high_aes_general_v21_L",
    "prompt": "千军万马",
    "req_schedule_conf": "general_v20_9B_pe",
    "llm_seed": -1,
    "seed": -1,
    "scale": 3.5,
    "ddim_steps": 25,
    "width": 512,
    "height": 512,
    "use_pre_llm": true,
    "use_sr": true,
    "return_url": true,
    "logo_info": {
        "add_logo": false,
        "position": 0,
        "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": [
            ""
        ],
        "pe_result": "",
        "predict_tags_result": "",
        "rephraser_result": "",
        "request_id": ""
    },
    "message": "Success",
    "request_id": "",
    "status": 10000,
    "time_elapsed": "7.216940183s"
}