curl --request POST \
--url 'https://api.elkapi.com/v1/video/generations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-2-0-260128",
"prompt": "一人称視点のフルーツティー広告。手でリンゴを摘み、切りたてをシェイクし、完成品をクローズアップ。映画的、高精細",
"metadata": {
"duration": 8,
"ratio": "16:9",
"resolution": "720p",
"generate_audio": true,
"watermark": false
}
}'
import requests
url = "https://api.elkapi.com/v1/video/generations"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
payload = {
"model": "doubao-seedance-2-0-260128",
"prompt": "一人称視点のフルーツティー広告。手でリンゴを摘み、切りたてをシェイクし、完成品をクローズアップ。映画的、高精細",
"metadata": {
"duration": 8,
"ratio": "16:9",
"resolution": "720p",
"generate_audio": True,
"watermark": False
}
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
const response = await fetch("https://api.elkapi.com/v1/video/generations", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "doubao-seedance-2-0-260128",
prompt: "一人称視点のフルーツティー広告。手でリンゴを摘み、切りたてをシェイクし、完成品をクローズアップ。映画的、高精細",
metadata: {
duration: 8,
ratio: "16:9",
resolution: "720p",
generate_audio: true,
watermark: false
}
})
});
console.log(await response.json());
{
"id": "task_abc123",
"task_id": "task_abc123",
"object": "video",
"model": "doubao-seedance-2-0-260128",
"status": "queued",
"progress": 0,
"created_at": 1760000000
}
{
"error": {
"message": "prompt is required",
"type": "invalid_request_error",
"param": "prompt",
"code": "invalid_request"
}
}
Seedance 形式
Seedance動画を作成
- ElkAPI 経由で Doubao Seedance 2.0 の動画生成を呼び出します。
- 非同期タスクエンドポイントです。送信後にタスクIDを返します。
- Seedance公式パラメーターは metadata に入れて透過転送してください。
POST
/
v1
/
video
/
generations
curl --request POST \
--url 'https://api.elkapi.com/v1/video/generations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-2-0-260128",
"prompt": "一人称視点のフルーツティー広告。手でリンゴを摘み、切りたてをシェイクし、完成品をクローズアップ。映画的、高精細",
"metadata": {
"duration": 8,
"ratio": "16:9",
"resolution": "720p",
"generate_audio": true,
"watermark": false
}
}'
import requests
url = "https://api.elkapi.com/v1/video/generations"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
payload = {
"model": "doubao-seedance-2-0-260128",
"prompt": "一人称視点のフルーツティー広告。手でリンゴを摘み、切りたてをシェイクし、完成品をクローズアップ。映画的、高精細",
"metadata": {
"duration": 8,
"ratio": "16:9",
"resolution": "720p",
"generate_audio": True,
"watermark": False
}
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
const response = await fetch("https://api.elkapi.com/v1/video/generations", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "doubao-seedance-2-0-260128",
prompt: "一人称視点のフルーツティー広告。手でリンゴを摘み、切りたてをシェイクし、完成品をクローズアップ。映画的、高精細",
metadata: {
duration: 8,
ratio: "16:9",
resolution: "720p",
generate_audio: true,
watermark: false
}
})
});
console.log(await response.json());
{
"id": "task_abc123",
"task_id": "task_abc123",
"object": "video",
"model": "doubao-seedance-2-0-260128",
"status": "queued",
"progress": 0,
"created_at": 1760000000
}
{
"error": {
"message": "prompt is required",
"type": "invalid_request_error",
"param": "prompt",
"code": "invalid_request"
}
}
curl --request POST \
--url 'https://api.elkapi.com/v1/video/generations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-2-0-260128",
"prompt": "一人称視点のフルーツティー広告。手でリンゴを摘み、切りたてをシェイクし、完成品をクローズアップ。映画的、高精細",
"metadata": {
"duration": 8,
"ratio": "16:9",
"resolution": "720p",
"generate_audio": true,
"watermark": false
}
}'
import requests
url = "https://api.elkapi.com/v1/video/generations"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
payload = {
"model": "doubao-seedance-2-0-260128",
"prompt": "一人称視点のフルーツティー広告。手でリンゴを摘み、切りたてをシェイクし、完成品をクローズアップ。映画的、高精細",
"metadata": {
"duration": 8,
"ratio": "16:9",
"resolution": "720p",
"generate_audio": True,
"watermark": False
}
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
const response = await fetch("https://api.elkapi.com/v1/video/generations", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "doubao-seedance-2-0-260128",
prompt: "一人称視点のフルーツティー広告。手でリンゴを摘み、切りたてをシェイクし、完成品をクローズアップ。映画的、高精細",
metadata: {
duration: 8,
ratio: "16:9",
resolution: "720p",
generate_audio: true,
watermark: false
}
})
});
console.log(await response.json());
{
"id": "task_abc123",
"task_id": "task_abc123",
"object": "video",
"model": "doubao-seedance-2-0-260128",
"status": "queued",
"progress": 0,
"created_at": 1760000000
}
{
"error": {
"message": "prompt is required",
"type": "invalid_request_error",
"param": "prompt",
"code": "invalid_request"
}
}
Authorizations
string
必須
すべてのエンドポイントで Bearer Token 認証が必要です。
Authorization: Bearer YOUR_API_KEY
Body
string
デフォルト:"doubao-seedance-2-0-260128"
必須
SeedanceモデルID。利用可能な値:
doubao-seedance-2-0-260128、doubao-seedance-2-0-fast-260128string
必須
テキストプロンプト。現在のアダプターはこのフィールドを最終的な
content テキスト項目として上流へ送信します。array<string>
画像URLまたはBase64文字列の配列です。
role を指定する必要がある場合は、metadata.content の使用を推奨します。string
動画の長さ(秒)。指定すると
metadata.duration を上書きします。object
Seedance上流へ透過転送するパラメーターオブジェクトです。Seedance公式フィールドはここに入れてください。
integer
動画の長さ。Seedance 2.0 では通常
4〜15 秒です。上流が対応していれば -1 も渡せます。string
動画のアスペクト比。例:
16:9、4:3、1:1、3:4、9:16、21:9、adaptivestring
解像度。例:
480p、720p、1080pboolean
音声を生成するかどうか。
boolean
ウォーターマークを追加するかどうか。
integer
ランダムシード。
array<object>
マルチモーダル参照コンテンツです。
image_url、video_url、audio_url に対応します。テキスト内容にはトップレベルの prompt を使用してください。[
{
"type": "image_url",
"image_url": {
"url": "https://example.com/reference.png"
},
"role": "reference_image"
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/reference.mp4"
},
"role": "reference_video"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/reference.mp3"
},
"role": "reference_audio"
}
]
マルチモーダル例
curl --request POST \
--url 'https://api.elkapi.com/v1/video/generations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-2-0-260128",
"prompt": "参照動画の一人称構図を全編で使用し、参照音声をBGMとして使って、フルーツティー広告を生成する",
"metadata": {
"duration": 11,
"ratio": "16:9",
"generate_audio": true,
"watermark": false,
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://example.com/first-frame.jpg"
},
"role": "reference_image"
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/reference.mp4"
},
"role": "reference_video"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/music.mp3"
},
"role": "reference_audio"
}
]
}
}'
Response
string
ElkAPIが返す公開タスクID。
string
互換フィールドです。値は
id と同じです。string
オブジェクトタイプ。
video 固定です。string
リクエストで使用したモデル。
string
タスク状態。送信成功後は通常
queued です。integer
タスク作成タイムスタンプ。
⌘I