gemini-omni-flash-reference-to-video インターフェース
curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-omni-flash-reference-to-video",
"prompt": "参照画像のキャラクターが参照シーンの中を散歩する",
"image_urls": [
"https://example.com/character.png",
"https://example.com/scene.png"
],
"aspect_ratio": "16:9",
"duration": 10
}
'import requests
url = "https://api.evolink.ai/v1/videos/generations"
payload = {
"model": "gemini-omni-flash-reference-to-video",
"prompt": "参照画像のキャラクターが参照シーンの中を散歩する",
"image_urls": ["https://example.com/character.png", "https://example.com/scene.png"],
"aspect_ratio": "16:9",
"duration": 10
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'gemini-omni-flash-reference-to-video',
prompt: '参照画像のキャラクターが参照シーンの中を散歩する',
image_urls: ['https://example.com/character.png', 'https://example.com/scene.png'],
aspect_ratio: '16:9',
duration: 10
})
};
fetch('https://api.evolink.ai/v1/videos/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evolink.ai/v1/videos/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'gemini-omni-flash-reference-to-video',
'prompt' => '参照画像のキャラクターが参照シーンの中を散歩する',
'image_urls' => [
'https://example.com/character.png',
'https://example.com/scene.png'
],
'aspect_ratio' => '16:9',
'duration' => 10
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evolink.ai/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"gemini-omni-flash-reference-to-video\",\n \"prompt\": \"参照画像のキャラクターが参照シーンの中を散歩する\",\n \"image_urls\": [\n \"https://example.com/character.png\",\n \"https://example.com/scene.png\"\n ],\n \"aspect_ratio\": \"16:9\",\n \"duration\": 10\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evolink.ai/v1/videos/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gemini-omni-flash-reference-to-video\",\n \"prompt\": \"参照画像のキャラクターが参照シーンの中を散歩する\",\n \"image_urls\": [\n \"https://example.com/character.png\",\n \"https://example.com/scene.png\"\n ],\n \"aspect_ratio\": \"16:9\",\n \"duration\": 10\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evolink.ai/v1/videos/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"gemini-omni-flash-reference-to-video\",\n \"prompt\": \"参照画像のキャラクターが参照シーンの中を散歩する\",\n \"image_urls\": [\n \"https://example.com/character.png\",\n \"https://example.com/scene.png\"\n ],\n \"aspect_ratio\": \"16:9\",\n \"duration\": 10\n}"
response = http.request(request)
puts response.read_body{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "gemini-omni-flash-reference-to-video",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": false,
"estimated_time": 60
},
"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-flash-reference-to-video",
"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 Flash 1.0
Gemini Omni Flash 1.0 参照画像から動画生成
- Gemini Omni Flash (gemini-omni-flash-reference-to-video) モデルは参照画像から動画生成モードに対応し、1〜6枚の参照画像とテキストプロンプトをもとにネイティブ音声付きの動画を1本生成します
- 参照画像入力:
image_urlsで渡します。1〜6枚に対応し、動画内の被写体、スタイル、要素の制約に用います - 長さの制御:
durationで3〜10秒の整数の長さを指定するか、autoを渡してモデルに委ねます - 画面比率:
aspect_ratioで16:9、9:16、autoから選択します - ネイティブ音声: モデルが映像に同期した音声を自動生成し、追加パラメータは不要です
- ネガティブ指定:
promptに直接記述します(例:No dialogue)。本モデルは独立したネガティブプロンプト用のパラメータを提供しません - 非同期処理モードです。返却されたタスクIDを使って 照会 してください
- 生成された動画リンクの有効期限は24時間です。お早めに保存してください
POST
/
v1
/
videos
/
generations
gemini-omni-flash-reference-to-video インターフェース
curl --request POST \
--url https://api.evolink.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-omni-flash-reference-to-video",
"prompt": "参照画像のキャラクターが参照シーンの中を散歩する",
"image_urls": [
"https://example.com/character.png",
"https://example.com/scene.png"
],
"aspect_ratio": "16:9",
"duration": 10
}
'import requests
url = "https://api.evolink.ai/v1/videos/generations"
payload = {
"model": "gemini-omni-flash-reference-to-video",
"prompt": "参照画像のキャラクターが参照シーンの中を散歩する",
"image_urls": ["https://example.com/character.png", "https://example.com/scene.png"],
"aspect_ratio": "16:9",
"duration": 10
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'gemini-omni-flash-reference-to-video',
prompt: '参照画像のキャラクターが参照シーンの中を散歩する',
image_urls: ['https://example.com/character.png', 'https://example.com/scene.png'],
aspect_ratio: '16:9',
duration: 10
})
};
fetch('https://api.evolink.ai/v1/videos/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.evolink.ai/v1/videos/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'gemini-omni-flash-reference-to-video',
'prompt' => '参照画像のキャラクターが参照シーンの中を散歩する',
'image_urls' => [
'https://example.com/character.png',
'https://example.com/scene.png'
],
'aspect_ratio' => '16:9',
'duration' => 10
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.evolink.ai/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"gemini-omni-flash-reference-to-video\",\n \"prompt\": \"参照画像のキャラクターが参照シーンの中を散歩する\",\n \"image_urls\": [\n \"https://example.com/character.png\",\n \"https://example.com/scene.png\"\n ],\n \"aspect_ratio\": \"16:9\",\n \"duration\": 10\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.evolink.ai/v1/videos/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gemini-omni-flash-reference-to-video\",\n \"prompt\": \"参照画像のキャラクターが参照シーンの中を散歩する\",\n \"image_urls\": [\n \"https://example.com/character.png\",\n \"https://example.com/scene.png\"\n ],\n \"aspect_ratio\": \"16:9\",\n \"duration\": 10\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evolink.ai/v1/videos/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"gemini-omni-flash-reference-to-video\",\n \"prompt\": \"参照画像のキャラクターが参照シーンの中を散歩する\",\n \"image_urls\": [\n \"https://example.com/character.png\",\n \"https://example.com/scene.png\"\n ],\n \"aspect_ratio\": \"16:9\",\n \"duration\": 10\n}"
response = http.request(request)
puts response.read_body{
"created": 1757169743,
"id": "task-unified-1757169743-7cvnl5zw",
"model": "gemini-omni-flash-reference-to-video",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": false,
"estimated_time": 60
},
"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-flash-reference-to-video",
"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
ボディ
application/json
モデル名。gemini-omni-flash-reference-to-video で固定です
利用可能なオプション:
gemini-omni-flash-reference-to-video 例:
"gemini-omni-flash-reference-to-video"
動画生成のテキストプロンプト。日本語・英語に対応します
使用のヒント:
- 参照画像の被写体が動画内で見せる動き、カメラワーク、シーンの雰囲気などを記述します
- ネガティブな要件はプロンプトに直接記述します(例:
No dialogue、文字を出さない)。本モデルは独立したネガティブプロンプト用のパラメータを提供しません
例:
"子猫がいたずらっぽく毛糸玉をつつく"
参照画像の配列。1〜6枚に対応します
対応形式:
- HTTP/HTTPS 画像 URL
data:image/...;base64,...形式の data URL- base64 のみの画像文字列
フォーマット要件: png、jpeg、webp に対応
Required array length:
1 - 6 elements例:
[ "https://example.com/character.png", "https://example.com/scene.png" ]
動画の長さ(秒)。デフォルトは 10
値の説明:
- 整数:範囲は
3 〜 10秒 auto:出力の長さをモデルが自ら決定します
課金について: 実際の課金は生成された動画の使用量に基づきます
必須範囲:
3 <= x <= 10例:
6
動画のアスペクト比。デフォルトは 16:9
値の説明:
16:9:横向きの画面9:16:縦向きの画面auto:画面比率をモデルが自ら決定します
利用可能なオプション:
16:9, 9:16, auto 例:
"16:9"
タスク完了後の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-flash-reference-to-video"
タスクの具体的な種別
利用可能なオプション:
video.generation.task タスクの進捗率 (0-100)
必須範囲:
0 <= x <= 100例:
0
タスクの状態
利用可能なオプション:
pending, processing, completed, failed 例:
"pending"
動画タスクの詳細情報
Show child attributes
Show child attributes
タスクの出力タイプ
利用可能なオプション:
text, image, audio, video 例:
"video"
使用量と課金情報
Show child attributes
Show child attributes