seedance2.0-fast
seedance2.0-fast
VideoByteDanceSeedance 2.0-fastseedance2.0-fast
字节跳动最新一代视频模型
Autentikasi
- Base URL
https://api.dreamtoai.com- Authorization
Authorization: Bearer YOUR_API_KEY- Content-Type
application/json- Nama model (model)
seedance2.0-fast
Protokol integrasi
Mengapa memilih protokol ini
适合需要提交任务并轮询状态的图像、视频、音频生成工作流。
URL endpoint
POST/v1/jobs
Authorization: Bearer YOUR_API_KEYContent-Type: application/jsonJSON permintaan dan respons
Permintaan
{
"model": "seedance2.0-fast",
"input": {
"prompt": "电影感街头运镜,一辆跑车穿过雨夜霓虹街道",
"first_frame_url": "https://example.com/first.png",
"last_frame_url": "https://example.com/last.png",
"reference_image_urls": [
"https://example.com/ref.png"
],
"reference_video_urls": [
"https://example.com/ref.mp4"
],
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9",
"seed": 12345,
"callback_url": "https://example.com/webhook",
"channel": "byte2.0"
}
}Respons
{
"id": "job_example",
"object": "job",
"status": "processing",
"model": "seedance2.0-fast",
"created": 1710000000,
"request_id": "req_example"
}Field permintaan dan respons
Field permintaan
| Field | Tipe | Wajib |
|---|---|---|
| prompt | string | Y |
| first_frame_url | image | N |
| last_frame_url | image | N |
| reference_image_urls | array | N |
| reference_video_urls | array | N |
| resolution | enum | N |
| duration | number | N |
| aspect_ratio | enum | N |
| seed | integer | N |
| callback_url | string | N |
| channel | string | N |
Field respons
| Field | Tipe | Wajib |
|---|---|---|
| output.task_id | string | N |
| output.status | string | N |
| output.videos[] | video | N |
Contoh kode
cURLrequest.sh
curl -X POST "https://api.dreamtoai.com/v1/jobs" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "seedance2.0-fast",
"input": {
"prompt": "电影感街头运镜,一辆跑车穿过雨夜霓虹街道",
"first_frame_url": "https://example.com/first.png",
"last_frame_url": "https://example.com/last.png",
"reference_image_urls": [
"https://example.com/ref.png"
],
"reference_video_urls": [
"https://example.com/ref.mp4"
],
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9",
"seed": 12345,
"callback_url": "https://example.com/webhook",
"channel": "byte2.0"
}
}'
# cURL untuk mengunggah file referensi
curl -X POST "https://api.dreamtoai.com/v1/files/upload" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "kind=video" \
-F "purpose=reference" \
-F "[email protected]"
# cURL untuk memeriksa status
# Ganti job_example dengan task_id yang dikembalikan respons submit.
curl -X GET "https://api.dreamtoai.com/v1/jobs/job_example" \
-H "Authorization: Bearer YOUR_API_KEY"