> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.beatapi.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server.

# MiniMax H3 Max Turbo

POST https://api.beatapi.io/v1/videos/tasks
Content-Type: application/json

テキスト、または 1～2 枚のフレームから、480P または 768P の 5 秒以上の動画を生成します。入力は H3 Max と同じで、料金はその半額です。- 非同期です。作成の呼び出しはタスク ID を返し、動画はタスクが成功した時点で得られます。
- 入力方法は 3 通りです。テキストのみ、開始フレーム、開始フレームと終了フレームです。参照入力も `aspect_ratio` もありません。
- 解像度は 480P と 768P（デフォルト）の 2 種類で、大文字で指定します。
- 動画の秒数に、選んだ解像度の単価を掛けて課金します。`duration` は 5 秒から指定できます。失敗したタスクには課金されません。POST/v1/videos/tasks試してみるこのモデルをテスト画面で開きます。BeatAPI の API キーを入力するとタスクを作成できます。実際に呼び出され、ご自身の残高から課金されます。## モデル ID5 つの MiniMax H3 モデルがこのエンドポイントを共有しますが、受け付ける入力は異なります。以下の値はゲートウェイの仕様から直接取得したものです。| モデル ID                     | `duration`（秒） | `resolution`            | 参照画像の最大数 | 参照動画の最大数 | 参照音声の最大数 | 選ぶ場面                                                                                                     |
| -------------------------- | ------------- | ----------------------- | -------- | -------- | -------- | -------------------------------------------------------------------------------------------------------- |
| `minimax-h3`               | 4–15          | `768p`, `2K`            | 9        | 3        | 3        | 元の ID をすでに使っている場合。入力と料金は `minimax-h3-fast` と同じです。                                                        |
| `minimax-h3-fast`          | 4–15          | `768p`, `2K`            | 9        | 3        | 3        | 2K 出力が必要な場合、または音声を含む参照の組み合わせや最大 3 本の参照動画を使いたい場合。                                                         |
| `minimax-h3-normal`        | 3–15          | `480p`, `768p`, `1080p` | 4        | 1        | —        | 価格を最優先し、待ち時間が長くても構わない場合。レンダリングは遅くなりますが、同じ解像度で Fast の半額です。480p と 1080p、`seed` が加わる一方、参照素材は少なくなります（音声は不可）。 |
| `minimax-h3-max`           | ≥ 5           | `480P`, `768P`          | —        | —        | —        | テキスト、または 1～2 枚のフレームから始め、480P または 768P と `seed` を使いたい場合。参照入力は受け付けず、`aspect_ratio` もありません。                 |
| **`minimax-h3-max-turbo`** | ≥ 5           | `480P`, `768P`          | —        | —        | —        | 入力と解像度は `minimax-h3-max` と同じで、定価はその半額です。                                                                 |## エンドポイントと認証`POST https://api.beatapi.io/v1/videos/tasks`Authorization
string
必須BeatAPI の API キーを `Bearer <BEATAPI_API_KEY>` の形式で送信します。キーは[ダッシュボード](https://beatapi.io/dashboard)で作成できます。キーはサーバー側で保管し、ブラウザーやモバイルアプリに含めないでください。ボディは JSON で送信し、`Content-Type: application/json` を指定します。`Idempotency-Key` は任意です。論理的に 1 件のリクエストごとに一意の値（255 文字以内）を送り、まったく同じボディを再試行するときだけ再利用してください。24 時間以内に同じキーと同じボディで再試行すると、最初のレスポンスが `Idempotent-Replayed: true` 付きで再度返されます。同じキーで異なるボディを送ると `409 idempotency_conflict` が返ります。2xx 以外のレスポンスは保存されないため、400 や 402 の後の再試行は改めて実行されます。## リクエストの流れ下記のパラメーターをエンドポイントに `POST` します。`201` が返れば、タスクが受け付けられ、料金が残高から仮確保されたことを意味します。処理はバックグラウンドで実行されます。`data.id` を保存してください。`GET /v1/tasks/{task_id}` を呼び出し、`status` が `succeeded` または `failed` になるまで、呼び出しの間隔を `data.poll_after_seconds`（画像は 5 秒、動画は 8 秒）だけ空けてください。あるいは `task.succeeded` と `task.failed` の[Webhook](/webhooks)を登録することもできます。処理タイムアウトで停止したタスクはイベントを送信しないため、フォールバックとしてポーリングも続けてください。`succeeded` の場合は、すべての `data.output.media[].url` をダウンロードし、必要なファイルを保存してください。結果 URL がいつまで利用できるかは保証されません。`failed` の場合は、`data.error_code` と `data.error_message` を確認してください。仮確保された金額は残高に戻されます。`data.retryable` は、同じリクエストをもう一度送れば成功する可能性があるかどうかを示します。## 入力モード| モード           | 必須の入力                              | 備考                                         |
| ------------- | ---------------------------------- | ------------------------------------------ |
| テキストから動画      | `model`、`prompt`                   | `images` は送らないでください。                       |
| 開始フレーム        | `model`、`prompt`、`images`（リンク 1 個） | 動画はその画像から始まります。                            |
| 開始フレームと終了フレーム | `model`、`prompt`、`images`（リンク 2 個） | `images[0]` が開始フレーム、`images[1]` が終了フレームです。 |## リクエストパラメーターmodel
string
必須実行するモデルです。**値**：`minimax-h3-max-turbo`**値が正しくない場合**- 指定がない：`"model" is required`
- 画像モデルをこのエンドポイントに送った：`"model" nano-banana-2 is served by POST /v1/images/tasks, not this endpoint`prompt
string
必須ショットで起こることを記述します。動き、表情、カメラ、スタイルなどです。**長さ**：1–5000 文字- 長さは文字数で数えます（CJK の文字も 1 文字です）。
- フレームを使う場合は、動画が一方からもう一方へどう移るか、または開始フレームの後に何が動くかを書いてください。**値が正しくない場合**- 指定がない：`"prompt" is required`
- 空、または上限を超えている：`"prompt" has an unsupported length`images
string[]
任意開始フレーム、または開始フレームと終了フレームです。**要素数**：1–2  \
各要素は公開されている `https://` の URL です。ローカルファイルは先に [アップロード](/quick-guide#upload-an-input-file)（`POST /v1/files`）し、返された `data.url` を渡してください。- リンク 1 個：動画はこの画像から始まります。リンク 2 個：`images[0]` が開始フレーム、`images[1]` が終了フレームです。
- このモデルは参照画像を受け付けません（`reference_images` は拒否されます）。**値が正しくない場合**- リンクが 3 個以上：`"images" accepts at most 2 items`
- https\:// のリンクではない：`"images[0]" must be a public HTTPS URL`duration
integer
任意デフォルト: 5動画の長さを秒単位で指定する、5 以上の整数です。**デフォルト**：`5`  \
**範囲**：≥ 5- 省略すると `5` が使われます。
- 料金はこの値に応じて決まります（「課金」を参照）。**値が正しくない場合**- 5 秒未満、または整数ではない：`"duration" is outside its supported range`resolution
string
任意デフォルト: 768P出力の解像度です。768P は 480P より 1 秒あたりの料金が高くなります。**指定できる値**：`480P`, `768P`  \
**デフォルト**：`768P`- 大文字のみです。`768p` は拒否されます。
- 1080P と 2K はここでは提供していません。1080p は `minimax-h3-normal`、2K は `minimax-h3-fast` で利用できます。**値が正しくない場合**- 一覧にない値（たとえば `768p`、`1080P`、`2K`）：`"resolution" must be one of: [480P 768P]`seed
integer
任意生成を固定するためのシード値です。省略するとランダムなシードになります。**範囲**：≥ 0- 0 以上の整数です。**値が正しくない場合**- 負の値、または整数ではない：`"seed" is outside its supported range`## 入力メディアの上限ゲートウェイはタスク作成前にすべての入力を読み取り、次の上限を超えるものは、その入力を示す `400 bad_request` で拒否します。課金はされません。| メディア | タスク作成前に確認される上限                           |
| ---- | ---------------------------------------- |
| 画像   | 幅・高さとも 256～5760 px；アスペクト比（幅 ÷ 高さ）0.4～2.5 |- このモデルが受け付けるのは画像だけなので、画像の行のみ該当します。動画と音声の行は H3 の各モデルで共通のもので、ここでは該当しません。
- 画像は送信した順に確認されます。制限は、辺の長さ、アスペクト比の順に確認されます。メッセージには、フィールドのエラーと同じく 0 から数えた、リスト名と位置で入力が示されます：`images[0] is 200x200 pixels; this model takes images 256 to 5760 pixels on each side.`
- リンクが作成時に拒否されるのは、そのホストが HTTP 4xx エラーを返すか、空のファイルを返した場合だけです。たとえば `images[1] could not be downloaded: the URL returned HTTP 404.` です。入力のそれ以外の問題は送信後に判明し、タスクが失敗します（全額返金）。
- ローカルのファイルがある場合は、`POST /v1/files` でアップロードし、返された `data.url` を渡してください。## このモデルが受け付けないフィールド次のフィールドを送ると、無視されるのではなく、課金の前に拒否されます。- `aspect_ratio`、`reference_images`、`reference_videos`、`reference_audios`、`generate_audio`、`watermark`、`quality`、`sound`、およびほかの動画モデルのフィールド → `field "aspect_ratio" is not supported by model minimax-h3-max-turbo`（送ったフィールド名が入ります）。
- それ以外の未知のフィールド → `unknown field: <name>`。参照入力には `minimax-h3-fast`（画像・動画・音声）または `minimax-h3-normal`（画像と動画 1 本）を使ってください。## リクエスト例```bash title="cURL"
curl --request POST \
  --url https://api.beatapi.io/v1/videos/tasks \
  --header "Authorization: Bearer $BEATAPI_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "minimax-h3-max-turbo",
  "prompt": "A slow cinematic push through a misty mountain village at dawn, smoke rising from the chimneys",
  "duration": 5,
  "resolution": "768P"
}'
``````python title="Python"
import os
import requests

response = requests.post(
    "https://api.beatapi.io/v1/videos/tasks",
    headers={"Authorization": f"Bearer {os.environ['BEATAPI_API_KEY']}"},
    json={
      "model": "minimax-h3-max-turbo",
      "prompt": "A slow cinematic push through a misty mountain village at dawn, smoke rising from the chimneys",
      "duration": 5,
      "resolution": "768P"
    },
    timeout=60,
)
body = response.json()
if not response.ok:
    raise RuntimeError(f"{response.status_code} {body['error']['code']}: {body['error']['message']}")
task = body["data"]
print(task["id"], task["status"])
``````javascript title="JavaScript"
const response = await fetch('https://api.beatapi.io/v1/videos/tasks', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.BEATAPI_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "model": "minimax-h3-max-turbo",
    "prompt": "A slow cinematic push through a misty mountain village at dawn, smoke rising from the chimneys",
    "duration": 5,
    "resolution": "768P"
  }),
});
const body = await response.json();
if (!response.ok) throw new Error(`${response.status} ${body.error.code}: ${body.error.message}`);
console.log(body.data.id, body.data.status);
```### テキストから動画5 秒の 768P クリップです。```bash
curl --request POST \
  --url https://api.beatapi.io/v1/videos/tasks \
  --header "Authorization: Bearer $BEATAPI_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "minimax-h3-max-turbo",
  "prompt": "A slow cinematic push through a misty mountain village at dawn, smoke rising from the chimneys",
  "duration": 5,
  "resolution": "768P"
}'
```### 開始フレーム動画はその画像から始まります。```bash
curl --request POST \
  --url https://api.beatapi.io/v1/videos/tasks \
  --header "Authorization: Bearer $BEATAPI_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "minimax-h3-max-turbo",
  "prompt": "The performer turns toward the camera as neon light sweeps across the stage",
  "images": [
    "https://media.beatapi.io/samples/neon-singer.png"
  ],
  "duration": 5,
  "resolution": "768P"
}'
```### 開始フレームと終了フレーム動画は 1 枚目の画像から 2 枚目へ移ります。480P で、シード値を固定しています。```bash
curl --request POST \
  --url https://api.beatapi.io/v1/videos/tasks \
  --header "Authorization: Bearer $BEATAPI_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "minimax-h3-max-turbo",
  "prompt": "The camera moves smoothly from the bottle on the table to the singer on a neon stage in one continuous shot",
  "images": [
    "https://media.beatapi.io/samples/smart-bottle.png",
    "https://media.beatapi.io/samples/neon-singer.png"
  ],
  "duration": 6,
  "resolution": "480P",
  "seed": 42
}'
```## レスポンス### タスクの作成（201）タスクオブジェクトです。タスクが成功するまで `output` は `null` です。「実行中」と記載されたフィールドは、タスクの完了後に表示されなくなります。```json
{
  "data": {
    "id": "task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ",
    "object": "task",
    "task_kind": "video",
    "capability_id": "minimax-h3-max-turbo",
    "capability_version": 1,
    "media_type": "video",
    "model": "minimax-h3-max-turbo",
    "status": "queued",
    "stage": "queued",
    "created_at": 1791993600,
    "updated_at": 1791993600,
    "completed_at": null,
    "poll_after_seconds": 8,
    "output": null,
    "usage": {
      "credits_reserved": 0.2,
      "credits_settled": 0,
      "credits_refunded": 0,
      "credits_charged": 0.2,
      "billable_duration_seconds": 5
    },
    "request_id": "req_5f0c2a9e4b7d4e31",
    "error_code": null,
    "error_message": null
  }
}
```| フィールド                                  | 型                 | 説明                                                                                            |
| -------------------------------------- | ----------------- | --------------------------------------------------------------------------------------------- |
| `data.id`                              | `string`          | タスク ID です。`task_` の後に英数字 32 文字が続きます。ポーリングや Webhook イベントとの照合に使います。                             |
| `data.object`                          | `string`          | 常に `task` です。                                                                                 |
| `data.task_kind`                       | `string`          | `image` または `video` です。                                                                       |
| `data.capability_id`                   | `string`          | 送信したモデル ID です。                                                                                |
| `data.capability_version`              | `integer`         | モデルの仕様バージョンです。現在は `1` です。                                                                     |
| `data.media_type`                      | `string`          | `image` または `video` です。                                                                       |
| `data.model`                           | `string`          | 送信したモデル ID です（`capability_id` と同じ）。                                                           |
| `data.status`                          | `string`          | `queued`、`processing`、`succeeded`、`failed` のいずれかです。最終状態は後ろの 2 つだけです。                          |
| `data.stage`                           | `string`          | `status` と同じ値です。古いクライアント向けに残されています。                                                           |
| `data.created_at`                      | `integer`         | タスクの作成日時（Unix 秒）です。                                                                           |
| `data.updated_at`                      | `integer`         | 最終更新日時（Unix 秒）です。                                                                             |
| `data.completed_at`                    | `integer \| null` | タスクの完了日時（Unix 秒）です。実行中は `null` です。                                                            |
| `data.poll_after_seconds`              | `integer`         | 実行中のみ。次のポーリングまでに待つ秒数です（画像は 5、動画は 8）。                                                          |
| `data.typical_seconds`                 | `object`          | 実行中のみ、直近のタスクが十分にある場合に含まれます。直近 `window` の `samples` 件のタスクについて、完了までの時間（秒）の `p50` と `p90` を示します。 |
| `data.output`                          | `object \| null`  | 結果です。`status` が `succeeded` になるまでは `null` です。下の出力フィールドを参照してください。                              |
| `data.usage.credits_reserved`          | `number`          | タスク作成時に残高から仮確保された金額（USD）です。                                                                   |
| `data.usage.credits_charged`           | `number`          | このタスクの料金（USD）です。失敗したタスクでは `0` です。                                                             |
| `data.usage.credits_settled`           | `number`          | 最終的に差し引かれた金額（USD）です。タスクが成功した時点で設定され、それ以外では `0` です。                                            |
| `data.usage.credits_refunded`          | `number`          | 残高に戻された金額（USD）です。失敗したタスクでは、返金が記録された時点で仮確保した金額と一致します。                                          |
| `data.usage.billable_duration_seconds` | `integer`         | 動画のみ。料金の算定に使われた秒数です。モデルが長さを報告しない場合は含まれません。                                                    |
| `data.request_id`                      | `string`          | リクエスト ID です。サポートに問い合わせる際に添えてください。                                                             |
| `data.error_code`                      | `string \| null`  | 失敗コードです。タスクが失敗した場合以外は `null` です。                                                              |
| `data.error_message`                   | `string \| null`  | 何が問題で、何を変更すればよいかを示します。タスクが失敗した場合以外は `null` です。                                                |### 完了したタスク`GET /v1/tasks/{task_id}` は HTTP 200 と `status: "succeeded"` を返し、結果は `data.output` に入ります。```json
{
  "data": {
    "id": "task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ",
    "object": "task",
    "task_kind": "video",
    "capability_id": "minimax-h3-max-turbo",
    "capability_version": 1,
    "media_type": "video",
    "model": "minimax-h3-max-turbo",
    "status": "succeeded",
    "stage": "succeeded",
    "created_at": 1791993600,
    "updated_at": 1791993690,
    "completed_at": 1791993690,
    "output": {
      "media": [
        {
          "type": "video",
          "url": "https://media.beatapi.io/outputs/task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ/0.mp4",
          "mime_type": "video/mp4"
        }
      ],
      "r2_url": "https://media.beatapi.io/outputs/task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ/0.mp4"
    },
    "usage": {
      "credits_reserved": 0.2,
      "credits_settled": 0.2,
      "credits_refunded": 0,
      "credits_charged": 0.2,
      "billable_duration_seconds": 5
    },
    "request_id": "req_5f0c2a9e4b7d4e31",
    "error_code": null,
    "error_message": null
  }
}
```#### 出力フィールド| フィールド                      | 型          | 説明                                                     |
| -------------------------- | ---------- | ------------------------------------------------------ |
| `output.media`             | `object[]` | 生成されたファイルです。このモデルでは動画 1 本です。                           |
| `output.media[].type`      | `string`   | 常に `video` です。                                         |
| `output.media[].url`       | `string`   | 保存された動画への HTTPS リンクです。ダウンロードして保管してください。保存期間は保証されません。   |
| `output.media[].mime_type` | `string`   | ファイルの種類です。たとえば `video/mp4` です。                         |
| `output.r2_url`            | `string`   | 古いクライアント向けに、動画の URL をもう一度返すものです。代わりに `media` を読んでください。 |### 失敗したタスク失敗したタスクも、`GET /v1/tasks/{task_id}` では HTTP 200 になります。失敗はボディに示されます。仮確保された金額は全額戻されるため、課金されません。```json
{
  "data": {
    "id": "task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ",
    "object": "task",
    "task_kind": "video",
    "capability_id": "minimax-h3-max-turbo",
    "capability_version": 1,
    "media_type": "video",
    "model": "minimax-h3-max-turbo",
    "status": "failed",
    "stage": "failed",
    "created_at": 1791993600,
    "updated_at": 1791993690,
    "completed_at": 1791993690,
    "output": null,
    "usage": {
      "credits_reserved": 0.2,
      "credits_settled": 0,
      "credits_refunded": 0.2,
      "credits_charged": 0,
      "billable_duration_seconds": 5
    },
    "retryable": true,
    "request_id": "req_5f0c2a9e4b7d4e31",
    "error_code": "processing_failed",
    "error_message": "The task failed during processing on our side. Retry; a failed task is refunded."
  }
}
```| フィールド                | 型         | 説明                                                                                                                                                                                                         |
| -------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `data.error_code`    | `string`  | `bad_request` と `content_policy_violation`（リクエストを修正してください）、または `processing_unavailable`、`processing_timeout`、`processing_failed`、`result_transfer_failed`（時間をおいて再試行してください）のいずれかです。[エラー](/errors)を参照してください。 |
| `data.error_message` | `string`  | 問題と対処方法を示す文です。                                                                                                                                                                                             |
| `data.retryable`     | `boolean` | 失敗したタスクにのみ含まれます。同じリクエストをもう一度送れば成功する可能性がある場合は `true` です。                                                                                                                                                    |
| `data.usage`         | `object`  | 返金が記録された時点（通常はタスクが失敗した瞬間）で、`credits_charged` と `credits_settled` は `0` になり、`credits_refunded` は `credits_reserved` と一致します。                                                                                 |## 完全なコード例タスクを作成し、サーバーが示すポーリング間隔で完了を待ち、結果の URL を出力します。環境変数に `BEATAPI_API_KEY` を設定し、`requests` をインストールしてください。```python
import os
import time
import uuid

import requests

API = "https://api.beatapi.io"
HEADERS = {"Authorization": f"Bearer {os.environ['BEATAPI_API_KEY']}"}


def create_task(body: dict) -> dict:
    # One Idempotency-Key per logical request: a retry with the same key cannot create a second task.
    headers = {**HEADERS, "Idempotency-Key": str(uuid.uuid4())}
    for attempt in range(3):
        response = requests.post(f"{API}/v1/videos/tasks", headers=headers, json=body, timeout=60)
        if response.status_code in (429, 503) and attempt < 2:
            time.sleep(int(response.headers.get("Retry-After", 10)))
            continue
        break
    try:
        payload = response.json()
    except ValueError:  # an edge error page is not JSON
        response.raise_for_status()
        raise
    if not response.ok:
        error = payload["error"]
        raise RuntimeError(f"{response.status_code} {error['code']}: {error['message']} (request_id={error.get('request_id')})")
    return payload["data"]


def wait_for_task(task_id: str, timeout_seconds: int = 1800) -> dict:
    deadline = time.monotonic() + timeout_seconds
    while time.monotonic() < deadline:
        response = requests.get(f"{API}/v1/tasks/{task_id}", headers=HEADERS, timeout=30)
        if response.status_code == 429 or response.status_code >= 500:
            time.sleep(int(response.headers.get("Retry-After", 10)))
            continue
        response.raise_for_status()
        task = response.json()["data"]
        if task["status"] in ("succeeded", "failed"):
            return task
        time.sleep(task.get("poll_after_seconds", 5))
    raise TimeoutError(f"task {task_id} is still running; keep polling later")


task = create_task({
  "model": "minimax-h3-max-turbo",
  "prompt": "A slow cinematic push through a misty mountain village at dawn, smoke rising from the chimneys",
  "duration": 5,
  "resolution": "768P"
})
print("created", task["id"])
task = wait_for_task(task["id"])
if task["status"] == "failed":
    raise SystemExit(f"{task['error_code']}: {task['error_message']}")
for item in task["output"]["media"]:
    print(item["url"])
```## 課金- 動画の秒数で課金します。リクエストした `duration` に、選んだ解像度の単価を掛けたもので、480P では 1 秒あたり約 $0.025、768P では 1 秒あたり約 $0.04 です。以下の定価は 8 秒分です。
- 同じ解像度で `minimax-h3-max` の半額です。
- フレームの数と `seed` は料金に影響しません。
- 料金はタスクの作成時に確保されます。タスクの `usage.billable_duration_seconds` に、課金された秒数が表示されます。
- 失敗したタスクは、送信後にモデレーションで拒否されたものも含め、全額返金されます。現在の定価です。[料金](https://beatapi.io/pricing)ページと同じ金額です。割引を個別に契約しているアカウントでは、より低い金額になります。実際に課金された金額は、タスクの `data.usage` で確認できます。| オプション      | 定価（USD） |
| ---------- | ------- |
| 8 秒 · 480P | \$0.2   |
| 8 秒 · 768P | \$0.32  |## よくあるエラー| エラーまたは症状                                                                  | 原因                                                                                                                   | 対処                                                                       |
| ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| 400 `"resolution" must be one of: [480P 768P]`                            | 小文字（`768p`）、または `1080P` / `2K` を送っています。このモデルは 2 段階で、大文字で指定します。                                                       | `480P` または `768P` を送ってください。                                              |
| 400 `"duration" is outside its supported range`                           | 5 未満、整数ではない、または文字列として送っています。                                                                                         | 5 以上の整数を送ってください。                                                         |
| 400 `field "aspect_ratio" is not supported by model minimax-h3-max-turbo` | このモデルには `aspect_ratio` フィールドがありません（`reference_images`、`reference_videos`、`reference_audios`、`generate_audio` も同様です）。 | そのフィールドを削除してください。参照入力には `minimax-h3-fast` または `minimax-h3-normal` を使います。 |
| 400 `"images" accepts at most 2 items`                                    | 開始フレームと終了フレームの 2 枚を超えています。                                                                                           | 画像を 1 枚または 2 枚送ってください。                                                   |
| 400 `"seed" is outside its supported range`                               | 負の値や小数のシード値です。                                                                                                       | 0 以上の整数を送るか、`seed` を省略してください。                                            |
| タスクが `failed` になり、`content_policy_violation` が返る                          | プロンプト、入力、または結果がモデレーションで拒否されました。                                                                                      | プロンプトや入力を変更してください。同じ内容で再試行しても再び失敗します。課金はされません。                           |
| 402 `insufficient_credits`                                                | 残高が、リクエストで確保する料金に足りていません。                                                                                            | チャージするか、`duration` または `resolution` を下げてください。                            |## HTTP エラー早見表タスクが作られる前のエラーは、2xx 以外のレスポンスで返されます。課金はされません。`error.code` または `error.retryable` で処理を分岐してください。`message` には問題の内容が示されます。全一覧と再試行のルールは[エラー](/errors)にあります。```json
{
  "error": {
    "code": "bad_request",
    "message": "\"prompt\" is required",
    "retryable": false,
    "request_id": "req_5f0c2a9e4b7d4e31"
  }
}
```| HTTP ステータス | `error.code`                                                                                  | 対処方法                                                                             |
| ---------- | --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| 400        | `bad_request`, `content_policy_violation`                                                     | リクエストを修正してください。メッセージにフィールド名が示されます。そのまま再試行しないでください。                               |
| 401        | `missing_api_key`, `invalid_api_key`（古いクライアントでは `unauthorized` が返ることがあります）                    | 有効なキーを `Authorization: Bearer <key>` で送信してください。                                  |
| 402        | `insufficient_credits`                                                                        | 残高をチャージするか、キーのクォータを引き上げてから、再度送信してください。                                           |
| 403        | `forbidden`                                                                                   | このキーまたはアカウントでは、このモデルを利用できない可能性があります（たとえば、無料クレジットは一部のモデルにのみ使えます）。そのまま再試行しないでください。 |
| 404        | `not_found`                                                                                   | `GET /v1/tasks/{task_id}` の場合：このキーのアカウントに該当するタスクが存在しません。ID を確認してください。            |
| 409        | `idempotency_conflict`                                                                        | 新しい `Idempotency-Key` を使うか、同じキーの最初のリクエストが完了するまで待ってください。                          |
| 429        | `rate_limit_exceeded`                                                                         | `Retry-After` の秒数（`error.retry_after_seconds` にも含まれます）だけ待ってから再試行してください。          |
| 500        | `internal_error`                                                                              | バックオフを入れて再試行してください。解消しない場合は、`request_id` を添えてサポートにお問い合わせください。                    |
| 503        | `processing_unavailable`, `processing_timeout`, `processing_failed`, `result_transfer_failed` | 課金はされていません。指数バックオフで再試行してください。                                                    |

Reference: https://docs.beatapi.io/api-reference/video-api/minimax-h3-max-turbo

## Authentication

- `Authorization` header (bearer token, required) — Send your API key as `Authorization: Bearer <BEATAPI_API_KEY>`.

## Servers

- `https://api.beatapi.io` (Direct, default)
- `https://api.beatapi.io` (API)

## Request

### Headers

- `Idempotency-Key` (string, optional) — ボディは JSON で送信し、`Content-Type: application/json` を指定します。`Idempotency-Key` は任意です。論理的に 1 件のリクエストごとに一意の値（255 文字以内）を送り、まったく同じボディを再試行するときだけ再利用してください。24 時間以内に同じキーと同じボディで再試行すると、最初のレスポンスが `Idempotent-Replayed: true` 付きで再度返されます。同じキーで異なるボディを送ると `409 idempotency_conflict` が返ります。2xx 以外のレスポンスは保存されないため、400 や 402 の後の再試行は改めて実行されます。

### Body (application/json)

This endpoint expects a MinimaxH3MaxTurboVideoRequest.

- `model` (enum, required) — 実行するモデルです。 **値**：`minimax-h3-max-turbo` **値が正しくない場合** - 指定がない：`"model" is required` - 画像モデルをこのエンドポイントに送った：`"model" nano-banana-2 is served by POST /v1/images/tasks, not this endpoint`
  - Allowed values: `minimax-h3-max-turbo`
- `prompt` (string, required) — ショットで起こることを記述します。動き、表情、カメラ、スタイルなどです。 **長さ**：1–5000 文字 - 長さは文字数で数えます（CJK の文字も 1 文字です）。 - フレームを使う場合は、動画が一方からもう一方へどう移るか、または開始フレームの後に何が動くかを書いてください。 **値が正しくない場合** - 指定がない：`"prompt" is required` - 空、または上限を超えている：`"prompt" has an unsupported length`
- `duration` (integer, optional, default: 5) — 動画の長さを秒単位で指定する、5 以上の整数です。 **デフォルト**：`5` **範囲**：≥ 5 - 省略すると `5` が使われます。 - 料金はこの値に応じて決まります（「課金」を参照）。 **値が正しくない場合** - 5 秒未満、または整数ではない：`"duration" is outside its supported range`
- `images` (list of string, optional) — 開始フレーム、または開始フレームと終了フレームです。 **要素数**：1–2 各要素は公開されている `https://` の URL です。ローカルファイルは先に [アップロード](/quick-guide#upload-an-input-file)（`POST /v1/files`）し、返された `data.url` を渡してください。 - リンク 1 個：動画はこの画像から始まります。リンク 2 個：`images[0]` が開始フレーム、`images[1]` が終了フレームです。 - このモデルは参照画像を受け付けません（`reference_images` は拒否されます）。 **値が正しくない場合** - リンクが 3 個以上：`"images" accepts at most 2 items` - https:// のリンクではない：`"images[0]" must be a public HTTPS URL`
- `resolution` (enum, optional, default: 768P) — 出力の解像度です。768P は 480P より 1 秒あたりの料金が高くなります。 **指定できる値**：`480P`, `768P` **デフォルト**：`768P` - 大文字のみです。`768p` は拒否されます。 - 1080P と 2K はここでは提供していません。1080p は `minimax-h3-normal`、2K は `minimax-h3-fast` で利用できます。 **値が正しくない場合** - 一覧にない値（たとえば `768p`、`1080P`、`2K`）：`"resolution" must be one of: [480P 768P]`
  - Allowed values: `480P`, `768P`
- `seed` (integer, optional) — 生成を固定するためのシード値です。省略するとランダムなシードになります。 **範囲**：≥ 0 - 0 以上の整数です。 **値が正しくない場合** - 負の値、または整数ではない：`"seed" is outside its supported range`

## Response

### 201

タスクオブジェクトです。タスクが成功するまで `output` は `null` です。「実行中」と記載されたフィールドは、タスクの完了後に表示されなくなります。

- `map from string to any`

## Errors

### 400 Bad Request Error

`bad_request`, `content_policy_violation` リクエストを修正してください。メッセージにフィールド名が示されます。そのまま再試行しないでください。

- `map from string to any`

### 401 Unauthorized Error

`missing_api_key`, `invalid_api_key`（古いクライアントでは `unauthorized` が返ることがあります） 有効なキーを `Authorization: Bearer <key>` で送信してください。

- `map from string to any`

### 402 Payment Required Error

`insufficient_credits` 残高をチャージするか、キーのクォータを引き上げてから、再度送信してください。

- `map from string to any`

### 403 Forbidden Error

`forbidden` このキーまたはアカウントでは、このモデルを利用できない可能性があります（たとえば、無料クレジットは一部のモデルにのみ使えます）。そのまま再試行しないでください。

- `map from string to any`

### 409 Conflict Error

`idempotency_conflict` 新しい `Idempotency-Key` を使うか、同じキーの最初のリクエストが完了するまで待ってください。

- `map from string to any`

### 429 Too Many Requests Error

`rate_limit_exceeded` `Retry-After` の秒数（`error.retry_after_seconds` にも含まれます）だけ待ってから再試行してください。

- `map from string to any`

### 500 Internal Server Error

`internal_error` バックオフを入れて再試行してください。解消しない場合は、`request_id` を添えてサポートにお問い合わせください。

- `map from string to any`

### 503 Service Unavailable Error

`processing_unavailable`, `processing_timeout`, `processing_failed`, `result_transfer_failed` 課金はされていません。指数バックオフで再試行してください。

- `map from string to any`

## Examples

### テキストから動画

**Request**

```json
{
  "model": "minimax-h3-max-turbo",
  "prompt": "A slow cinematic push through a misty mountain village at dawn, smoke rising from the chimneys",
  "duration": 5,
  "resolution": "768P"
}
```

**Response**

```json
{
  "data": {
    "capability_id": "minimax-h3-max-turbo",
    "capability_version": 1,
    "completed_at": null,
    "created_at": 1791993600,
    "error_code": null,
    "error_message": null,
    "id": "task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ",
    "media_type": "video",
    "model": "minimax-h3-max-turbo",
    "object": "task",
    "output": null,
    "poll_after_seconds": 8,
    "request_id": "req_5f0c2a9e4b7d4e31",
    "stage": "queued",
    "status": "queued",
    "task_kind": "video",
    "updated_at": 1791993600,
    "usage": {
      "billable_duration_seconds": 5,
      "credits_charged": 0.2,
      "credits_refunded": 0,
      "credits_reserved": 0.2,
      "credits_settled": 0
    }
  }
}
```

**SDK Code**

```python テキストから動画
import requests

url = "https://api.beatapi.io/v1/videos/tasks"

payload = {
    "model": "minimax-h3-max-turbo",
    "prompt": "A slow cinematic push through a misty mountain village at dawn, smoke rising from the chimneys",
    "duration": 5,
    "resolution": "768P"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript テキストから動画
const url = 'https://api.beatapi.io/v1/videos/tasks';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"model":"minimax-h3-max-turbo","prompt":"A slow cinematic push through a misty mountain village at dawn, smoke rising from the chimneys","duration":5,"resolution":"768P"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go テキストから動画
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.beatapi.io/v1/videos/tasks"

	payload := strings.NewReader("{\n  \"model\": \"minimax-h3-max-turbo\",\n  \"prompt\": \"A slow cinematic push through a misty mountain village at dawn, smoke rising from the chimneys\",\n  \"duration\": 5,\n  \"resolution\": \"768P\"\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(res)
	fmt.Println(string(body))

}
```

```ruby テキストから動画
require 'uri'
require 'net/http'

url = URI("https://api.beatapi.io/v1/videos/tasks")

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\": \"minimax-h3-max-turbo\",\n  \"prompt\": \"A slow cinematic push through a misty mountain village at dawn, smoke rising from the chimneys\",\n  \"duration\": 5,\n  \"resolution\": \"768P\"\n}"

response = http.request(request)
puts response.read_body
```

```java テキストから動画
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.beatapi.io/v1/videos/tasks")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"model\": \"minimax-h3-max-turbo\",\n  \"prompt\": \"A slow cinematic push through a misty mountain village at dawn, smoke rising from the chimneys\",\n  \"duration\": 5,\n  \"resolution\": \"768P\"\n}")
  .asString();
```

```php テキストから動画
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.beatapi.io/v1/videos/tasks', [
  'body' => '{
  "model": "minimax-h3-max-turbo",
  "prompt": "A slow cinematic push through a misty mountain village at dawn, smoke rising from the chimneys",
  "duration": 5,
  "resolution": "768P"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp テキストから動画
using RestSharp;

var client = new RestClient("https://api.beatapi.io/v1/videos/tasks");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"model\": \"minimax-h3-max-turbo\",\n  \"prompt\": \"A slow cinematic push through a misty mountain village at dawn, smoke rising from the chimneys\",\n  \"duration\": 5,\n  \"resolution\": \"768P\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift テキストから動画
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "model": "minimax-h3-max-turbo",
  "prompt": "A slow cinematic push through a misty mountain village at dawn, smoke rising from the chimneys",
  "duration": 5,
  "resolution": "768P"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beatapi.io/v1/videos/tasks")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### 開始フレーム

**Request**

```json
{
  "model": "minimax-h3-max-turbo",
  "prompt": "The performer turns toward the camera as neon light sweeps across the stage",
  "duration": 5,
  "images": [
    "https://media.beatapi.io/samples/neon-singer.png"
  ],
  "resolution": "768P"
}
```

**Response**

```json
{
  "data": {
    "capability_id": "minimax-h3-max-turbo",
    "capability_version": 1,
    "completed_at": null,
    "created_at": 1791993600,
    "error_code": null,
    "error_message": null,
    "id": "task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ",
    "media_type": "video",
    "model": "minimax-h3-max-turbo",
    "object": "task",
    "output": null,
    "poll_after_seconds": 8,
    "request_id": "req_5f0c2a9e4b7d4e31",
    "stage": "queued",
    "status": "queued",
    "task_kind": "video",
    "updated_at": 1791993600
  }
}
```

**SDK Code**

```python 開始フレーム
import requests

url = "https://api.beatapi.io/v1/videos/tasks"

payload = {
    "model": "minimax-h3-max-turbo",
    "prompt": "The performer turns toward the camera as neon light sweeps across the stage",
    "duration": 5,
    "images": ["https://media.beatapi.io/samples/neon-singer.png"],
    "resolution": "768P"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript 開始フレーム
const url = 'https://api.beatapi.io/v1/videos/tasks';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"model":"minimax-h3-max-turbo","prompt":"The performer turns toward the camera as neon light sweeps across the stage","duration":5,"images":["https://media.beatapi.io/samples/neon-singer.png"],"resolution":"768P"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 開始フレーム
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.beatapi.io/v1/videos/tasks"

	payload := strings.NewReader("{\n  \"model\": \"minimax-h3-max-turbo\",\n  \"prompt\": \"The performer turns toward the camera as neon light sweeps across the stage\",\n  \"duration\": 5,\n  \"images\": [\n    \"https://media.beatapi.io/samples/neon-singer.png\"\n  ],\n  \"resolution\": \"768P\"\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(res)
	fmt.Println(string(body))

}
```

```ruby 開始フレーム
require 'uri'
require 'net/http'

url = URI("https://api.beatapi.io/v1/videos/tasks")

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\": \"minimax-h3-max-turbo\",\n  \"prompt\": \"The performer turns toward the camera as neon light sweeps across the stage\",\n  \"duration\": 5,\n  \"images\": [\n    \"https://media.beatapi.io/samples/neon-singer.png\"\n  ],\n  \"resolution\": \"768P\"\n}"

response = http.request(request)
puts response.read_body
```

```java 開始フレーム
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.beatapi.io/v1/videos/tasks")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"model\": \"minimax-h3-max-turbo\",\n  \"prompt\": \"The performer turns toward the camera as neon light sweeps across the stage\",\n  \"duration\": 5,\n  \"images\": [\n    \"https://media.beatapi.io/samples/neon-singer.png\"\n  ],\n  \"resolution\": \"768P\"\n}")
  .asString();
```

```php 開始フレーム
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.beatapi.io/v1/videos/tasks', [
  'body' => '{
  "model": "minimax-h3-max-turbo",
  "prompt": "The performer turns toward the camera as neon light sweeps across the stage",
  "duration": 5,
  "images": [
    "https://media.beatapi.io/samples/neon-singer.png"
  ],
  "resolution": "768P"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp 開始フレーム
using RestSharp;

var client = new RestClient("https://api.beatapi.io/v1/videos/tasks");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"model\": \"minimax-h3-max-turbo\",\n  \"prompt\": \"The performer turns toward the camera as neon light sweeps across the stage\",\n  \"duration\": 5,\n  \"images\": [\n    \"https://media.beatapi.io/samples/neon-singer.png\"\n  ],\n  \"resolution\": \"768P\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift 開始フレーム
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "model": "minimax-h3-max-turbo",
  "prompt": "The performer turns toward the camera as neon light sweeps across the stage",
  "duration": 5,
  "images": ["https://media.beatapi.io/samples/neon-singer.png"],
  "resolution": "768P"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beatapi.io/v1/videos/tasks")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### 開始フレームと終了フレーム

**Request**

```json
{
  "model": "minimax-h3-max-turbo",
  "prompt": "The camera moves smoothly from the bottle on the table to the singer on a neon stage in one continuous shot",
  "duration": 6,
  "images": [
    "https://media.beatapi.io/samples/smart-bottle.png",
    "https://media.beatapi.io/samples/neon-singer.png"
  ],
  "resolution": "480P",
  "seed": 42
}
```

**Response**

```json
{
  "data": {
    "capability_id": "minimax-h3-max-turbo",
    "capability_version": 1,
    "completed_at": null,
    "created_at": 1791993600,
    "error_code": null,
    "error_message": null,
    "id": "task_7Qm2Xc9LpR4vT8sKa1Nf6YbH3eWdJ0uZ",
    "media_type": "video",
    "model": "minimax-h3-max-turbo",
    "object": "task",
    "output": null,
    "poll_after_seconds": 8,
    "request_id": "req_5f0c2a9e4b7d4e31",
    "stage": "queued",
    "status": "queued",
    "task_kind": "video",
    "updated_at": 1791993600
  }
}
```

**SDK Code**

```python 開始フレームと終了フレーム
import requests

url = "https://api.beatapi.io/v1/videos/tasks"

payload = {
    "model": "minimax-h3-max-turbo",
    "prompt": "The camera moves smoothly from the bottle on the table to the singer on a neon stage in one continuous shot",
    "duration": 6,
    "images": ["https://media.beatapi.io/samples/smart-bottle.png", "https://media.beatapi.io/samples/neon-singer.png"],
    "resolution": "480P",
    "seed": 42
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript 開始フレームと終了フレーム
const url = 'https://api.beatapi.io/v1/videos/tasks';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"model":"minimax-h3-max-turbo","prompt":"The camera moves smoothly from the bottle on the table to the singer on a neon stage in one continuous shot","duration":6,"images":["https://media.beatapi.io/samples/smart-bottle.png","https://media.beatapi.io/samples/neon-singer.png"],"resolution":"480P","seed":42}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 開始フレームと終了フレーム
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.beatapi.io/v1/videos/tasks"

	payload := strings.NewReader("{\n  \"model\": \"minimax-h3-max-turbo\",\n  \"prompt\": \"The camera moves smoothly from the bottle on the table to the singer on a neon stage in one continuous shot\",\n  \"duration\": 6,\n  \"images\": [\n    \"https://media.beatapi.io/samples/smart-bottle.png\",\n    \"https://media.beatapi.io/samples/neon-singer.png\"\n  ],\n  \"resolution\": \"480P\",\n  \"seed\": 42\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(res)
	fmt.Println(string(body))

}
```

```ruby 開始フレームと終了フレーム
require 'uri'
require 'net/http'

url = URI("https://api.beatapi.io/v1/videos/tasks")

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\": \"minimax-h3-max-turbo\",\n  \"prompt\": \"The camera moves smoothly from the bottle on the table to the singer on a neon stage in one continuous shot\",\n  \"duration\": 6,\n  \"images\": [\n    \"https://media.beatapi.io/samples/smart-bottle.png\",\n    \"https://media.beatapi.io/samples/neon-singer.png\"\n  ],\n  \"resolution\": \"480P\",\n  \"seed\": 42\n}"

response = http.request(request)
puts response.read_body
```

```java 開始フレームと終了フレーム
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.beatapi.io/v1/videos/tasks")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"model\": \"minimax-h3-max-turbo\",\n  \"prompt\": \"The camera moves smoothly from the bottle on the table to the singer on a neon stage in one continuous shot\",\n  \"duration\": 6,\n  \"images\": [\n    \"https://media.beatapi.io/samples/smart-bottle.png\",\n    \"https://media.beatapi.io/samples/neon-singer.png\"\n  ],\n  \"resolution\": \"480P\",\n  \"seed\": 42\n}")
  .asString();
```

```php 開始フレームと終了フレーム
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.beatapi.io/v1/videos/tasks', [
  'body' => '{
  "model": "minimax-h3-max-turbo",
  "prompt": "The camera moves smoothly from the bottle on the table to the singer on a neon stage in one continuous shot",
  "duration": 6,
  "images": [
    "https://media.beatapi.io/samples/smart-bottle.png",
    "https://media.beatapi.io/samples/neon-singer.png"
  ],
  "resolution": "480P",
  "seed": 42
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp 開始フレームと終了フレーム
using RestSharp;

var client = new RestClient("https://api.beatapi.io/v1/videos/tasks");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"model\": \"minimax-h3-max-turbo\",\n  \"prompt\": \"The camera moves smoothly from the bottle on the table to the singer on a neon stage in one continuous shot\",\n  \"duration\": 6,\n  \"images\": [\n    \"https://media.beatapi.io/samples/smart-bottle.png\",\n    \"https://media.beatapi.io/samples/neon-singer.png\"\n  ],\n  \"resolution\": \"480P\",\n  \"seed\": 42\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift 開始フレームと終了フレーム
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "model": "minimax-h3-max-turbo",
  "prompt": "The camera moves smoothly from the bottle on the table to the singer on a neon stage in one continuous shot",
  "duration": 6,
  "images": ["https://media.beatapi.io/samples/smart-bottle.png", "https://media.beatapi.io/samples/neon-singer.png"],
  "resolution": "480P",
  "seed": 42
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beatapi.io/v1/videos/tasks")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```