curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-omni-1.2-flash-video-edit",
"prompt": "照明をより暖かくし、その他は変更しない。",
"video_urls": [
"https://example.com/source.mp4"
],
"quality": "auto",
"duration": "auto",
"aspect_ratio": "auto"
}
'{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "gemini-omni-1.2-flash-video-edit",
"object": "video.generation.task",
"progress": 0,
"status": "processing",
"task_info": {
"can_cancel": false,
"estimated_time": 60,
"video_duration": 5
},
"type": "video",
"usage": {
"billing_rule": "per_token",
"credits_reserved": 102.34,
"user_group": "default"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: gemini-omni-1.2-flash-video-edit",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}Gemini Omni 1.2 Flash 動画編集
- Gemini Omni 1.2 Flash(
gemini-omni-1.2-flash-video-edit)は、入力動画をプロンプトと任意の参照画像に基づいて編集します。 - 動画:
video_urlsは最大15秒の動画1本が必須です。 - 画像:
image_urlsで参照画像を最大10枚追加できます。 - 解像度:
qualityは360p、720p、1080p、4k、auto。既定値autoは入力に合わせます。具体的な値を指定すると、出力解像度を上げることも下げることもできます。 - 長さ:
durationはautoのみで、既定値もauto。入力の長さを維持します。 - アスペクト比:
aspect_ratioはautoのみで、既定値もauto。入力の比率を維持します。 - 編集内容は
promptに記述します。否定的な指定も直接記述し、独立したネガティブプロンプトは使用しません。 - 同期したネイティブ音声を自動生成します。追加パラメータは不要です。
seedの固定で再現性を高められます。- 非同期処理です。タスクIDで状態を確認してください。
- リンクは24時間有効です。早めに保存してください。
curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-omni-1.2-flash-video-edit",
"prompt": "照明をより暖かくし、その他は変更しない。",
"video_urls": [
"https://example.com/source.mp4"
],
"quality": "auto",
"duration": "auto",
"aspect_ratio": "auto"
}
'{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "gemini-omni-1.2-flash-video-edit",
"object": "video.generation.task",
"progress": 0,
"status": "processing",
"task_info": {
"can_cancel": false,
"estimated_time": 60,
"video_duration": 5
},
"type": "video",
"usage": {
"billing_rule": "per_token",
"credits_reserved": 102.34,
"user_group": "default"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_quota",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "model_access_denied",
"message": "Token does not have access to model: gemini-omni-1.2-flash-video-edit",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests, please try again later",
"type": "rate_limit_error"
}
}{
"error": {
"code": "internal_error",
"message": "Internal server error",
"type": "api_error"
}
}承認
##すべてのインターフェースはBearer Tokenによる認証が必要です##
API Key の取得:
API Key 管理ページ にアクセスして API Key を取得してください
利用時はリクエストヘッダーに以下を追加します:
Authorization: Bearer YOUR_API_KEY
ボディ
モデル名。固定値は gemini-omni-1.2-flash-video-edit
gemini-omni-1.2-flash-video-edit "gemini-omni-1.2-flash-video-edit"
希望する編集内容と維持する要素を記述する指示。
中国語と英語に対応します。動作や変化を具体的に記述すると、結果が安定しやすくなります。否定的な指定は prompt に直接記述してください(例:No dialogue、文字を表示しない)。独立したネガティブプロンプトのパラメータはありません。
プロンプトは必須です。空文字列や空白文字のみの値は指定できません。
1\S"照明をより暖かくし、その他は変更しない。"
編集対象の動画配列。1本のみ対応します。HTTP/HTTPS動画URLのみ、形式はmp4です。長さは最大 15 秒で下限はなく、1〜2秒の短い動画も利用できます。
1 element["https://example.com/source.mp4"]
任意の参照画像配列。最大10枚。主体・スタイル・要素を指定するため入力動画と併用できます。
入力要件:
- HTTP/HTTPS画像URLのみ
- 対応形式:
png、jpeg、webp
課金: 参照画像ごとに入力 token が加算されます。
1 - 10 elements["https://example.com/reference.png"]
出力動画の解像度。既定値は auto。
360p:短辺360。720p:短辺720。1080p:短辺1080。4k:短辺2160。auto:入力動画の解像度に合わせます。既定値です。
具体的な値を指定すると、出力解像度を上げることも下げることもできます。
料金: 出力動画のトークン数は出力解像度に応じて増えます。入力動画もトークンに算入され、解像度が高いほど料金が増えます。
360p, 720p, 1080p, 4k, auto "auto"
autoのみ指定可能で既定値もauto。出力時間は入力動画に従います。
auto "auto"
autoのみ指定可能で既定値もauto。出力比率は入力動画に従います。
auto "auto"
乱数シード。既定ではランダムです。範囲は 0〜4294967295。シードを固定すると、プロンプト調整時のパラメータ変更によるばらつきを抑え、再現性を高められます。
0 <= x <= 429496729542
タスク完了後のHTTPSコールバックアドレス
コールバックのタイミング:
- タスクの完了(completed)、失敗(failed)、キャンセル(cancelled)時にトリガーされます
- 課金確定後に送信されます
セキュリティ制限:
- HTTPSプロトコルのみ対応
- 内部ネットワークIPアドレス(127.0.0.1、10.x.x.x、172.16-31.x.x、192.168.x.x など)へのコールバックは禁止
- URLの長さは
2048文字以内
コールバックの仕組み:
- タイムアウト時間:
10秒 - 失敗後は最大
3回まで再試行します(失敗後それぞれ1秒/2秒/4秒後に再試行します) - コールバックのレスポンスボディの形式はタスク照会インターフェースの返却形式と同一です
- コールバックアドレスが2xxステータスコードを返した場合は成功とみなし、それ以外のステータスコードは再試行をトリガーします
"https://your-domain.com/webhooks/video-task-completed"
レスポンス
動画タスクの作成に成功しました
タスク作成のタイムスタンプ
1757169743
タスクID
"task-unified-1757169743-7cvnl5zw"
実際に使用されたモデル名
"gemini-omni-1.2-flash-video-edit"
タスクの具体的な種別
video.generation.task タスクの進捗率 (0-100)
0 <= x <= 1000
タスクの状態。作成APIは常に processing を返します。内部状態の pending もクライアントには processing として公開されます。
pending, processing, completed, failed "processing"
動画タスクの詳細情報
Show child attributes
Show child attributes
タスクの出力タイプ
text, image, audio, video "video"
使用量と課金情報
Show child attributes
Show child attributes