官方文档:https://cloud.tencent.com/document/product/266/126240
POST
/tencent-vod/v1/aigc-image创建任务
API Key application/json
请求示例
curl -X POST https://top.qingyuntop.ai/tencent-vod/v1/aigc-image \
-H "Authorization: Bearer ${QINGYUN_TOP_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"model_name": "GEM",
"model_version": "3.0",
"file_infos": [
{
"type": "file",
"file_id": "387702299774574677",
"url": "",
"text": "原始图片的描述信息"
}
],
"prompt": "convert this image to anime style",
"negative_prompt": "blur, distorted",
"enhance_prompt": "Enabled",
"output_config": {
"storage_mode": "Temporary",
"resolution": "1080P",
"aspect_ratio": "1:1",
"person_generation": "AllowAdult",
"input_compliance_check": "Enabled",
"output_compliance_check": "Enabled"
},
"session_id": "image-task-67890",
"session_context": "{\"user_id\": \"123\", \"scene\": \"profile_picture\"}",
"tasks_priority": 10,
"ext_info": ""
}'请求参数
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
Authorization | Header | string | 否 | - | Bearer {{YOUR_API_KEY}} |
Content-Type | Header | string | 否 | - | application/json |
model_name | JSON body | string | 是 | 模型名称。取值: GEM:Gemini; Qwen:千问。 Hunyuan:混元。 示例值:GEM | - |
model_version | JSON body | string | 是 | 模型版本。取值: 当 ModelName 是 GEM,可选值为 2.5、3.0; 当 ModelName 是 Qwen,可选值为 0925; 当 ModelName 是 Hunyuan,可选值为 3.0; 示例值:2.5 | - |
prompt | JSON body | string | 是 | 提示词 | - |
file_infos | JSON body | array<object> | 否 | - | - |
file_infos[].type | JSON body | string | 否 | 输入的视频文件类型。取值有: File:点播媒体文件; Url:可访问的 URL; 示例值:File | - |
file_infos[].file_id | JSON body | string | 否 | 图片文件的媒体文件 ID,即该文件在云点播上的全局唯一标识符,在上传成功后由云点播后台分配。可以在 视频上传完成事件通知 或 云点播控制台 获取该字段。当 Type 取值为 File 时,本参数有效。 说明: 1. 推荐使用小于7M的图片; 2. 图片格式的取值为:jpeg,jpg, png, webp。 示例值:3704211***509819 | - |
file_infos[].url | JSON body | string | 否 | 可访问的文件 URL。当 Type 取值为 Url 时,本参数有效。 说明: 1. 推荐使用小于7M的图片; 2. 图片格式的取值为:jpeg,jpg, png, webp。 示例值:https://test.com/1.png | - |
file_infos[].text | JSON body | string | 否 | 输入图片的描述信息,用于帮助模型理解图片。仅GEM 2.5、GEM 3.0 有效。 示例值:任务背景:这是需要翻新的主建筑(图1),不得改变其几何结构。 | - |
negative_prompt | JSON body | string | 否 | 要阻止模型生成图片的提示词。 | - |
enhance_prompt | JSON body | string | 否 | 是否自动优化提示词。开启时将自动优化传入的 Prompt,以提升生成质量。取值有: Enabled:开启; Disabled:关闭; | - |
output_config | JSON body | object | 否 | 生图任务的输出媒体文件配置。 | - |
output_config.storage_mode | JSON body | string | 否 | 存储模式。取值有: Permanent:永久存储,生成的图片文件将存储到云点播,可在事件通知中获取到 FileId; Temporary:临时存储,生成的图片文件不会存储到云点播,可在事件通知中获取到临时访问的 URL; 默认值:Temporary | - |
output_config.resolution | JSON body | string | 否 | 生成图片的分辨率。可选值为 720P、1080P、2K、4K、1024x1024、2048x2048、2304x1728、2496x1664、2560x1440、3024x1296、4096x4096、4694x3520、4992x3328、5404x3040、6198x2656,其中使用模型 Jimeng 时,推荐通过 Prompt 指定图片分辨率和宽高比。 示例值:1024x1024 | - |
output_config.aspect_ratio | JSON body | string | 否 | 指定所生成图片的宽高比。 当 ModelName 是 GEM,可选值是 1:1、3:2、2:3、3:4、4:3、4:5、5:4、9:16、16:9 和 21:9; 当 ModelName 是 Qwen、Jimeng,则暂不支持,其中 Jimeng 会结合 Prompt意图、参考图片尺寸,由模型智能判断输出图片的宽高比。 示例值:16:9 | - |
output_config.person_generation | JSON body | string | 否 | 是否允许人物或人脸生成。取值有: AllowAdult:允许生成成人; Disallowed:禁止在图片中包含人物或人脸; 示例值:AllowAdult | - |
output_config.input_compliance_check | JSON body | string | 否 | 是否开启输入内容的合规性检查。取值有: Enabled:开启; Disabled:关闭; 示例值:Enabled | - |
output_config.output_compliance_check | JSON body | string | 否 | 是否开启输出内容的合规性检查。取值有: Enabled:开启; Disabled:关闭; 示例值:Enabled | - |
session_id | JSON body | string | 否 | 用于去重的识别码,如果三天内曾有过相同的识别码的请求,则本次的请求会返回错误。最长 50 个字符,不带或者带空字符串表示不做去重。 示例值:mysession | - |
session_context | JSON body | string | 否 | 来源上下文,用于透传用户请求信息,音画质重生完成回调将返回该字段值,最长 1000 个字符。 示例值:mySessionContext | - |
tasks_priority | JSON body | string | 否 | 任务的优先级,数值越大优先级越高,取值范围是 -10 到 10,不填代表 0。 示例值:10 | - |
ext_info | JSON body | string | 否 | 保留字段,特殊用途时使用。 示例值:myextinfo | - |
返回响应 (200)
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
status | 响应 JSON | string | 是 | - | - |
request_id | 响应 JSON | string | 是 | - | - |
response_url | 响应 JSON | string | 是 | - | - |
status_url | 响应 JSON | string | 是 | - | - |
cancel_url | 响应 JSON | string | 是 | - | - |
logs | 响应 JSON | null | 是 | - | - |
metrics | 响应 JSON | object | 是 | - | - |
queue_position | 响应 JSON | integer | 是 | - | - |
响应示例
{
"Response": {
"TaskId": "251007502-AigcImage***2782aff1e896673f1ft",
"RequestId": "f50d7667-72d8-46bb-a7e3-0613588971b6"
}
}来源原始接口定义(用于追溯)
以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。
{
"id": 495899691,
"name": "创建任务",
"type": "http",
"serverId": "",
"preProcessors": [],
"postProcessors": [],
"inheritPreProcessors": {},
"inheritPostProcessors": {},
"description": "官方文档:https://cloud.tencent.com/document/product/266/126240",
"operationId": "",
"sourceUrl": "",
"method": "post",
"path": "/tencent-vod/v1/aigc-image",
"tags": [],
"status": 1,
"requestBody": {
"type": "application/json",
"parameters": [],
"jsonSchema": {
"type": "object",
"properties": {
"prompt": {
"type": "string",
"description": "提示词"
},
"negative_prompt": {
"type": "string",
"description": "要阻止模型生成图片的提示词。"
},
"enhance_prompt": {
"type": "string",
"description": "是否自动优化提示词。开启时将自动优化传入的 Prompt,以提升生成质量。取值有:\nEnabled:开启;\nDisabled:关闭;"
},
"output_config": {
"type": "object",
"properties": {
"storage_mode": {
"type": "string",
"description": "存储模式。取值有:\nPermanent:永久存储,生成的图片文件将存储到云点播,可在事件通知中获取到 FileId;\nTemporary:临时存储,生成的图片文件不会存储到云点播,可在事件通知中获取到临时访问的 URL;\n\n默认值:Temporary"
},
"aspect_ratio": {
"type": "string",
"description": "指定所生成图片的宽高比。\n当 ModelName 是 GEM,可选值是 1:1、3:2、2:3、3:4、4:3、4:5、5:4、9:16、16:9 和 21:9;\n当 ModelName 是 Qwen、Jimeng,则暂不支持,其中 Jimeng 会结合 Prompt意图、参考图片尺寸,由模型智能判断输出图片的宽高比。\n\n示例值:16:9"
},
"person_generation": {
"type": "string",
"description": "是否允许人物或人脸生成。取值有:\nAllowAdult:允许生成成人;\nDisallowed:禁止在图片中包含人物或人脸;\n\n示例值:AllowAdult"
},
"input_compliance_check": {
"type": "string",
"description": "是否开启输入内容的合规性检查。取值有:\nEnabled:开启;\nDisabled:关闭;\n\n示例值:Enabled"
},
"output_compliance_check": {
"type": "string",
"description": "是否开启输出内容的合规性检查。取值有:\nEnabled:开启;\nDisabled:关闭;\n\n示例值:Enabled"
},
"resolution": {
"type": "string",
"description": "生成图片的分辨率。可选值为 720P、1080P、2K、4K、1024x1024、2048x2048、2304x1728、2496x1664、2560x1440、3024x1296、4096x4096、4694x3520、4992x3328、5404x3040、6198x2656,其中使用模型 Jimeng 时,推荐通过 Prompt 指定图片分辨率和宽高比。\n示例值:1024x1024"
}
},
"x-apifox-orders": [
"storage_mode",
"resolution",
"aspect_ratio",
"person_generation",
"input_compliance_check",
"output_compliance_check"
],
"description": "生图任务的输出媒体文件配置。"
},
"session_id": {
"type": "string",
"description": "用于去重的识别码,如果三天内曾有过相同的识别码的请求,则本次的请求会返回错误。最长 50 个字符,不带或者带空字符串表示不做去重。\n示例值:mysession"
},
"session_context": {
"type": "string",
"description": "来源上下文,用于透传用户请求信息,音画质重生完成回调将返回该字段值,最长 1000 个字符。\n示例值:mySessionContext"
},
"tasks_priority": {
"type": "string",
"description": "任务的优先级,数值越大优先级越高,取值范围是 -10 到 10,不填代表 0。\n示例值:10"
},
"ext_info": {
"type": "string",
"description": "保留字段,特殊用途时使用。\n示例值:myextinfo"
},
"file_infos": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "输入的视频文件类型。取值有:\nFile:点播媒体文件;\nUrl:可访问的 URL;\n\n示例值:File"
},
"file_id": {
"type": "string",
"description": "图片文件的媒体文件 ID,即该文件在云点播上的全局唯一标识符,在上传成功后由云点播后台分配。可以在 视频上传完成事件通知 或 云点播控制台 获取该字段。当 Type 取值为 File 时,本参数有效。\n说明:\n1. 推荐使用小于7M的图片;\n2. 图片格式的取值为:jpeg,jpg, png, webp。\n示例值:3704211***509819"
},
"text": {
"type": "string",
"description": "输入图片的描述信息,用于帮助模型理解图片。仅GEM 2.5、GEM 3.0 有效。\n示例值:任务背景:这是需要翻新的主建筑(图1),不得改变其几何结构。"
},
"url": {
"type": "string",
"description": "可访问的文件 URL。当 Type 取值为 Url 时,本参数有效。\n说明:\n1. 推荐使用小于7M的图片;\n2. 图片格式的取值为:jpeg,jpg, png, webp。\n示例值:https://test.com/1.png"
}
},
"x-apifox-orders": [
"type",
"file_id",
"url",
"text"
]
}
},
"model_name": {
"type": "string",
"description": "模型名称。取值:\nGEM:Gemini;\nQwen:千问。\nHunyuan:混元。\n\n示例值:GEM"
},
"model_version": {
"type": "string",
"description": "模型版本。取值:\n当 ModelName 是 GEM,可选值为 2.5、3.0;\n当 ModelName 是 Qwen,可选值为 0925;\n当 ModelName 是 Hunyuan,可选值为 3.0;\n\n示例值:2.5"
}
},
"required": [
"model_name",
"prompt",
"model_version"
],
"x-apifox-orders": [
"model_name",
"model_version",
"prompt",
"file_infos",
"negative_prompt",
"enhance_prompt",
"output_config",
"session_id",
"session_context",
"tasks_priority",
"ext_info"
]
},
"examples": [
{
"mediaType": "application/json",
"value": "{\r\n \"model_name\": \"GEM\",\r\n \"model_version\": \"3.0\",\r\n \"file_infos\": [\r\n {\r\n \"type\": \"file\",\r\n \"file_id\": \"387702299774574677\",\r\n \"url\": \"\",\r\n \"text\": \"原始图片的描述信息\"\r\n }\r\n ],\r\n \"prompt\": \"convert this image to anime style\",\r\n \"negative_prompt\": \"blur, distorted\",\r\n \"enhance_prompt\": \"Enabled\",\r\n \"output_config\": {\r\n \"storage_mode\": \"Temporary\",\r\n \"resolution\": \"1080P\",\r\n \"aspect_ratio\": \"1:1\",\r\n \"person_generation\": \"AllowAdult\",\r\n \"input_compliance_check\": \"Enabled\",\r\n \"output_compliance_check\": \"Enabled\"\r\n },\r\n \"session_id\": \"image-task-67890\",\r\n \"session_context\": \"{\\\"user_id\\\": \\\"123\\\", \\\"scene\\\": \\\"profile_picture\\\"}\",\r\n \"tasks_priority\": 10,\r\n \"ext_info\": \"\"\r\n}"
}
],
"mediaType": "",
"oasExtensions": "",
"required": false,
"additionalContentTypes": []
},
"parameters": {
"path": [],
"query": [],
"cookie": [],
"header": [
{
"id": "Jsj23RwEo1",
"name": "Authorization",
"required": false,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "Bearer {{YOUR_API_KEY}}"
},
{
"id": "jjYSOg2NrR",
"name": "Content-Type",
"required": false,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "application/json"
}
]
},
"commonParameters": {
"query": [],
"body": [],
"cookie": [],
"header": []
},
"auth": {
"type": "inherit",
"inherit": {}
},
"responses": [
{
"id": 191850594,
"name": "成功",
"code": 200,
"contentType": "json",
"jsonSchema": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"request_id": {
"type": "string"
},
"response_url": {
"type": "string"
},
"status_url": {
"type": "string"
},
"cancel_url": {
"type": "string"
},
"logs": {
"type": "null"
},
"metrics": {
"type": "object",
"properties": {},
"x-apifox-orders": []
},
"queue_position": {
"type": "integer"
}
},
"required": [
"status",
"request_id",
"response_url",
"status_url",
"cancel_url",
"logs",
"metrics",
"queue_position"
],
"x-apifox-orders": [
"status",
"request_id",
"response_url",
"status_url",
"cancel_url",
"logs",
"metrics",
"queue_position"
]
},
"itemSchema": {},
"description": "",
"mediaType": "",
"headers": [],
"oasExtensions": ""
}
],
"responseExamples": [
{
"name": "成功示例",
"responseId": 191850594,
"data": "{\r\n \"Response\": {\r\n \"TaskId\": \"251007502-AigcImage***2782aff1e896673f1ft\",\r\n \"RequestId\": \"f50d7667-72d8-46bb-a7e3-0613588971b6\"\r\n }\r\n}",
"description": "",
"oasKey": "",
"oasExtensions": "",
"id": "019fc09b-0b1a-7586-8865-7d909e82ad59"
}
],
"codeSamples": [],
"projectId": 8662722,
"moduleId": 8310462,
"folderId": 92436114,
"ordering": 6,
"responsibleId": 0,
"commonResponseStatus": {},
"advancedSettings": {
"disabledSystemHeaders": {}
},
"customApiFields": {},
"oasExtensions": "",
"mockScript": {},
"createdAt": "2026-08-02T03:53:34.000Z",
"updatedAt": "2026-08-06T12:15:55.000Z",
"creatorId": 2863449,
"editorId": 2863449,
"creatorUserId": 2863449,
"editorUserId": 2863449,
"responseChildren": [],
"visibility": "INHERITED",
"securityScheme": {},
"callbacks": ""
}