Skip to main content
POST
OpenAI video generations
このエンドポイントを使用して、非同期ビデオ生成タスクを作成します。
  • Authorization: Bearer {API_KEY}で認証する
  • 一般的なフローは、タスクの作成、/v1/videos/{video_id} のポーリング、その後 /v1/videos/{video_id}/content のダウンロードです。
  • 通常、最初の応答は最終アセットではなくタスク オブジェクトを返します。
  • ポーリングはサーバー側でより適切に処理されます

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

ボディ

multipart/form-data
model
string
必須

Video model name, for example sora-2.

:

"sora-2"

prompt
string
必須

Text prompt for the video.

:

"一只可爱的小猫在花园里玩耍"

size
enum<string>
デフォルト:720x1280

Video resolution.

利用可能なオプション:
720x1280,
1280x720
seconds
enum<string>

Video duration in seconds.

利用可能なオプション:
4,
8,
12
input_reference
file

Optional reference image file used as the first frame.

レスポンス

Successful video task creation response

id
string
必須

Video task ID.

:

"video_123456789"

object
enum<string>
必須

Object type.

利用可能なオプション:
video
status
enum<string>
必須

Current task status.

利用可能なオプション:
pending,
in_progress,
completed,
failed
created_at
integer<int64>

Creation timestamp.

completed_at
integer<int64>

Completion timestamp.

model
string

Model used for generation.

progress
integer

Task progress percentage.

必須範囲: 0 <= x <= 100
expires_at
integer<int64>

Expiration timestamp for the generated asset.

seconds
string

Video duration in seconds.

size
enum<string>

Video resolution.

利用可能なオプション:
720x1280,
1280x720
remixed_from_video_id
string

Source video ID when the task comes from remix.

error
object