Tongyi - Text to Video
Generate videos from text descriptions using Alibaba Cloud AI's Tongyi model. Features frame-based video generation with customizable frame count, FPS, and inference steps for precise control over video output.
Endpoint
Request Headers
Field | Value |
---|---|
API-KEY | <api-key> |
Content-Type | application/json |
Request Parameters
Field Name | Type | Example | Description | Required |
---|---|---|---|---|
type | string | TEXT_TO_VIDEO | Feature identifier | ✔️ |
model | string | cjwbw/damo-text-to-video:1e205ea73084bd17a0a3b43396e49ba0d6bc2e754e9283b2df49fad2dcf95755 | AI model to use | ✔️ |
conversationId | string | TEXT_TO_VIDEO | Conversation context | ✔️ |
promptObject.prompt | string | serene waterfall in forest | Text description of the video | ✔️ |
promptObject.num_frames | number | 50 | Number of frames (1-100) | ✔️ |
promptObject.fps | number | 8 | Frames per second (1-10) | ✔️ |
Advanced Parameters
Field Name | Type | Example | Description | Required |
---|---|---|---|---|
promptObject.num_inference_steps | number | 50 | Inference steps (1-500) | ❌ |
promptObject.seed | number | 0 | Random seed (0-2147483647) | ❌ |
Code Examples
- cURL
- JavaScript
- Python
curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "TEXT_TO_VIDEO",
"model": "cjwbw/damo-text-to-video:1e205ea73084bd17a0a3b43396e49ba0d6bc2e754e9283b2df49fad2dcf95755",
"conversationId": "TEXT_TO_VIDEO",
"promptObject": {
"prompt": "serene waterfall cascading through a misty forest",
"num_frames": 50,
"fps": 8,
"num_inference_steps": 50
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'TEXT_TO_VIDEO',
model: 'cjwbw/damo-text-to-video:1e205ea73084bd17a0a3b43396e49ba0d6bc2e754e9283b2df49fad2dcf95755',
conversationId: 'TEXT_TO_VIDEO',
promptObject: {
prompt: 'serene waterfall cascading through a misty forest',
num_frames: 50,
fps: 8,
num_inference_steps: 50
}
})
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
data = {
"type": "TEXT_TO_VIDEO",
"model": "cjwbw/damo-text-to-video:1e205ea73084bd17a0a3b43396e49ba0d6bc2e754e9283b2df49fad2dcf95755",
"conversationId": "TEXT_TO_VIDEO",
"promptObject": {
"prompt": "serene waterfall cascading through a misty forest",
"num_frames": 50,
"fps": 8,
"num_inference_steps": 50
}
}
response = requests.post(url, headers=headers, json=data)
Interactive Playground
API Playground
https://api.1min.ai/api/features
Total frames in the video
Video playback speed
Number of denoising steps for quality
Random seed for reproducible results
Generated cURL Command:
curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "TEXT_TO_VIDEO",
"model": "cjwbw/damo-text-to-video:1e205ea73084bd17a0a3b43396e49ba0d6bc2e754e9283b2df49fad2dcf95755",
"conversationId": "TEXT_TO_VIDEO",
"promptObject": {
"prompt": "serene waterfall cascading through a misty forest",
"num_frames": 50,
"fps": 8,
"num_inference_steps": 50
}
}'
Response
{}