APIMaster.ai

Seedance プロンプト最適化 API

アイデアを Seedance 2.5 用のプロンプトに変換します。

Seedance プロンプト最適化 API

APIMaster 独自のテキスト最適化サービスです。動画タスクは作成しません。火山引擎の公開ガイドを参考に実装しており、Seedance 公式 API ではなく、公式 Skill も再配布しません。

POST https://apimaster.ai/v1/video/prompt-optimize

APIMaster API Key で認証します。model は課金対象のテキストモデルで、利用可能な経路と Key の権限が必要です。動画モデルは target_model で指定し、現在は seedance-2.5 のみ対応します。例のテキストモデルが利用できない場合は変更してください。

クイックスタート

curl --fail-with-body -sS "https://apimaster.ai/v1/video/prompt-optimize" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gemini-3.1-flash-lite",
  "target_model": "seedance-2.5",
  "prompt": "A cat watches raindrops on a window, then turns toward the camera.",
  "language": "ja",
  "task": "generate",
  "duration": 5
}'

パラメータ

JSON
model 必須。最適化に使う有料テキストモデル ID。
prompt 必須。1–12000 文字。参照ラベルと台詞を保持してください。
target_model 省略可。既定値かつ唯一の対応値は seedance-2.5。
language 省略可。出力言語(ja、en など)。省略時は入力言語。最大 64 バイト。
task 省略可。generate(既定)、edit、extend。
duration 省略可。整数 4–30 または -1。編集時は省略または -1。構成の参考のみで、生成パラメータを設定しません。
references 省略可。最大 50 件。固有の label(1–64 文字)と description(1–2000 文字)。メディアは取得・解析しません。

応答

標準 Chat Completions JSON を返します。結果は choices[0].message.content、使用量は usage にあります。動画タスク ID は返しません。finish_reason が stop 以外、特に length の場合は完全性を確認してください。

{
  "object": "chat.completion",
  "model": "gemini-3.1-flash-lite",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "A cat sits beside a rain-covered window, watching the drops slide down the glass. It slowly turns its head toward the camera."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 600,
    "completion_tokens": 50,
    "total_tokens": 650
  }
}

参照素材の説明

{
  "model": "gemini-3.1-flash-lite",
  "prompt": "Use @Image1 for the person and @Video1 for the camera movement.",
  "language": "ja",
  "references": [
    {
      "label": "@Image1",
      "description": "Person appearance only; ignore the background."
    },
    {
      "label": "@Video1",
      "description": "Slow camera push-in only; ignore the people."
    }
  ]
}

エラーと料金

400 JSON・型・フィールド・値の不正、401 無効な Key、403 権限不足、413 64 KiB 超過、415 JSON 以外、429 レート制限。上流エラーはテキスト中継の形式と状態を維持します。

テキストモデルとグループのトークン料金、残高確認、ログ、失敗時の精算を使用します。システム指示と参照説明も入力トークンに含まれます。動画料金は発生せず、後続の動画生成は別料金です。

確認して動画を生成

結果全体を動画生成の prompt に渡します。メディア、長さ、比率は別途指定し、ラベルと素材の順序・用途を一致させてください。素材は未確認のため、人物の一貫性、正確な字幕、フレーム単位の時刻は保証できません。

Seedance 2.5

制限

非ストリーミングのテキストのみ。stream、messages、webhook、メディア URL を含む未知の最上位フィールドは拒否します。秘密鍵を入力しないでください。