Skip to content

Video Generation

非同期ジョブとして動画を生成します。LTX 2.3 と BytePlus ModelArk のモデル別制約は送信前に検証されます。

POST /v1/video/generations は直ちに job_id を返します。完了まで GET /v1/jobs/{job_id} をポーリングしてください。すべてのリクエストには plm_ API キーが必要です。

POST/v1/video/generations

ジョブを送信#

パラメータ必須説明
modelstring任意動画モデル ID。デフォルトは veo-3
promptstring必須動画の説明。最大 4,000 文字。
duration_secondsinteger任意要求秒数。2–20 秒、デフォルト 8。Kling は 5 または 10 のみ対応なので明示してください。LTX・ModelArk モデルにはさらに狭いモデル別範囲があります。
resolution480p | 720p | 1080p | 1440p | 4k任意出力解像度。デフォルトは 720p
generate_audioboolean任意音声を生成するか。予期しない audio variant 課金を避けるためデフォルトは false です。
imagestring | null任意images の先頭画像 URL の互換エイリアスで、順序を維持して結合されます。
imagesstring[]任意入力画像 URL。image エイリアスと合わせて最大 9、HTTP(S) のみ。
videosstring[]任意入力動画参照 URL。最大 3、HTTP(S) のみ。
audiosstring[]任意入力音声参照 URL。最大 3、HTTP(S) のみ。
charge_amount_krwinteger | null任意固定 KRW 精算額。通常 API キーは使用できず、first-party 委任キーのみ利用できます。
request
curl https://apirouter.pleum.ai/v1/video/generations \
  -H "Authorization: Bearer $PLEUM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: seedance-shot-001" \
  -d '{
    "model": "dreamina-seedance-2-0-260128",
    "prompt": "A drone shot flying over a misty mountain valley at sunrise",
    "duration_seconds": 8,
    "resolution": "720p",
    "generate_audio": false,
    "images": ["https://example.com/first-frame.png"],
    "videos": ["https://example.com/motion-reference.mp4"]
  }'
submit + poll (Python)
import time, requests

BASE = "https://apirouter.pleum.ai/v1"
HEADERS = {"Authorization": "Bearer plm_...", "Content-Type": "application/json"}

# 1. Submit the job  returns job_id immediately.
resp = requests.post(f"{BASE}/video/generations", headers=HEADERS, json={
    "model": "dreamina-seedance-2-0-260128",
    "prompt": "A drone shot flying over a misty mountain valley at sunrise",
    "duration_seconds": 8,
    "resolution": "720p",
})
job_id = resp.json()["job_id"]

# 2. Poll until the job finishes.
while True:
    job = requests.get(f"{BASE}/jobs/{job_id}", headers=HEADERS).json()
    if job["status"] in ("succeeded", "failed"):
        break
    time.sleep(5)

print(job["result_url"] if job["status"] == "succeeded" else job["error"])
submit + poll (TypeScript)
const BASE = "https://apirouter.pleum.ai/v1";
const HEADERS = { Authorization: "Bearer plm_...", "Content-Type": "application/json" };

// 1. Submit the job — returns job_id immediately.
const submit = await fetch(`${BASE}/video/generations`, {
  method: "POST",
  headers: HEADERS,
  body: JSON.stringify({
    model: "dreamina-seedance-2-0-260128",
    prompt: "A drone shot flying over a misty mountain valley at sunrise",
    duration_seconds: 8,
    resolution: "720p",
  }),
});
const { job_id } = await submit.json();

// 2. Poll until the job finishes.
let job: any;
do {
  await new Promise((r) => setTimeout(r, 5000));
  job = await (await fetch(`${BASE}/jobs/${job_id}`, { headers: HEADERS })).json();
} while (job.status !== "succeeded" && job.status !== "failed");

console.log(job.status === "succeeded" ? job.result_url : job.error);
202 Accepted
{
  "job_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "status": "processing",
  "model": "dreamina-seedance-2-0-260128",
  "result_url": null,
  "cost": null,
  "error": null,
  "assets": []
}

プロバイダー別の動画入力制約#

選択した LTX または ModelArk モデルの時間・解像度・参照の組み合わせは hold 作成前に検証されます。未対応の組み合わせは課金なしで 400 を返します。

パラメータ必須説明
Klingduration任意5 秒または 10 秒のみ対応です。duration_seconds を 5 または 10 で明示してください。未指定だと 400 が返る場合があります。モデル: kling-v2-master、kling-v2-1、kling-v1-6、kling-v1-5、kling-v1-0。
LTX 2.3 Fast / Produration + resolution任意テキスト→動画のみ。Fast は 1080p で 6/8/10/12/14/16/18/20 秒、1440p/4k で 6/8/10 秒をサポートします。Pro は全解像度で 6/8/10 秒のみです。480p/720p の要求は LTX の 1080p 出力に正規化されます。
Seedance 2.0duration + references任意4–15 秒。image≤9、video≤3、audio≤3。音声参照には画像または動画参照が最低 1 つ必要です。画像 1/2 枚は first/last frame、動画・音声または画像 3 枚以上と併用するとすべて reference_image になります。
Seedance 2.0 Fast / Miniresolution任意480p または 720p のみ。Mini は動画/音声参照をサポートしません。
Seedance 1.5 Produration + references任意4–12 秒、4k 非対応。画像参照は最大 2、動画/音声参照は非対応です。
Seedance 1.0 Produration + references任意2–12 秒、4k 非対応。画像は最大 2(Fast は 1)、動画/音声参照と generate_audio は非対応です。

ジョブをポーリング#

GET/v1/jobs/{job_id}

POST は最初に status: processing を返します。GET /v1/jobs/{job_id} は同じジョブ形式を返し、完了ジョブには assets に動画結果が含まれる場合があります。

statusprocessingsucceededfailedcanceled のいずれかです。成功時は result_url/cost、失敗・キャンセル時は error が入ります。期限切れの upstream task は failed に正規化されます。

succeeded
{
  "job_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "status": "succeeded",
  "model": "dreamina-seedance-2-0-260128",
  "result_url": "https://cdn.pleum.ai/video/f47ac10b-58cc-4372-a567-0e02b2c3d479.mp4",
  "cost": {"krw": 4200},
  "error": null,
  "assets": [{"type": "video", "url": "https://cdn.pleum.ai/video/f47ac10b-58cc-4372-a567-0e02b2c3d479.mp4"}]
}

精算と BYOK#

LTX 動画は選択した解像度の秒単価と要求時間で hold・精算されます。ModelArk 動画は完了タスクが報告する completion-token/出力使用量で最終精算されます。Idempotency-Key は任意(最大 128 文字)で、同じ本文を 24 時間再生します。

動画や 3D などの非同期生成は BYOK をサポートしません。BYOK キーのリクエストは 400 を返します。存在しない、または所有していない job_id も 404 です。