curl --request POST \
--url https://api.aiid.edu.kg/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"size": "1280x720",
"images": [
"https://example.png"
],
"model": "sora-2",
"prompt": "this is an example",
"duration": 12,
"fps": "24",
"seed": "20231024",
"mode": "i2v"
}
'{
"id": "video_abc123",
"object": "video",
"model": "sora-2",
"status": "queued",
"progress": 0,
"created_at": 1764347090922,
"seconds": "8"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}動画の生成
OpenAI Sora 互換形式の動画生成インターフェース。テキストから動画の生成と、画像/動画参照による生成モードに対応しています。
POST /v1/videos:動画タスクの作成GET /v1/videos/{video_id}:タスクステータスの照会GET /v1/videos/{video_id}/content:動画のバイナリコンテンツを取得
現在は外部に提供されていません:
GET /v1/videosPOST /v1/videos/{video_id}/remix
標準認証ヘッダー:
Content-Type: application/json
POST /v1/videosでタスクを作成し、idを取得GET /v1/videos/{id}をcompletedまたはfailedになるまでポーリング- 完了後は、レスポンス内の
video_urlを優先して使用 - 統一的にダウンロードする必要がある場合は、
GET /v1/videos/{id}/contentを呼び出す
主要パラメータ:
model: string:必須、外部向けモデル名prompt: string:推奨、動画生成の説明seconds: number|string:任意、目標の長さduration: number|string:任意、長さのエイリアスsize: string:任意、出力サイズmode: string:任意、一般的な値t2vi2vi2v_first_lastreference_material
よく使われる互換パラメータ:
aspect_ratioratioqualityresolutionfpsimageimage_urlimage_urlsimagesreference_imagesinput_referenceend_image_urllast_image_urlvideo_urlsaudio_urlsfunction_modecontentcallback_urlexternal_task_id
Kling のよく使う拡張パラメータ:
model_namenegative_promptcfg_scalesoundcamera_controlimage_listvideo_idtask_idwatermark_info
4.1 Veo シリーズ
説明:stable、official などは異なるグループを示しており、外部向けの model サフィックスではありません。呼び出し時は model をベースモデル名のままにしてください。実際にどのグループが使われるかは、アカウントまたはトークンのグループによって決まります。
Veo 3.x メインモデル
veo3veo3-fastveo3-fast-framesveo3-framesveo3-proveo3-pro-framesveo3.1veo3.1-fastveo3.1-proveo3.1-componentsveo3.1-4kveo3.1-pro-4k
推奨:
- テキストのみから動画を生成する場合は、
veo3*/veo3.1*メインモデルを優先して使用 - 画像からの動画生成や参照ベースの動画生成シーンでは、
mode + image_url/reference_imagesを明示的に渡すことを推奨
4.2 Sora シリーズ
基本モデル:
sora-2sora-2-pro
推奨:
sora-2*は汎用的な呼び出しに適していますstable/officialなどのグループを使用する場合は、modelをベースモデル名のままにし、モデル名の末尾にサフィックスを追加しないでください。
リクエスト例:
{
"size": "1280x720",
"images": [
"https://example.png"
],
"model": "sora-2",
"prompt": "this is an example",
"duration": 12,
"fps": "24",
"seed": "20231024",
"mode": "i2v"
}
4.3 HappyHorse シリーズ
公開モデル:
happyhorse-1.0
推奨:
happyhorse-1.0はmodeによってt2v、i2v、r2v、video_editを区別します。- Sora 互換形式では、参考画像には
content配列でメディア項目を渡すことを推奨します。 - テキスト項目には
type=textを使用し、メディア項目にはtype=image_urlを使用します。必要に応じてrole、nameと組み合わせて素材の用途を示せます。
リクエスト例:
{
"size": "720x1280",
"model": "happyhorse-1.0",
"mode": "r2v",
"prompt": "this is an example",
"duration": 15,
"content": [
{
"type": "text",
"text": "this is an example"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.png"
},
"role": "reference_image",
"name": "image1"
}
],
"parameters": {
"resolution": "720P",
"ratio": "9:16",
"duration": 15,
"seed": 1
}
}
4.4 Seedance シリーズ
公開モデル:
doubao-seedance-1-0-lite-t2v-250428doubao-seedance-1-0-lite-i2v-250428doubao-seedance-1-0-pro-250528doubao-seedance-1-0-pro-fast-251015doubao-seedance-1-5-pro-251215doubao-seedance-2-0-260128doubao-seedance-2-0-fast-260128
推奨:
- テキストから動画を生成する場合は、
*-t2v-*またはpro / fastを優先してください - 画像から動画を生成する場合は、
*-i2v-*を優先してください - 複雑な参考素材を用いるシナリオでは、
contentを優先して使用してください
リクエスト例:
{
"size": "1280x720",
"model": "doubao-seedance-2-0-fast-260128",
"prompt": "this is an example",
"duration": 15,
"fps": "24",
"seed": "20231024",
"mode": "reference_material",
"content": [
{
"type": "text",
"text": "this is an example"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.png"
},
"role": "reference_image",
"name": "image1"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.mp3"
},
"role": "reference_audio",
"name": "audio1"
}
]
}
4.5 Grok ビデオシリーズ
公開モデル:
grok-imagine-1.0-videogrok-imagine-video-1.5-previewgrok-video-3
よく使うパラメータ:
promptratio/aspect_ratioresolution/sizeseconds/durationimage/image_url/input_referencereference_images
例:
{
"model": "grok-imagine-1.0-video",
"prompt": "雨夜霓虹街道上的电影感推镜,光影丰富,运动自然",
"reference_images": [
"https://example.com/ref-1.jpg"
],
"seconds": 10,
"aspect_ratio": "16:9",
"resolution": "720P"
}
4.6 Kling ビデオメインモデル
公開メインモデル:
kling-video
必須:
modelmodel_name
サポートされる model_name:
kling-v1kling-v1-5kling-v1-6kling-v2-masterkling-v2-1kling-v2-1-masterkling-v2-5-turbokling-v2-6kling-v3
一般的な mode:
t2vi2vmulti_i2vextend
最小入力パラメータ:
- テキストから動画:
model + model_name + prompt + mode=t2v - 画像から動画:
model + model_name + prompt + mode=i2v + image - 複数画像参照:
model + model_name + prompt + mode=multi_i2v + image_list - 動画の延長:
model + model_name + mode=extend + video_id
例:
{
"model": "kling-video",
"model_name": "kling-v2-6",
"mode": "t2v",
"prompt": "海边日落镜头,电影感,风吹长发",
"duration": 5,
"aspect_ratio": "16:9"
}
4.7 MiniMax / Hailuo 動画シリーズ
公開モデル:
minimax-h3hailuo-2.3
推奨:
minimax-h3はテキストから動画生成、画像参照、音声参照をサポートします。contentでテキストと素材を混在させることを推奨します。image_urls、audio_urlsなどの互換フィールドも使用できます。hailuo-2.3では最初のフレーム画像が必要です。contentでrole=first_frameのimage_url項目を渡すか、image_urlsを使用して最初のフレーム画像を渡すことを推奨します。minimax-h3でよく使うのはduration=5~15、resolution=1440pです。hailuo-2.3でよく使うのはduration=6または10、resolution=768pです。
minimax-h3 の例:
{
"model": "minimax-h3",
"prompt": "A cinematic product video with smooth camera motion",
"content": [
{
"type": "text",
"text": "Use the product image as reference and match the rhythm of the audio."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/product.jpg"
},
"role": "reference_image",
"name": "product"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/music.mp3"
},
"role": "reference_audio",
"name": "music"
}
],
"duration": 8,
"resolution": "1440p",
"aspect_ratio": "16:9",
"generate_audio": true
}
hailuo-2.3 の例:
{
"model": "hailuo-2.3",
"prompt": "The camera slowly pushes in, natural motion and cinematic lighting.",
"content": [
{
"type": "text",
"text": "The camera slowly pushes in, natural motion and cinematic lighting."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/first-frame.jpg"
},
"role": "first_frame",
"name": "first"
}
],
"duration": 10,
"resolution": "768p",
"aspect_ratio": "16:9"
}
-
mode=t2v -
最小入力パラメータ:
model + prompt -
mode=i2v -
最小入力パラメータ:
model + prompt + image_url -
mode=i2v_first_last -
最小入力パラメータ:
model + prompt + image_url + end_image_url -
mode=reference_images -
最小入力パラメータ:
model + prompt + reference_images -
mode=reference_material -
最小入力パラメータ:
model + prompt + (image_urls/video_urls/audio_urls 至少一种)
Gemini Omni の呼び出し方法
gemini-omniは new-api の外部公開動画モデル名で、POST /v1/videosを直接利用できます。mode=t2v:テキストから動画を生成します。最小入力パラメータはmodel + promptです。mode=r2v:参照画像/参照素材による生成。画像はimage、image_url、images、image_urls、reference_images、input_reference、またはcontentに設定できます。mode=edit:動画編集。動画はvideo、video_url、videos、またはcontentに設定でき、参照画像も同時に送信できます。- 再生時間フィールドは
secondsまたはdurationを使用でき、4 / 6 / 8 / 10 秒のいずれかに自動でマッチします。
curl --request POST \
--url https://api.aiid.edu.kg/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"size": "1280x720",
"images": [
"https://example.png"
],
"model": "sora-2",
"prompt": "this is an example",
"duration": 12,
"fps": "24",
"seed": "20231024",
"mode": "i2v"
}
'{
"id": "video_abc123",
"object": "video",
"model": "sora-2",
"status": "queued",
"progress": 0,
"created_at": 1764347090922,
"seconds": "8"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<string>"
}
}承認
Bearer Token を使用して認証します。
形式: Authorization: Bearer sk-xxxxxx
ボディ
必須。外部公開モデル名。gemini-omni は /v1/videos から呼び出せます。
sora-2, sora-2-pro, gemini-omni, happyhorse-1.0, happyhorse-1.0-i2v, happyhorse-1.0-t2v, happyhorse-1.0-r2v, happyhorse-1.0-video-edit, doubao-seedance-1-0-lite-i2v-250428, doubao-seedance-1-0-lite-t2v-250428, doubao-seedance-1-0-pro-250528, doubao-seedance-1-0-pro-fast-251015, doubao-seedance-1-5-pro-251215, doubao-seedance-2-0-260128, doubao-seedance-2-0-fast-260128, veo3, veo3-fast, veo3-fast-frames, veo3-frames, veo3-pro, veo3-pro-frames, veo3.1, veo3.1-4k, veo3.1-components, veo3.1-fast, veo3.1-pro, veo3.1-pro-4k, kling-video, grok-imagine-1.0-video, grok-imagine-video-1.5-preview, grok-video-3, minimax-h3, hailuo-2.3, viduq3-turbo "sora-2"
共通プロンプトの入力欄。ほとんどのモデルで必須です。
単一画像エントリ。一部の互換モードでは images にマッピングされます。
duration の統一された入力パラメータです。一部のモデルでは seconds も受け付けます。
Video width
512
Video height
512
Video frame rate
30
Random seed
20231234
Number of videos to generate
1
Response format
"url"
User identifier
"user-1234"
動的拡張フィールドコンテナです。モデル固有の大量のフィールドがここからデシリアライズされます。
任意、動画生成モード。 gemini-omni は t2v、r2v、edit をサポートします。
複数画像の統一エントリ。Vidu、Seedance、Veo などで使用されます。
サイズの統一入力口で、resolution/aspect_ratio などにマッピングされます。
Sora の互換エントリ。実行時には duration にフォールバックします。
Sora/Veo 互換の参照画像エントリ。multipartファイルまたは互換オブジェクトを指定できます。
レスポンス
動画タスクの作成に成功しました
Should use VideoStatus constants: VideoStatusQueued, VideoStatusInProgress, VideoStatusCompleted, VideoStatusFailed
queued, in_progress, completed, failed, video_url, url, completed_at レガシーAPI互換(非推奨予定)
