Seedance 2.0
Seedance 2.0
เอกสารเริ่มต้นใช้งาน
ภาพรวม APIข้อความเป็นวิดีโอภาพเป็นวิดีโอ
เอกสารอ้างอิง API

ภาพเป็นวิดีโอ

สร้างวิดีโอจากภาพและสื่ออ้างอิงด้วย Seedance 2.0 Open API

ในโหมดนี้ คุณจะส่ง URL ของสื่อสาธารณะอย่างน้อยหนึ่งรายการผ่าน mediaUrls

Endpoint

POST /api/open/v1/video/generations

ประเภทสื่ออ้างอิงที่รองรับ

TypeCommon formatsTypical usage
ภาพ.jpg, .jpeg, .png, .webp, .gif, .bmpเฟรมแรก เฟรมสุดท้าย และการอ้างอิงสไตล์
วิดีโอ.mp4, .mov, .m4vการอ้างอิงการเคลื่อนไหวและกล้อง
เสียง.mp3, .wavการอ้างอิงจังหวะหรือ timing

ตัวอย่างคำขอ

curl --request POST \
  --url https://www.seedance2.ink/api/open/v1/video/generations \
  --header 'Authorization: Bearer sd2_live_your_api_key' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "seedance-2.0",
    "prompt": "A young woman blows out birthday candles, warm indoor lighting, shallow depth of field",
    "mediaUrls": [
      "https://example.com/photo.jpg"
    ],
    "aspectRatio": "16:9",
    "duration": 5,
    "resolution": "720p"
  }'

ตัวอย่างการตอบกลับสำเร็จ

{
  "success": true,
  "requestId": "req_1234567890",
  "status": "queued",
  "creditsCharged": 64
}

ฟิลด์คำขอ

FieldTypeRequiredDescription
modelstringYesเลือกได้จาก seedance-2.0, seedance-2.0-fast, seedance-1.5-pro
promptstringYesพรอมต์ภาษาธรรมชาติที่อธิบายวิดีโอเป้าหมาย
mediaUrlsstring[]YesURL สื่ออ้างอิงสาธารณะจำนวนหนึ่งถึงห้ารายการ
aspectRatiostringNoเลือกได้จาก 16:9, 9:16, 1:1
durationintegerNoseedance-2.0 และ seedance-2.0-fast รองรับ 4-15 วินาที ส่วน seedance-1.5-pro รองรับ 5 หรือ 10 วินาที
resolutionstringNoเลือกได้จาก 480p, 720p, 1080p
webhookUrlstringNoCallback URL สำหรับรับผลลัพธ์สุดท้าย
metadataobjectNoMetadata แบบกำหนดเองที่บันทึกไปพร้อมกับคำขอ

ตรวจสอบผลลัพธ์

curl https://www.seedance2.ink/api/open/v1/video/generations/req_1234567890 \
  --header 'Authorization: Bearer sd2_live_your_api_key'
{
  "success": true,
  "requestId": "req_1234567890",
  "status": "succeeded",
  "model": "seedance-2.0",
  "prompt": "A river flowing through an autumn forest, aerial view, cinematic motion",
  "duration": 5,
  "aspectRatio": "16:9",
  "output": {
    "type": "video",
    "url": "https://pub-your-bucket.r2.dev/open-api-results/req_1234567890.mp4"
  },
  "error": null
}

ยกเลิกงาน

curl --request POST \
  --url https://www.seedance2.ink/api/open/v1/video/generations/req_1234567890/cancel \
  --header 'Authorization: Bearer sd2_live_your_api_key'
{
  "success": true,
  "requestId": "req_1234567890",
  "status": "cancelled"
}

หมายเหตุ

  • mediaUrls รองรับได้สูงสุด 5 รายการ
  • โปรดใช้ URL แบบ HTTPS ที่เข้าถึงได้สาธารณะ
  • หากไม่ต้องใช้สื่ออ้างอิง ให้ใช้ ข้อความเป็นวิดีโอ

ข้อความเป็นวิดีโอ

สร้างวิดีโอจากพรอมต์ข้อความด้วย Seedance 2.0 Open API

Start

ต่อไป

สารบัญ

Endpointประเภทสื่ออ้างอิงที่รองรับตัวอย่างคำขอตัวอย่างการตอบกลับสำเร็จฟิลด์คำขอตรวจสอบผลลัพธ์ยกเลิกงานหมายเหตุ