إنشاء فيديو Seedance
أنشئ مهمة فيديو Seedance على CometAPI. استخدم مطالبات نصية أو وسائط مرجعية أو أصل شخصية Seedance 2.5 مع مدة وحجم إخراج WxH.
curl https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
-F 'prompt="A matte magenta cube rotates slowly above a cyan studio floor while a small yellow sphere circles it."' \
-F 'model="seedance-2-5"' \
-F 'seconds="4"' \
-F 'size="1280x720"'{
"id": "task_abc123",
"task_id": "task_abc123",
"object": "video",
"model": "doubao-seedance-2-0-mini",
"status": "queued",
"progress": 0,
"created_at": 1776681149
}size على قيمة WxH من جدول الأحجام الخاص بطرازك.doubao-seedance-2-0-mini كما هو تمامًا لـ Seedance 2.0 Mini.
القيمة المختصرة seedance-mini ليست معرّف طراز صالحًا.معرّفات الطرازات المدعومة
اختر طرازًا لوضع الإدخال والدقة لديك، ثم أرسل معرّفه الدقيق في الحقلmodel.
| الطراز | معرّف الطراز الدقيق | الأوضاع ومستويات الدقة | مدعوم seconds |
|---|---|---|---|
| Seedance 2.5 | seedance-2-5 | تحويل النص إلى فيديو، وسائط مرجعية؛ 480p, 720p | 4-30 |
| Seedance 2.0 | doubao-seedance-2-0 | تحويل النص إلى فيديو، وسائط مرجعية؛ 480p, 720p, 1080p, 4K | 4-15 |
| Seedance 2.0 Fast | doubao-seedance-2-0-fast | تحويل النص إلى فيديو، وسائط مرجعية؛ 480p, 720p | 4-15 |
| Seedance 2.0 Mini | doubao-seedance-2-0-mini | تحويل النص إلى فيديو، وسائط مرجعية؛ 480p, 720p | 4-15 |
| Seedance 1.5 Pro | doubao-seedance-1-5-pro | تحويل النص إلى فيديو، تحويل الصورة إلى فيديو؛ 480p, 720p, 1080p | 4-12 |
| Seedance 1.0 Pro | doubao-seedance-1-0-pro | تحويل النص إلى فيديو، تحويل الصورة إلى فيديو؛ 480p, 720p, 1080p | 2-10 |
استخدام الصور المرجعية
أرسلPOST /v1/videos بالقيمة multipart/form-data، مع الصور المرجعية في input_reference.
للصور المرجعية القياسية المتعددة، كرر الحقل وفق ترتيب الصور، مع URL واحد لصورة HTTPS متاح للعامة أو ملف صورة مرفوع واحد لكل حقل.
بالنسبة إلى الصور المرجعية القياسية، استخدم عناوين URL فقط أو ملفات فقط ضمن هذا الحقل. أرسل كل URL بشكل منفصل بدلًا من ضم عناوين URL بفواصل.
اجعل حجم كل صورة مرفوعة عند 20 MiB أو أقل (20 × 1024 × 1024 بايت).
يستخدم Seedance 1.0 Pro وSeedance 1.5 Pro صورة مرجعية واحدة. يقبل Seedance 2.0 وFast وMini ما يصل إلى 9 صور مرجعية.
يقبل Seedance 2.5 ما يصل إلى 30 صورة مرجعية. تنطبق هذه الأعداد على كلٍّ من عناوين URL والملفات المرفوعة.
في Prompt، عيّن لكل صورة دورًا، مثل الموضوع أو الإعداد أو النمط المرئي.
صِف المظهر المراد الحفاظ عليه، والحركة، وحركة الكاميرا.
توضح عينات الطلبات في أعلى هذه الصفحة مدخلات URL للصور وعمليات رفع صورة واحدة أو صور متعددة.
إرسال عناوين URL للصور المرجعية
استخدم عنوانَي URL لصورتين لتوجيه مظهر الموضوع والإعداد:curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=doubao-seedance-2-0' \
--form-string 'prompt=Use the subject in @Image1 and the setting in @Image2. Use a slow camera push-in and natural motion.' \
--form-string 'seconds=5' \
--form-string 'size=1280x720' \
--form-string 'input_reference=https://your-image-host/subject.png' \
--form-string 'input_reference=https://your-image-host/setting.png'
استخدام أصل شخصية
أنشئ أصل الشخصية ونشّطه قبل استخدامه في طلب Seedance 2.5. ابدأ بـ إنشاء مجموعة أصول شخصية، ثم حمّل صورة من خلال تحميل أصل شخصية. احفظ معرّف الأصل الذي تم إرجاعه وانتظر حتى تصبح حالتهactive.
استخدم معرّف الأصل بصيغة المرجع asset://. يجب وضع مرجع الأصل في input_reference، ولا يكشف عنوان URL لصورة المصدر لطلب الفيديو.
curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=seedance-2-5' \
--form-string 'prompt=Animate the character in the referenced asset with a slow camera push-in and natural motion.' \
--form-string 'seconds=5' \
--form-string 'size=1280x720' \
--form-string 'input_reference=asset://<ASSET_ID>'
Authorization. يستخدم طلب الفيديو مفتاح CometAPI API مع مخطط Bearer. إذا كان الأصل لا يزال processing أو failed أو غير متاح، فانتظر حالة الأصل أو عالج الأصل قبل إرسال مهمة الفيديو.
استخدم الفيديو والصوت المرجعيين
تقبل Seedance 2.0 وFast وMini و2.5 المعلمتينreference_videos وreference_audios.
استخدم ملفات MP4 لمراجع الفيديو وملفات MP3 لمراجع الصوت. أرسل كلاً منها كرابط HTTPS متاح للعامة أو كملف مرفوع.
أقرن الصوت المرجعي بصورة أو فيديو واحد على الأقل.
في Prompt، استخدم @Image1 و@Video1 و@Audio1 لتعيين أدوار لمراجعك.
رقّم المراجع بحسب ترتيبها ضمن كل نوع من الوسائط.
يمكنك دمج عناوين URL والملفات المرفوعة عبر حقول مختلفة.
ضمن كل من input_reference وreference_videos وreference_audios، استخدم إما عناوين URL فقط أو ملفات فقط.
بالنسبة إلى المدخلات المتعددة، كرر الحقل مرة لكل إدخال بدلاً من ضم عناوين URL بفواصل.
| عائلة النموذج | الصور المرجعية | مقاطع الفيديو المرجعية | الصوت المرجعي | إجمالي المدخلات المرجعية |
|---|---|---|---|---|
| Seedance 2.0 وFast وMini | حتى 9 عناوين URL أو ملفات في input_reference | حتى 3 | حتى 3 | حتى 12 |
| Seedance 2.5 | حتى 30 عنوان URL أو ملفاً في input_reference | حتى 10 عناوين URL أو 5 ملفات | حتى 10 عناوين URL أو 5 ملفات | حتى 50 |
doubao-seedance-2-0) حدوداً إضافية للوسائط لكل من عناوين URL والملفات المرفوعة.
بالنسبة إلى مقاطع الفيديو المرجعية، اجعل المدة المجمّعة بين ثانيتين و15 ثانية، والحجم الإجمالي أقل من 50 MB.
استخدم دقة للفيديو المرجعي تتراوح تقريباً من 480p (640x640) إلى 720p (834x1112).
بالنسبة إلى الصوت المرجعي، اجعل المدة المجمّعة 15 ثانية أو أقل، وحجم كل ملف 15 MB أو أقل.
يجب أن تستوفي الوسائط المرفوعة أيضاً حدود الرفع لكل ملف المذكورة أعلاه.
أرسل رابط فيديو مرجعي
استخدم الفيديو المرجعي لتوجيه حركة الكاميرا والحركة:curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=doubao-seedance-2-0' \
--form-string 'prompt=Follow the camera movement and action in @Video1. Preserve the direction and pace of the motion.' \
--form-string 'seconds=5' \
--form-string 'size=1280x720' \
--form-string 'reference_videos=https://your-media-host/reference.mp4'
أقرن رابط صورة بصوت
حرّك الموضوع المرجعي وفق إيقاع الصوت المرجعي:curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=doubao-seedance-2-0' \
--form-string 'prompt=Animate the subject in @Image1 to the rhythm of @Audio1. Preserve the subject appearance and use a fixed camera.' \
--form-string 'seconds=5' \
--form-string 'size=1280x720' \
--form-string 'input_reference=https://your-image-host/subject.png' \
--form-string 'reference_audios=https://your-media-host/reference.mp3'
ارفع وسائط مرجعية باستخدام Seedance 2.5
ارفع صورتين وفيديو MP4 وملفاً صوتياً MP3 في طلب واحد:curl \
https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
--form-string 'model=seedance-2-5' \
--form-string 'prompt=Use the subject in @Image1 and the setting in @Image2. Follow the motion in @Video1 and the rhythm of @Audio1.' \
--form-string 'seconds=5' \
--form-string 'size=1280x720' \
--form 'input_reference=@/path/to/subject.png;type=image/png' \
--form 'input_reference=@/path/to/setting.png;type=image/png' \
--form 'reference_videos=@/path/to/reference.mp4;type=video/mp4' \
--form 'reference_audios=@/path/to/reference.mp3;type=audio/mpeg'
المدة حسب النموذج
اضبطseconds على قيمة بصيغة عدد صحيح ضمن نطاق نموذجك. وإذا حذفتها، يطلب CometAPI مقطعًا مدته 5 ثوانٍ.
| فئة النموذج | المدعوم seconds | الافتراضي | سلوك الحدود |
|---|---|---|---|
| Seedance 2.5 | 4-30 | 5 | استخدم ثوانٍ صحيحة ضمن النطاق. |
| Seedance 2.0 وSeedance 2.0 Fast وSeedance 2.0 Mini | 4-15 | 5 | استخدم ثوانٍ صحيحة ضمن النطاق. |
| Seedance 1.5 Pro | 4-12 | 5 | استخدم ثوانٍ صحيحة ضمن النطاق. |
| Seedance 1.0 Pro | 2-10 | 5 | استخدم ثوانٍ صحيحة ضمن النطاق. |
دعم المقاسات حسب النموذج
Seedance 2.5
بالنسبة إلى Seedance 2.5، تنطبق قيمWxH هذه على كلٍ من المطالبات النصية والوسائط المرجعية.
| فئة الدقة | 16:9 | 4:3 | 1:1 | 3:4 | 9:16 | 21:9 |
|---|---|---|---|---|---|---|
480p | 854x480 | 752x560 | 640x640 | 560x752 | 480x854 | 992x432 |
720p | 1280x720 | 1112x834 | 960x960 | 834x1112 | 720x1280 | 1470x630 |
نماذج Seedance الأقدم
يجمع العمود الأخير قيمWxH الدقيقة لـ Seedance 1.5 Pro وSeedance 2.0 القياسي وFast.
يستخدم Seedance 2.0 Fast قيمتي 480p و720p فقط في ذلك العمود.
تنطبق قيم 1080p في ذلك العمود على Seedance 1.5 Pro وSeedance 2.0 القياسي.
تنطبق قيم 4K على Seedance 2.0 القياسي فقط. في عمود Mini، تعني — أن الدقة غير مدعومة.
| فئة الدقة | نسبة العرض إلى الارتفاع | Seedance 2.0 Mini | سلسلة Seedance 1.0 | Seedance 1.5 Pro / Seedance 2.0 القياسي / Fast |
|---|---|---|---|---|
480p | 16:9 | 864x496 | 864x480 | 864x496 |
4:3 | 752x560 | 736x544 | 752x560 | |
1:1 | 640x640 | 640x640 | 640x640 | |
3:4 | 560x752 | 544x736 | 560x752 | |
9:16 | 496x864 | 480x864 | 496x864 | |
21:9 | 992x432 | 960x416 | 992x432 | |
720p | 16:9 | 1280x720 | 1248x704 | 1280x720 |
4:3 | 1112x834 | 1120x832 | 1112x834 | |
1:1 | 960x960 | 960x960 | 960x960 | |
3:4 | 834x1112 | 832x1120 | 834x1112 | |
9:16 | 720x1280 | 704x1248 | 720x1280 | |
21:9 | 1470x630 | 1504x640 | 1470x630 | |
1080p | 16:9 | — | 1920x1088 | 1920x1080 |
4:3 | — | 1664x1248 | 1664x1248 | |
1:1 | — | 1440x1440 | 1440x1440 | |
3:4 | — | 1248x1664 | 1248x1664 | |
9:16 | — | 1088x1920 | 1080x1920 | |
21:9 | — | 2176x928 | 2206x946 | |
4K | 16:9 | — | — | 3840x2160 (Seedance 2.0 فقط) |
4:3 | — | — | 3326x2494 (Seedance 2.0 فقط) | |
1:1 | — | — | 2880x2880 (Seedance 2.0 فقط) | |
3:4 | — | — | 2494x3326 (Seedance 2.0 فقط) | |
9:16 | — | — | 2160x3840 (Seedance 2.0 فقط) | |
21:9 | — | — | 4398x1886 (Seedance 2.0 فقط) |
480p و720p. اضبط size على قيمة WxH من عمود Mini.الجسم
Text prompt that describes the video. Required. When using reference images, describe what each image should control, such as the subject from @Image1, the secondary object from @Image2, and the background or style from @Image3. Also state the action, camera motion, visual style, and scene.
"A slow cinematic camera push across a coastal landscape at sunrise."
Seedance model ID. Use one of the exact values below. Aliases such as seedance-mini are not accepted.
seedance-2-5, doubao-seedance-2-0, doubao-seedance-2-0-fast, doubao-seedance-2-0-mini, doubao-seedance-1-5-pro, doubao-seedance-1-0-pro "doubao-seedance-2-0-mini"
Output size as an exact WxH value. For Seedance 2.5 text-to-video and image-to-video, use 854x480, 752x560, 640x640, 560x752, 480x854, or 992x432 for 480p; use 1280x720, 1112x834, 960x960, 834x1112, 720x1280, or 1470x630 for 720p. For Seedance 2.0 Mini, use 864x496, 752x560, 640x640, 560x752, 496x864, or 992x432 for 480p; use the same documented 720p values. The standard Seedance 2.0 model also accepts its documented 4K values.
^[1-9]\d{2,3}x[1-9]\d{2,3}$"854x480"
"480x854"
"864x496"
"752x560"
"640x640"
"560x752"
"496x864"
"992x432"
"1280x720"
"1112x834"
"960x960"
"834x1112"
"720x1280"
"1470x630"
"1920x1080"
"1080x1920"
"3840x2160"
"3326x2494"
"2880x2880"
"2494x3326"
"2160x3840"
"4398x1886"
Reference images or a CometAPI character asset. Repeat input_reference with one publicly accessible HTTPS image URL, one uploaded image file, or one asset:// reference per field. Use only URLs, asset references, or files within a request. Keep each uploaded image at or below 20 MiB. Seedance 2.0, Fast, and Mini allow up to nine image URLs or files and 12 reference inputs in total. Seedance 2.5 allows up to 30 image URLs or files and 50 reference inputs in total. For Seedance 1.0 Pro and 1.5 Pro, send one URL or one file. Submit images in the order you want to reference them in the prompt.
^https://Reference video inputs for Seedance 2.0, Fast, Mini, and 2.5. Repeat reference_videos with a publicly accessible HTTPS MP4 URL or an uploaded MP4 file. Use only URLs or only files within this field. Each file can be up to 50 MiB. Seedance 2.0, Fast, and Mini allow up to three video inputs and 12 reference inputs in total. Seedance 2.5 allows up to ten video URLs or five uploaded video files, with 50 reference inputs in total. For standard Seedance 2.0 (doubao-seedance-2-0), URL and uploaded references must have a combined video duration of 2 to 15 seconds and a total video size under 50 MB. Each reference video must have a resolution of approximately 480p (640x640) to 720p (834x1112). These media limits apply in addition to the 50 MiB per-file upload limit.
1 - 10 elements^https://"https://your-media-host/reference.mp4"
Reference audio inputs for Seedance 2.0, Fast, Mini, and 2.5. Repeat reference_audios with a publicly accessible HTTPS MP3 URL or an uploaded MP3 file. Use only URLs or only files within this field. Each file can be up to 15 MiB. Seedance 2.0, Fast, and Mini allow up to three audio inputs and 12 reference inputs in total. Seedance 2.5 allows up to ten audio URLs or five uploaded audio files, with 50 reference inputs in total. Pair audio with at least one reference image or video. For standard Seedance 2.0 (doubao-seedance-2-0), URL and uploaded audio references must have a combined duration at or below 15 seconds, with each audio file at or below 15 MB. These media limits apply in addition to the 15 MiB per-file upload limit.
1 - 10 elements^https://"https://your-media-host/reference.mp3"
الاستجابة
Task created. Save the returned id and poll GET /v1/videos/{id}.
curl https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
-F 'prompt="A matte magenta cube rotates slowly above a cyan studio floor while a small yellow sphere circles it."' \
-F 'model="seedance-2-5"' \
-F 'seconds="4"' \
-F 'size="1280x720"'{
"id": "task_abc123",
"task_id": "task_abc123",
"object": "video",
"model": "doubao-seedance-2-0-mini",
"status": "queued",
"progress": 0,
"created_at": 1776681149
}