Model Information
| Model ID | bytedance/seedance-2.0 |
| Category | Video |
| Endpoint | /api/v1/videos |
Create Task
POST https://shark.ai/api/v1/videosAuthentication: Authorization: Bearer <api-key>
Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | ✓ | Model ID: bytedance/seedance-2.0 | |
| seed | number | -1 | Random seed (-1 for random) | |
| prompt | string | ✓ | Describe the scene, action, camera movement, and mood | |
| duration | number (4..15) | 5 | Video duration in seconds (4-15s) | |
| resolution | enum: 480p | 720p | 1080p | "720p" | Output video resolution | |
| aspect_ratio | enum: 16:9 | 9:16 | 4:3 | 3:4 | 1:1 | 21:9 | "16:9" | Video aspect ratio (text-to-video only) | |
| frame_images | array<object> | First/last frame images for image-to-video (omit for text-to-video) | ||
| input_references | array<object> | Reference images for style/content guidance (text-to-video only) | ||
| reference_audios | array<object> | Reference audio for audio-driven generation (text-to-video only) | ||
| reference_videos | array<object> | Reference videos for motion/style guidance (text-to-video only) |
Code Examples
# Step 1: Create task
curl -X POST https://shark.ai/api/v1/videos \
-H "Authorization: Bearer <api-key>" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2.0",
"seed": -1,
"prompt": "Your prompt here",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}'
# Step 2: Poll for result
curl https://shark.ai/api/v1/videos/{task-id} \
-H "Authorization: Bearer <api-key>"Response
Create Response (202)
{
"id": "task-uuid",
"status": "pending",
"polling_url": "/api/v1/videos/task-uuid"
}Poll: GET https://shark.ai/api/v1/videos/:id — Completed
{
"id": "task-uuid",
"status": "completed",
"output": {
"urls": [
"https://cdn.example.com/video.mp4"
]
},
"credit": 4000
}Poll every 3-5 seconds. Status values: pending → in_progress → completed | failed
Error Codes
| HTTP | Type | Description |
|---|---|---|
| 400 | invalid_request_error | Invalid parameters |
| 400 | content_moderation | Content blocked by safety system |
| 400 | input_too_large | Input exceeds model limit |
| 401 | auth_error | Invalid API key |
| 402 | insufficient_credits | Not enough credits |
| 429 | rate_limit_error | Too many requests |
| 502 | provider_error | Upstream error, retry later |
| 504 | timeout_error | Request timed out |