> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aireiter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini Omni 1.2 Flash 動画生成

> - モデル ID：`gemini_omni_1_2_flash`
- 非同期処理モード、後続のクエリ用タスクIDを返却
- テキストからの動画生成、または最大 3 枚の参照画像に対応
- ネイティブ 720p、長さは 3〜15 秒から選択。11〜15 秒は 9:16 のみ


> [!NOTE]
>
> 出力は常に 720p の H.264 MP4 です：横向き 1280×720、縦向き 720×1280。1080p / 4K、参照動画、先頭・末尾フレーム指定には対応していません。

## Authorizations

**Authorization** `string` *required*

すべてのエンドポイントで Bearer Token 認証が必要です。

API Key の取得：

[API Key 管理ページ](https://aireiter.com/keys) で API Key を取得してください。

使用時はリクエストヘッダーに次を追加します：

```
Authorization: Bearer YOUR_API_KEY
```

## Body

**model** `string` *required*

モデル名。常に `gemini_omni_1_2_flash` を指定してください。

**params** `object` *required*

モデルパラメータオブジェクト。

**params オブジェクトのプロパティ**

**prompt** `string` *required*

動画生成のテキスト説明。必須。

**video\_length** `string` (default: 8)

生成する動画の長さ（秒）。`"3"` から `"15"` までの整数秒の文字列のみ受け付けます：

* `"3"` / `"4"` / `"5"` / `"6"` / `"7"`
* `"8"` - デフォルト値
* `"9"` / `"10"` / `"11"` / `"12"` / `"13"` / `"14"` / `"15"`

> [!WARNING]
>
> 列挙値の検証は文字列を要求します。数値 `8` ではなく `"8"` を渡してください。`"11"` 〜 `"15"` は `aspect_ratio` が `9:16` の場合のみ使用できます。

**aspect\_ratio** `string` (default: 16:9)

動画のアスペクト比：

* `16:9` - 横向き 1280×720、デフォルト値
* `9:16` - 縦向き 720×1280

長さが 11〜15 秒の場合は `9:16` のみ指定できます。`16:9` は拒否されます。

**image\_url** `string | string[]`

参照画像の URL。インターネットから直接アクセスできる必要があります。単一の文字列でも指定できます。省略するとテキストからの動画生成になります。

* 最大 3 枚。4 枚目は拒否されます
* 短辺 300px 以上、1 枚あたり 10MB 以下

参照画像は被写体とスタイルの指定に使われます。先頭・末尾フレームではないため、動画が特定の画像から始まったり終わったりすることは保証されません。

**out\_task\_id** `string` *required*

リクエスト元のタスク ID。

ユーザー定義のタスク識別子。必須。英数字、アンダースコア、ハイフンのみ対応し、長さは 1〜64 文字です。後からこの ID を使用してタスクのステータスと結果を照会できます。

## Response

**out\_task\_id** `string`

呼び出し元タスク ID。結果照会に使えます。

**status** `string`

初期状態。通常は `"pending"`。

**estimated\_credits** `number`

このタスクの推定消費クレジット。

**created\_at** `string`

作成時刻。ISO 形式。

## Query Task

このモデルは非同期動画生成です。タスクを送信後、`out_task_id` を使用してタスクステータスを照会してください。[タスクステータスの取得](https://docs.aireiter.com/ja/api-reference/tasks/status.md) も参照できます。

**out\_task\_id** `string` *required*

タスク送信時に渡されたリクエスト元のタスクID。

```bash theme={null}
curl --request POST \
  --url https://aireiter.com/api/openapi/query \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "out_task_id": "omni_12_t2v_123456"
  }'
```

照会が成功して完了すると、レスポンス内の `output` 配列に生成された動画が含まれ、各要素に `video` フィールドが含まれます。

## パラメータ対応表

| 入力 | `image_url` | `video_length` | `aspect_ratio` |
| - | - | - | - |
| テキストから生成 | 渡さない、または空配列 | `"3"`–`"10"` | `16:9` または `9:16` |
| テキストから生成（長尺） | 渡さない、または空配列 | `"11"`–`"15"` | `9:16` のみ |
| 参照画像 | 1〜3 枚 | `"3"`–`"10"` | `16:9` または `9:16` |
| 参照画像（長尺） | 1〜3 枚 | `"11"`–`"15"` | `9:16` のみ |

非対応のフィールド：`resolution`（720p 固定）、`video_url`（参照動画は非対応）。

## Request Examples

```bash cURL（テキストから生成） theme={null}
curl --request POST \
  --url https://aireiter.com/api/openapi/submit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini_omni_1_2_flash",
    "params": {
      "prompt": "晴れたビーチを走るゴールデンレトリバー、追従ショット、リアルなスタイル",
      "aspect_ratio": "16:9",
      "video_length": "8"
    },
    "out_task_id": "omni_12_t2v_123456"
  }'
```

```bash cURL（参照画像 3 枚） theme={null}
curl --request POST \
  --url https://aireiter.com/api/openapi/submit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini_omni_1_2_flash",
    "params": {
      "prompt": "参照画像の人物と衣装を維持したまま、庭を歩く",
      "image_url": [
        "https://example.com/ref-1.jpg",
        "https://example.com/ref-2.jpg",
        "https://example.com/ref-3.jpg"
      ],
      "aspect_ratio": "16:9",
      "video_length": "6"
    },
    "out_task_id": "omni_12_img3_123456"
  }'
```

```bash cURL（15 秒・縦向き） theme={null}
curl --request POST \
  --url https://aireiter.com/api/openapi/submit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini_omni_1_2_flash",
    "params": {
      "prompt": "都市の夜景タイムラプス、車の流れが光の軌跡を描く、縦構図",
      "aspect_ratio": "9:16",
      "video_length": "15"
    },
    "out_task_id": "omni_12_t2v_15s_123456"
  }'
```

```python Python theme={null}
import requests

url = "https://aireiter.com/api/openapi/submit"

payload = {
    "model": "gemini_omni_1_2_flash",
    "params": {
        "prompt": "晴れたビーチを走るゴールデンレトリバー、追従ショット、リアルなスタイル",
        "aspect_ratio": "16:9",
        "video_length": "8"
    },
    "out_task_id": "omni_12_t2v_123456"
}

headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript JavaScript theme={null}
const url = "https://aireiter.com/api/openapi/submit";

const payload = {
  model: "gemini_omni_1_2_flash",
  params: {
    prompt: "晴れたビーチを走るゴールデンレトリバー、追従ショット、リアルなスタイル",
    aspect_ratio: "16:9",
    video_length: "8"
  },
  out_task_id: "omni_12_t2v_123456"
};

const headers = {
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(payload)
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));
```

```go Go theme={null}
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io/ioutil"
    "net/http"
)

func main() {
    url := "https://aireiter.com/api/openapi/submit"

    payload := map[string]interface{}{
        "model": "gemini_omni_1_2_flash",
        "params": map[string]interface{}{
            "prompt":       "晴れたビーチを走るゴールデンレトリバー、追従ショット、リアルなスタイル",
            "aspect_ratio": "16:9",
            "video_length": "8",
        },
        "out_task_id": "omni_12_t2v_123456",
    }

    jsonData, _ := json.Marshal(payload)

    req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
    req.Header.Set("Authorization", "Bearer <token>")
    req.Header.Set("Content-Type", "application/json")

    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := ioutil.ReadAll(resp.Body)
    fmt.Println(string(body))
}
```

```java Java theme={null}
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;

public class Main {
    public static void main(String[] args) throws Exception {
        String url = "https://aireiter.com/api/openapi/submit";

        String payload = """
            {
              "model": "gemini_omni_1_2_flash",
              "params": {
                "prompt": "晴れたビーチを走るゴールデンレトリバー、追従ショット、リアルなスタイル",
                "aspect_ratio": "16:9",
                "video_length": "8"
              },
              "out_task_id": "omni_12_t2v_123456"
            }
        """;

        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .header("Authorization", "Bearer <token>")
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(payload))
            .build();

        HttpResponse<String> response = client.send(request,
            HttpResponse.BodyHandlers.ofString());

        System.out.println(response.body());
    }
}
```

```php PHP theme={null}
<?php

$url = "https://aireiter.com/api/openapi/submit";

$payload = [
    "model" => "gemini_omni_1_2_flash",
    "params" => [
        "prompt" => "晴れたビーチを走るゴールデンレトリバー、追従ショット、リアルなスタイル",
        "aspect_ratio" => "16:9",
        "video_length" => "8"
    ],
    "out_task_id" => "omni_12_t2v_123456"
];

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
]);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
```

```json 200 theme={null}
{
  "statusCode": 200,
  "message": "",
  "data": {
      "out_task_id": "omni_12_t2v_123456",
      "status": "pending",
      "estimated_credits": "<推定消費クレジット>",
      "created_at": "2026-11-18T06:03:28.242Z"
  }
}
```

```json 400 theme={null}
  {
      "statusCode": 400,
      "message": "リクエストパラメータが無効です",
      "ok": false
  }
```

```json 401 theme={null}
{
  "error": {
    "code": 401,
    "message": "認証に失敗しました。APIキーを確認してください"
  }
}
```

```json 433 theme={null}
  {
    "error": {
      "code": 433,
      "message": "アカウント残高が不足しています。チャージしてから再試行してください"
    }
  }
```

```json 500 theme={null}
{
  "error": {
    "code": 500,
    "message": "内部サーバーエラーが発生しました。しばらくしてから再試行してください"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.