Skip to main content
POST
このベータエンドポイントを使用して、テキストから動画または動画から動画のタスクを作成します。API はタスク ID を直ちに返すため、返された id を保存し、ターミナルステータスに達するまでタスクをポーリングしてください。 入力モードに一致するリクエストのコンテンツタイプを選択します。テキストから動画の制御は multipart/form-data フィールドとして送信します。参照動画の編集は application/json ボディとして送信します。

入力モードを選択する

テキストから動画の例では model=omni-fast を使用します。動画から動画の例では model=omni-fast-v2v を使用します。モデル ID が API キーで表示されることを確認するには、 利用可能なモデルを一覧表示する を使用してください。

参照動画を編集する

動画から動画の場合は、ローカルの MP4 ファイルを base64 としてエンコードし、エンコードしたバイト列の先頭に data:video/mp4;base64, を付加します。完全なデータ URL を video フィールドで送信します。 要求する変更を prompt で記述します。また、結果で保持すべき被写体、オブジェクト、構図、または動きも指定します。コードサンプルのセレクタには、作業ディレクトリから reference.mp4 を読み込む Shell、Python、JavaScript の例が含まれます。 このリクエスト形式は、インライン MP4 データ URL を対象としています。URL 入力、他の動画コンテナ形式、またはファイルサイズ制限は定義していません。

再生時間、アスペクト比、解像度を設定する

Omni は、入力と選択したルートによって生成の安定性が異なる可能性があるため、ベータ版としてマークされています。最初のリクエストは小さく抑え、特定のレンダリング済み再生時間やフレームサイズに依存する前に、完了した動画を確認してください。 このエンドポイントはベータ版であるため、aspect_ratioresolution は生成設定として扱い、最終的なピクセルに依存する前にダウンロードした MP4 を確認してください。

タスクフロー

1

タスクを作成する

選択した入力モードのコンテンツタイプでリクエストを送信し、返された id を保存します。
2

タスクをポーリングする

次の操作を呼び出します: Omni 動画を取得する を、statuscompleted または failed になるまで繰り返し呼び出します。
3

結果をダウンロードする

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

承認

Authorization
string
header
必須

Bearer authentication. Use your CometAPI API key.

ボディ

model
string
必須

Omni model ID for this endpoint. Use omni-fast for text-to-video.

:

"omni-fast"

prompt
string
必須

Text prompt that describes the video to generate.

:

"Ocean waves rolling onto a sandy beach at golden hour"

seconds
string

Requested clip duration in seconds. The completed video can use a different duration.

:

"4"

aspect_ratio
enum<string>
デフォルト:16:9

Output aspect ratio preference. 16:9 and 9:16 are the most predictable; 1:1 can be accepted but may render as landscape.

利用可能なオプション:
16:9,
9:16,
1:1
:

"16:9"

resolution
string

Output resolution preference. Start with 720p. A request for 1080p can render at 720p.

:

"720p"

レスポンス

200 - application/json

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

id
string
必須

Task ID. Use this value with retrieve and content endpoints.

:

"task_example"

object
string
必須

Object type. Video tasks return video.

:

"video"

model
string
必須

Model ID used for the task.

:

"omni-fast"

status
enum<string>
必須

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

利用可能なオプション:
queued,
in_progress,
completed,
failed,
error
:

"queued"

progress
integer
必須

Task progress as a coarse percentage.

必須範囲: 0 <= x <= 100
:

0

created_at
integer
必須

Task creation time as a Unix timestamp in seconds.

:

1779938152

task_id
string

Compatibility alias for id when present.

:

"task_example"

completed_at
integer

Task completion time as a Unix timestamp in seconds. This field appears on completed tasks.

:

1779938219

video_url
string

Temporary video delivery URL. This field appears on completed tasks.

:

"<temporary-video-url>"

error
object

Failure details. This field appears when the task fails.