Skip to main content
POST
テキスト、参照画像、または開始フレームから HappyHorse 動画を作成します。API はタスク ID をすぐに返します。返された id を保存してタスクをポーリングし、完了した動画をダウンロードします。 POST /v1/videos では multipart/form-data を使用します。コントロールはフォームフィールドとして送信し、参照画像は input_reference フィールドとして送信します。各フィールドには HTTPS URL またはアップロードした画像ファイルを 1 つ指定します。

入力モードを選択する

参照画像は、動画内の被写体や視覚的な詳細の指針となります。公開アクセス可能な HTTPS 画像 URL を 1~9 個、または画像ファイルを 1~9 個送信し、画像の順序で画像ごとに input_reference を 1 回ずつ指定します。 このフィールド内では URL のみ、またはファイルのみを使用してください。URL はカンマで結合せず、それぞれ個別に送信してください。 input_reference では、各参照画像は 10 MB 以下であり、happyhorse-1.0 を満たす必要があります。 happyhorse-1.1 では、各参照画像は 20 MB 以下である必要があります。 これらのモデル制限は、画像 URL とアップロードしたファイルの両方に適用されます。 最短辺が 400 px 以上の JPEG、JPG、PNG、または WEBP 画像を使用してください。 input_reference のアップロード上限は、ファイルごとに 20 MiB(20 × 1024 × 1024 バイト)です。アップロードする画像は、上記のモデル固有の制限も満たす必要があります。 このページ上部のリクエスト例では、HappyHorse 1.1 では複数の画像 URL を、両方のモデルでは複数のファイルアップロードを示しています。 開始フレームを設定するには、公開アクセス可能な HTTPS 画像 URL または画像ファイルを 1 つ指定して first_frame を 1 回送信します。このフィールドは input_reference とは別のリクエストで使用してください。

長さとサイズを設定する

以下の表から、WxH の値を size 用に正確に選択してください。 最初のフレームを指定するリクエストでは、画像によってフレーミングとアスペクト比が決まり、size で出力解像度の階層を選択します。

タスクフロー

1

タスクを作成する

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

タスクをポーリングする

次の HappyHorse 動画取得 API を、statuscompletedfailed、または error になるまで呼び出します。
3

結果をダウンロードする

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

承認

Authorization
string
header
必須

Bearer authentication. Use your CometAPI API key.

ボディ

multipart/form-data
model
enum<string>
必須

HappyHorse model ID for this endpoint.

利用可能なオプション:
happyhorse-1.0,
happyhorse-1.1
:

"happyhorse-1.1"

prompt
string
必須

Text prompt that describes the video to generate. For image inputs, describe the motion and visual details to preserve.

:

"Use the uploaded reference image as the visual guide. Create a short cinematic shot with gentle natural motion."

seconds
integer
デフォルト:5

Requested clip duration in whole seconds. Send an integer from 3 through 15 as a form field. The default is 5.

必須範囲: 3 <= x <= 15
:

3

size
string

Output size as an exact WxH value. Use one of the documented size values for the selected HappyHorse model. For first-frame requests, size selects the resolution tier; the image determines the framing and aspect ratio.

:

"1920x1080"

input_reference

Reference images for reference-to-video. Send 1–9 publicly accessible HTTPS image URLs or 1–9 uploaded image files by repeating input_reference once per image. Use only URLs or only files within this field; do not join URLs with commas. Reference images guide subjects and visual details. CometAPI preserves image order. Use JPEG, JPG, PNG, or WEBP images with a shortest side of at least 400 px. Each reference image must be at or below 10 MB for happyhorse-1.0 or 20 MB for happyhorse-1.1. These model limits apply to both image URLs and uploaded files. The input_reference file upload limit is 20 MiB (20 x 1024 x 1024 bytes) per file. Keep uploads within the model limit as well. Keep this field separate from first_frame.

Pattern: ^https://
first_frame

Opening-frame image as one publicly accessible HTTPS URL or one image file. Send this field once, using either a URL or a file. Use JPEG, JPG, PNG, or WEBP images up to 20 MB. Do not combine first_frame with input_reference.

Pattern: ^https://

レスポンス

Task created. 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.

:

"happyhorse-1.1"

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.

最終更新日 2026年9月9日