> ## 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.

# Seedance-1.5-pro ビデオ生成

> - 非同期処理モード、後続のクエリに使用するタスクIDを返す
- テキストからビデオへの変換、画像からビデオへの変換（最初のフレーム/最後のフレーム/複数の参照画像）をサポート
- 横画面、縦画面の複数の比率をサポート


export const apiKeyUrl = 'https://aireiter.com/keys';

## Authorizations

<ParamField header="Authorization" type="string" required>
  すべてのエンドポイントはBearer Tokenによる認証が必要です。

  APIキーの取得：

  <a href={apiKeyUrl} target="_blank">API Key 管理ページ</a> にアクセスしてAPIキーを取得してください。

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

  ```
  Authorization: Bearer YOUR_API_KEY
  ```
</ParamField>

## Body

<ParamField body="model" type="string" required>
  モデル名

  固定値：`"seedance_1_5_pro"`
</ParamField>

<ParamField body="params" type="object" required>
  モデルパラメータオブジェクト

  <Expandable title="params オブジェクトのプロパティ">
    <ParamField body="prompt" type="string" required>
      動画生成のテキスト説明

      制限なし
    </ParamField>

    <ParamField body="video_length" type="number" default="5">
      動画の長さ（秒）

      対応可能な長さの範囲：4～12秒

      デフォルト値：5秒
    </ParamField>

    <ParamField body="aspect_ratio" type="string" required>
      動画のアスペクト比

      対応可能なアスペクト比：

      * `16:9` - 横向き
      * `9:16` - 縦向き
    </ParamField>

    <ParamField body="resolution" type="string" default="720p">
      動画の解像度

      対応可能な解像度：

      * `720p` - 標準画質
      * `1080p` - 高画質
    </ParamField>

    <ParamField body="image_url" type="string">
      動画生成の参考画像のURL（初期フレーム）

      * 画像は1枚のみ対応
      * 公開アクセス可能なURLをサポート
    </ParamField>

    <ParamField body="end_image_url" type="string">
      最終フレーム参考画像のURL

      * 画像は1枚のみ対応
      * 公開アクセス可能なURLをサポート
    </ParamField>

    <ParamField body="generate_audio" type="boolean" default="false">
      音声を生成するかどうか

      `true`に設定すると、動画にAI生成の音声が含まれます

      デフォルト値：`false`
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="out_task_id" type="string" required>
  発信元タスクID

  ユーザーが定義するタスク識別子（必須）
</ParamField>

### 解像度とアスペクト比の組み合わせ表

| アスペクト比 | 解像度   | 実際のサイズ    |
| ------ | ----- | --------- |
| 16:9   | 720p  | 1280x720  |
| 16:9   | 1080p | 1920x1080 |
| 9:16   | 720p  | 720x1280  |
| 9:16   | 1080p | 1080x1920 |

## Response

<ResponseField name="out_task_id" type="string">
  発行者のタスクID。結果の照会に使用可能
</ResponseField>

<ResponseField name="status" type="string">
  初期状態で、固定値は `"pending"`
</ResponseField>

<ResponseField name="estimated_credits" type="number">
  推定消費クレジット
</ResponseField>

<ResponseField name="created_at" type="string">
  作成日時（ISOフォーマット）
</ResponseField>

<RequestExample>
  ```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": "seedance_1_5_pro",
      "params": {
        "prompt": "日光の下で遊ぶかわいい子猫、ふわふわの毛並み、明るい目",
        "video_length": 5,
        "aspect_ratio": "16:9",
        "resolution": "720p"
      },
      "out_task_id": "my_task_123456"
    }'
  ```

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

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

  payload = {
      "model": "seedance_1_5_pro",
      "params": {
          "prompt": "日光の下で遊ぶかわいい子猫、ふわふわの毛並み、明るい目",
          "video_length": 5,
          "aspect_ratio": "16:9",
          "resolution": "720p"
      },
      "out_task_id": "my_task_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: "seedance_1_5_pro",
    params: {
      prompt: "日光の下で遊ぶかわいい子猫、ふわふわの毛並み、明るい目",
      video_length: 5,
      aspect_ratio: "16:9",
      resolution: "720p"
    },
    out_task_id: "my_task_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": "seedance_1_5_pro",
          "params": map[string]interface{}{
              "prompt":       "日光の下で遊ぶかわいい子猫、ふわふわの毛並み、明るい目",
              "video_length": 5,
              "aspect_ratio": "16:9",
              "resolution":   "720p",
          },
          "out_task_id": "my_task_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.io.BufferedReader;
  import java.io.InputStreamReader;
  import java.io.OutputStream;
  import java.net.HttpURLConnection;
  import java.net.URL;

  public class Main {
      public static void main(String[] args) {
          try {
              URL url = new URL("https://aireiter.com/api/openapi/submit");
              HttpURLConnection conn = (HttpURLConnection) url.openConnection();
              conn.setRequestMethod("POST");
              conn.setRequestProperty("Authorization", "Bearer <token>");
              conn.setRequestProperty("Content-Type", "application/json");
              conn.setDoOutput(true);

              String jsonPayload = "{\"model\":\"seedance_1_5_pro\",\"params\":{\"prompt\":\"日光の下で遊ぶかわいい子猫、ふわふわの毛並み、明るい目\",\"video_length\":5,\"aspect_ratio\":\"16:9\",\"resolution\":\"720p\"},\"out_task_id\":\"my_task_123456\"}";

              OutputStream os = conn.getOutputStream();
              os.write(jsonPayload.getBytes());
              os.flush();
              os.close();

              BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
              String line;
              StringBuilder response = new StringBuilder();
              while ((line = br.readLine()) != null) {
                  response.append(line);
              }
              br.close();

              System.out.println(response.toString());
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  }
  ```

  ```php PHP theme={null}
  <?php
  $url = "https://aireiter.com/api/openapi/submit";

  $payload = array(
      "model" => "seedance_1_5_pro",
      "params" => array(
          "prompt" => "日光の下で遊ぶかわいい子猫、ふわふわの毛並み、明るい目",
          "video_length" => 5,
          "aspect_ratio" => "16:9",
          "resolution" => "720p"
      ),
      "out_task_id" => "my_task_123456"
  );

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

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

  echo $response;
  ?>
  ```

  ```ruby Ruby theme={null}
  require 'net/http'
  require 'json'
  require 'uri'

  url = URI.parse("https://aireiter.com/api/openapi/submit")

  payload = {
    model: "seedance_1_5_pro",
    params: {
      prompt: "日光の下で遊ぶかわいい子猫、ふわふわの毛並み、明るい目",
      video_length: 5,
      aspect_ratio: "16:9",
      resolution: "720p"
    },
    out_task_id: "my_task_123456"
  }

  http = Net::HTTP.new(url.host, url.port)
  http.use_ssl = true
  request = Net::HTTP::Post.new(url.path)
  request["Authorization"] = "Bearer <token>"
  request["Content-Type"] = "application/json"
  request.body = payload.to_json

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

  ```swift Swift theme={null}
  import Foundation

  let url = URL(string: "https://aireiter.com/api/openapi/submit")!
  var request = URLRequest(url: url)
  request.httpMethod = "POST"
  request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")
  request.setValue("application/json", forHTTPHeaderField: "Content-Type")

  let payload: [String: Any] = [
      "model": "seedance_1_5_pro",
      "params": [
          "prompt": "日光の下で遊ぶかわいい子猫、ふわふわの毛並み、明るい目",
          "video_length": 5,
          "aspect_ratio": "16:9",
          "resolution": "720p"
      ],
      "out_task_id": "my_task_123456"
  ]

  request.httpBody = try? JSONSerialization.data(withJSONObject: payload)

  let task = URLSession.shared.dataTask(with: request) { data, response, error in
      if let data = data {
          print(String(data: data, encoding: .utf8) ?? "")
      }
  }
  task.resume()
  ```

  ```csharp C# theme={null}
  using System;
  using System.Net.Http;
  using System.Text;
  using System.Threading.Tasks;

  class Program
  {
      static async Task Main(string[] args)
      {
          var url = "https://aireiter.com/api/openapi/submit";
          var payload = "{\"model\":\"seedance_1_5_pro\",\"params\":{\"prompt\":\"日光の下で遊ぶかわいい子猫、ふわふわの毛並み、明るい目\",\"video_length\":5,\"aspect_ratio\":\"16:9\",\"resolution\":\"720p\"},\"out_task_id\":\"my_task_123456\"}";

          using (var client = new HttpClient())
          {
              client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>");
              var content = new StringContent(payload, Encoding.UTF8, "application/json");
              var response = await client.PostAsync(url, content);
              var result = await response.Content.ReadAsStringAsync();
              Console.WriteLine(result);
          }
      }
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "statusCode": 200,
    "message": "",
    "data": {
        "out_task_id": "my_task_123456",
        "status": "pending",
        "estimated_credits": 100,
        "created_at": "2025-12-22T06: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": "サーバー内部エラー。しばらくしてから再試行してください"
    }
  }
  ```
</ResponseExample>
