AIビデオを作成
テキストからビデオまたは画像からビデオへのプロンプトでAIビデオ生成ジョブを開始します。
ペイロードパラメータ
- model: 必須。APIリファレンスからサポートされているモデル文字列を使用して、必要なモデルバリアントをターゲットします。
- prompt: 必須。作成したいシーンの自然言語による説明。
- imageData: 任意(推奨)。画像から動画モード用のBase64データURL。プレフィックス "data:image/*;base64," 付き。
- url: Optional. Legacy reference image URL; still supported but lower priority than imageData.
- aspectRatio: 任意。サポート値: "9:16"(デフォルト)または "16:9"。
- duration: Optional. Only for "sora-2-stable"; choose 10 or 15 seconds (default 10).
- isPublic: 任意。動画を公開表示するかどうか。デフォルトは true。
- remixTargetId: 任意(VIP専用)。続編/リミックス機能用のターゲット動画 pid。
- characters: 任意(VIP専用)。キャラクター制御配列。各項目には url と timestamps が含まれます。
補足
- レスポンスは taskId と共に即時返却。status が succeeded か failed になるまで check-result をポーリング。
リクエスト例
curl -X POST https://freesoragenerator.com/api/v1/video/sora-video \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2-stable",
"prompt": "A cinematic shot of a futuristic city at sunset, captured in 4K.",
"imageData": "data:image/png;base64,iVBORw0KGgoAAA...",
"aspectRatio": "9:16",
"duration": 15,
"isPublic": true
}'レスポンス例
{
"code": 0,
"message": "ok",
"data": {
"id": "task_1234567890"
}
}