Docs Tencent AIGC /tencent-vod/v1/aigc-image
API reference

AIGC raw chart

Tencent Cloud on-demand image generation. Official document: https://cloud.tencent.com/document/product/266/126240

POST/tencent-vod/v1/aigc-image

Body Parametersapplication/json

enhance_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: myextinfo

file_infos array

List of file info

items
object object
model_name* string

Model name. Value: GEM: Gemini; Qwen: Qianwen. Hunyuan: Hunyuan. Example value: GEM

model_version* string

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.5

negative_prompt string

Prompt word to prevent the model from generating images.

output_config object

Output media file configuration of the image generation task.

properties
aspect_ratio string

Specifies the aspect ratio of the generated image. When ModelName is GEM, the optional values are 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9 and 21:9; When the ModelName is Qwen or Jimeng, it is not supported for the time being. Jimeng will combine the Prompt intention and the reference image size, and the model will intelligently determine the aspect ratio of the output image. Example value: 16:9

input_compliance_check string

Whether to enable compliance checking of input content. The values are: Enabled: turned on; Disabled: closed; Example value: Enabled

output_compliance_check string

Whether to enable compliance checking of output content. The values are: Enabled: turned on; Disabled: closed; Example value: Enabled

person_generation string

Whether to allow character or face generation. The values are: AllowAdult: Allows adults to be generated; Disallowed: It is prohibited to include people or faces in images; Example value: AllowAdult

resolution string

The resolution of the generated image. Optional values are 720P, 1080P, 2K, 4K, 1024x1024, 2048x2048, 2304x1728, 2496x1664, 2560x1440 , 3024x1296, 4096x4096, 4694x3520, 4992x3328, 5404x3040, 6198x2656, where the model is used When Jimeng, it is recommended to specify the image resolution and aspect ratio through Prompt. Example value: 1024x1024

storage_mode string

Storage mode. The values are: Permanent: Permanent storage, the generated image files will be stored in the cloud on demand, and the FileId can be obtained in the event notification; Temporary: Temporary storage. The generated image files will not be stored in the cloud on demand. The URL for temporary access can be obtained in the event notification; Default value: Temporary

prompt* string

prompt word

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: mySessionContext

session_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: mysession

tasks_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

Responses

200 application/json
response-200 object

On successful submission, returns `Response.TaskId`, used for the subsequent `GET /tencent-vod/v1/query/{task_id}` query.

properties
Response* object

Tencent Cloud-style response body

400 Bad request or validation failed application/json
response-400 object
properties
error* object
401 Missing or invalid API Key application/json
response-401 object
Request Body Example
1{
2"enhance_prompt": "Enabled",
3"ext_info": "",
4"file_infos": [
5{
6"file_id": "387702299774574677",
7"text": "原始图片的描述信息",
8"type": "file",
9"url": ""
10}
11],
12"model_name": "GEM",
13"model_version": "3.0",
14"negative_prompt": "blur, distorted",
15"output_config": {
16"aspect_ratio": "1:1",
17"input_compliance_check": "Enabled",
18"output_compliance_check": "Enabled",
19"person_generation": "AllowAdult",
20"resolution": "1080P",
21"storage_mode": "Temporary"
22},
23"prompt": "convert this image to anime style",
24"session_context": "{\"user_id\": \"123\", \"scene\": \"profile_picture\"}",
25"session_id": "image-task-67890",
26"tasks_priority": 10
27}
Code Sample cURL
1curl -X POST "https://api.digislash.com/tencent-vod/v1/aigc-image" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"enhance_prompt": "Enabled",
6"ext_info": "",
7"file_infos": [
8{
9"file_id": "387702299774574677",
10"text": "原始图片的描述信息",
11"type": "file",
12"url": ""
13}
14],
15"model_name": "GEM",
16"model_version": "3.0",
17"negative_prompt": "blur, distorted",
18"output_config": {
19"aspect_ratio": "1:1",
20"input_compliance_check": "Enabled",
21"output_compliance_check": "Enabled",
22"person_generation": "AllowAdult",
23"resolution": "1080P",
24"storage_mode": "Temporary"
25},
26"prompt": "convert this image to anime style",
27"session_context": "{\"user_id\": \"123\", \"scene\": \"profile_picture\"}",
28"session_id": "image-task-67890",
29"tasks_priority": 10
30}'
Response
1▼{
2▼"Response": {
3"RequestId": "f50d7667-72d8-46bb-a7e3-0613588971b6",
4"TaskId": "251007502-AigcImage***2782aff1e896673f1ft"
5}
6}