AIGC raw chart
Endpoint: POST https://4zapi.com/tencent-vod/v1/aigc-image
Tencent Cloud on-demand image generation.
Official document: https://cloud.tencent.com/document/product/266/126240
Request body (application/json)
model_name(string, required): Model name. Value: GEM: Gemini; Qwen: Qianwen. Hunyuan: Hunyuan. Example value: GEMmodel_version(string, required): model version. Value: When ModelName is GEM, the optional values are 2.5 and 3.0; When ModelName is Qwen, the optional value is 0925; When ModelName is Hunyuan, the optional value is 3.0; Example value: 2.5prompt(string, required): prompt wordenhance_prompt(string): Whether to automatically optimize prompt words. When turned on, incoming prompts will be automatically optimized to improve build quality. The values are: Enabled: turned on; Disabled: closed;ext_info(string): Reserved fields, used for special purposes. Example value: myextinfofile_infos(array<object>): List of file infonegative_prompt(string): Prompt word to prevent the model from generating images.output_config(object): Output media file configuration of the image generation task.session_context(string): Source context, used to transparently transmit user request information. The audio and video quality regeneration completion callback will return the value of this field, with a maximum length of 1000 characters. Example value: mySessionContextsession_id(string): The identification code used for deduplication. If there is a request for the same identification code within three days, this request will return an error. The maximum length is 50 characters, without or with an empty string to indicate no deduplication. Example value: mysessiontasks_priority(integer): The priority of the task. The larger the value, the higher the priority. The value range is -10 to 10. If left blank, it means 0. Example value: 10
Request example
{
"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
}