Skip to main content
POST
/
api
/
v3
/
contents
/
generations
/
tasks

Authorization

  • Auth Type: Bearer Auth (In: header)
  • Format: Authorization: Bearer <YOUR_API_KEY>
  • Description: Use Bearer <YOUR_API_KEY>. Format: Authorization: Bearer sk-xxxxxx.
  • API Key: where API Key is your AGCloud API KEY
Task status will be: queued, pending(running), success(succeeded), failed, expired, cancelled

Parameters

Core Parameters

FieldTypeRequiredDescription
modelstringThe model ID to use for the request.
contentarrayContent of the current conversation with the model. For single-turn queries, this contains one instance. For multi-turn queries (e.g., chat), this contains the conversation history and the latest request.

Content Structure

FieldTypeRequiredDescription
>content.typeenumThe type of the content part. Possible values: text, image_url, video_url, audio_url.
>content.textstring-The text content of the part. Required when type is text.
>content.roleenum-Required when type is not text. Position or intent of an image, video, or audio part. Allowed values: first_frame, last_frame, reference_image, reference_video, reference_audio.
>content.image_urlobject-The image content of the part. Required when type is image_url.
>>content.image_url.urlstring-The URL of the image. Supports HTTP/HTTPS URLs or base64-encoded data URIs (e.g., data:image/jpeg;base64,...).
>content.video_urlobject-The video payload for the part. Required when type is video_url.
>>content.video_url.urlstring-The URL of the video. Supports HTTP/HTTPS URLs.

Multimodal Input

{
    "model": "kkcc",
    "content": [
         {
            "type": "text",
            "text": "生成视频描述,越详细生成效果越好..."
        },
        {
            "type": "image_url",
            "image_url": {
                "url": "<path-to-your-image-url>"
            },
            "role": "reference_image"
        },
        {
            "type": "image_url",
            "image_url": {
                "url": "<path-to-your-image-url>"
            },
            "role": "reference_image"
        },
        {
          "type": "video_url",
          "video_url": {
              "url": "<path-to-your-image-url>"
          },
          "role": "reference_video"
        },
        {
          "type": "audio_url",
          "audio_url": {
              "url": "<path-to-your-image-url>"
          },
          "role": "reference_audio"
        }
    ],
    "generate_audio":true,
    "ratio": "16:9",
    "duration": 11,
    "watermark": false
}

Advanced Parameters

FieldTypeRequiredDescription
callback_urlstring-Callback URL for generation task notifications. When the video task status changes, the API sends a POST request to this endpoint.
return_last_frameboolean-Whether to return the last frame of the generated video as an image. Default: false.
execution_expires_afterinteger-Task timeout in seconds after submission, counted from the task created at timestamp. Default: 172800 (48 hours). Allowed range: [3600, 259200].
generate_audioboolean-Whether the generated video includes audio synchronized with the visuals. Default: true.
ratioenum-Output aspect ratio. Default: adaptive. Allowed values: adaptive, 16:9, 4:3, 1:1, 3:3, 9:16, 21:9.
resolutionenum-Video resolution. Default: 720p. Allowed values: 480p, 720p, 1080p.
durationinteger-Video length in whole seconds: allowed range [4, 15], or -1 to let the model pick a suitable integer duration within valid bounds.
framesinteger-Use either duration or frames; if both are set, frames takes precedence. Prefer frames when you need sub‑second clip length control.
seedinteger-Random seed for reproducibility. Allowed range: [-1, 2^32 - 1].
watermarkboolean-Whether the output video includes a watermark. Default: false.
toolsarray-Tools the model may invoke for this request.
safety_identifierstring-Unique identifier for the end user (for safety and policy enforcement).