AIGC 生图
接口: POST https://4zapi.com/tencent-vod/v1/aigc-image
腾讯云点播图像生成。
官方文档:https://cloud.tencent.com/document/product/266/126240
请求体 (application/json)
model_name(string, 必填): 模型名称。取值: GEM:Gemini; Qwen:千问。 Hunyuan:混元。 示例值:GEMmodel_version(string, 必填): 模型版本。取值: 当 ModelName 是 GEM,可选值为 2.5、3.0; 当 ModelName 是 Qwen,可选值为 0925; 当 ModelName 是 Hunyuan,可选值为 3.0; 示例值:2.5prompt(string, 必填): 提示词enhance_prompt(string): 是否自动优化提示词。开启时将自动优化传入的 Prompt,以提升生成质量。取值有: Enabled:开启; Disabled:关闭;ext_info(string): 保留字段,特殊用途时使用。 示例值:myextinfofile_infos(array<object>): 文件信息列表negative_prompt(string): 要阻止模型生成图片的提示词。output_config(object): 生图任务的输出媒体文件配置。session_context(string): 来源上下文,用于透传用户请求信息,音画质重生完成回调将返回该字段值,最长 1000 个字符。 示例值:mySessionContextsession_id(string): 用于去重的识别码,如果三天内曾有过相同的识别码的请求,则本次的请求会返回错误。最长 50 个字符,不带或者带空字符串表示不做去重。 示例值:mysessiontasks_priority(integer): 任务的优先级,数值越大优先级越高,取值范围是 -10 到 10,不填代表 0。 示例值:10
请求示例
{
"enhance_prompt": "Enabled",
"ext_info": "",
"file_infos": [
{
"file_id": "387702299774574677",
"text": "原始图片的描述信息",
"type": "file",
"url": ""
}
],
"model_name": "GEM",
"model_version": "3.0",
"negative_prompt": "blur, distorted",
"output_config": {
"aspect_ratio": "1:1",
"input_compliance_check": "Enabled",
"output_compliance_check": "Enabled",
"person_generation": "AllowAdult",
"resolution": "1080P",
"storage_mode": "Temporary"
},
"prompt": "convert this image to anime style",
"session_context": "{\"user_id\": \"123\", \"scene\": \"profile_picture\"}",
"session_id": "image-task-67890",
"tasks_priority": 10
}