Video generation
Submit video-generation tasks, retrieve status, and read generated output.
Overview
AGTCloud provides multiple video-generation models and protocols. A video request usually creates a task first, then uses the task identifier to retrieve status and output.
Supported tasks
| Task | Description | Main input |
|---|---|---|
| Text to video | Generate a video from a text description | Prompt |
| Image to video | Add motion to a still image | Prompt, image |
| Reference-based generation | Generate content from images or video supported by the model | Prompt, reference media |
| Model-specific extensions | Use start/end frames, camera controls, or other model features | Depends on the model and protocol |
API access
Base URL
https://api.agtcloud.cn/v1Text to video
curl 'https://api.agtcloud.cn/v1/video/generations' \
-H 'Authorization: Bearer your-api-key' \
-H 'Content-Type: application/json' \
--data '{
"model": "MODEL_ID",
"prompt": "A train crosses a valley after the rain as the camera slowly moves forward"
}'Image to video
curl 'https://api.agtcloud.cn/v1/video/generations' \
-H 'Authorization: Bearer your-api-key' \
-H 'Content-Type: application/json' \
--data '{
"model": "MODEL_ID",
"prompt": "Preserve the subject and have the person walk slowly toward the camera",
"image": "https://example.com/input.jpg"
}'After creating a task, save its Task ID and retrieve it through the same protocol.
Retrieve a task
curl 'https://api.agtcloud.cn/v1/video/generations/TASK_ID' \
-H 'Authorization: Bearer your-api-key'See Create a video task and Retrieve a video task for the create and retrieve fields.
Choose a protocol
| Protocol | Create endpoint | Follow-up |
|---|---|---|
| Platform Video Generations | POST /v1/video/generations | Retrieve output with the Task ID |
| OpenAI Videos | POST /v1/videos | Retrieve and download with the Video ID |
| Vendor-specific protocol | See the corresponding Reference | Use the task identifier and status defined by that protocol |
Use the create, retrieve, and download endpoints from the same protocol for a given task.