Skip to main content
POST
テキスト、参照画像、または最初と最後のフレームからFlux 3動画を作成します。返されたidを保存してタスクをポーリングし、完成した動画をダウンロードします。 POST /v1/videos multipart/form-dataを使用します。コントロールはフォームフィールドとして送信します。画像入力には、参照画像URLまたは開始フレームと終了フレームを使用します。 input_referenceは、first_frameおよびlast_frameとは分けて管理してください。

入力モードを選択する

参照画像を使用する

input_referenceフィールドで受け付けるのは、公開アクセス可能なHTTPS画像URLのみです。画像が1枚の場合は1回送信し、複数画像の場合はキーフレーム順に繰り返し送信します。各フィールドにはURLを1件ずつ指定でき、合計で最大10件のURLを指定できます。 生成する動画で参照画像から維持すべき動き、カメラの挙動、視覚的な詳細を記述します。 このページ上部のリクエストサンプルでは、単一画像および複数画像の入力を示しています。次のリクエストでは、送信した順序で2枚の画像を使用します。

最初と最後のフレームを設定する

開始画像を設定するにはfirst_frameを送信します。終了画像も設定するには、last_frameを含め、2つのフレーム間の動きをpromptで記述します。 開始フレームのみの場合は、last_frameを省略します。終了フレームには、first_framelast_frameの両方が必要です。 各フィールドには、公開アクセス可能なHTTPS URLを1件、またはPNGもしくはJPEGファイルを1件指定できます。各フィールドはURLまたはファイルのいずれかを使用して1回だけ送信します。各ファイルは20 MiB以下(20 × 1024 × 1024バイト). このページ上部のフレームの例では、URL入力とファイルアップロードを示し、secondssizeを明示的に設定しています。

長さとサイズを設定する

secondsを、5から20までの整数として明示的に設定します。 sizeを、以下のいずれかの正確なWxHプリセット値に設定します。 サイズ値によって出力解像度階層を選択します。テキストから動画への変換では、コーデックのアラインメントに合わせてエンコード時の寸法が調整される場合があります。画像から動画への変換では、参照画像によって最終的なフレーミングとアスペクト比も決まる場合があります。

タスクフロー

1

タスクを作成する

multipartフォームリクエストを送信し、返されたidを保存します。
2

タスクをポーリングする

次を呼び出します。 Flux 3動画を取得する statuscompletedまたはfailedになるまで繰り返します。
3

結果をダウンロードする

タスクがcompletedになったら、次を呼び出します。 Flux 3動画コンテンツをダウンロードする MP4ファイルを保存します。

承認

Authorization
string
header
必須

Bearer authentication. Use your CometAPI API key.

ボディ

multipart/form-data

Flux 3 multipart request. Choose text, input_reference URLs, or first_frame and last_frame inputs. Keep reference-image and frame inputs separate.

model
string
デフォルト:flux-3
必須

Model ID for this route. Use flux-3.

Allowed value: "flux-3"
prompt
string
デフォルト:A paper boat glides across a still pond while the camera moves forward.
必須

Text that describes the scene, motion, camera behavior, and visual details that the video should preserve.

Minimum string length: 1
seconds
integer

Requested clip duration in whole seconds. Set seconds explicitly to an integer from 5 through 20.

必須範囲: 5 <= x <= 20
size
enum<string>
デフォルト:1280x720

Resolution preset in exact WxH form. Use 1280x720 for the 720p tier or 1920x1080 for the 1080p tier. Encoded dimensions can be codec-aligned; image-to-video framing can follow the reference image.

利用可能なオプション:
1280x720,
1920x1080
input_reference

Reference image URLs. Send one publicly accessible HTTPS image URL per input_reference field. For multiple images, repeat the field in keyframe order, up to 10 URLs. This field accepts URLs only. Keep it separate from first_frame and last_frame.

Pattern: ^https://
first_frame

Opening-frame image as one publicly accessible HTTPS URL or one PNG or JPEG file. Keep each file at or below 20 MiB (20 × 1024 × 1024 bytes). Send the field once, using either a URL or a file. Pair with last_frame to set both boundaries. Keep frame inputs separate from input_reference.

Pattern: ^https://
last_frame

Closing-frame image as one publicly accessible HTTPS URL or one PNG or JPEG file. Keep each file at or below 20 MiB (20 × 1024 × 1024 bytes). Send the field once, using either a URL or a file. To specify the closing image through this endpoint, send last_frame together with first_frame. Keep frame inputs separate from input_reference.

Pattern: ^https://

レスポンス

Task created. Store the returned id and poll GET /v1/videos/{task_id}.

id
string
必須

Task ID. Use this value as task_id in retrieve and content requests.

:

"<task_id>"

object
string
必須

Object type for the asynchronous video task.

Allowed value: "video"
model
string
必須

Model ID that the task uses.

Allowed value: "flux-3"
status
enum<string>
必須

Task lifecycle status. Poll until the value is completed or failed.

利用可能なオプション:
queued,
in_progress,
completed,
failed
progress
integer
必須

Task progress as a coarse percentage.

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

Task creation time as a Unix timestamp in seconds.

task_id
string

Compatibility alias for id. This field can be omitted from retrieve responses.

:

"<task_id>"

completed_at
integer<int64>

Task completion time as a Unix timestamp in seconds when the task provides one.

expires_at
integer<int64>

Result expiration time as a Unix timestamp in seconds when the task provides one.

video_url
string<uri>

Video delivery URL. This field appears on completed tasks.

:

"https://media.example.com/flux-3-result.mp4"

error
object

Failure details. This field appears when the task fails.

最終更新日 2026年9月9日