メインコンテンツへスキップ
POST
https://api.apimart.ai
/
v1
/
videos
/
generations
curl --request POST \
  --url https://api.apimart.ai/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "sora-2-preview",
    "prompt": "A majestic waterfall cascading down rocky cliffs, creating a beautiful rainbow in the mist",
    "duration": 8,
    "aspect_ratio": "landscape",
    "image_urls": ["https://example.com/reference-image.jpg"]
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KG1Q38PBV1RJ2C033ZS9RYF7"
    }
  ]
}
curl --request POST \
  --url https://api.apimart.ai/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "sora-2-preview",
    "prompt": "A majestic waterfall cascading down rocky cliffs, creating a beautiful rainbow in the mist",
    "duration": 8,
    "aspect_ratio": "landscape",
    "image_urls": ["https://example.com/reference-image.jpg"]
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KG1Q38PBV1RJ2C033ZS9RYF7"
    }
  ]
}

認証

Authorization
string
必須
すべてのインターフェースはBearer Token認証が必要ですAPI Keyの取得:API Key管理ページにアクセスしてAPI Keyを取得してくださいリクエストヘッダーに追加:
Authorization: Bearer YOUR_API_KEY

Body

model
string
デフォルト:"sora-2-preview"
必須
動画生成モデル名サポートされているモデル:
  • sora-2-preview - スタンダード版
  • sora-2-pro-preview - Pro版(より高い解像度をサポート)
例:"sora-2-preview" または "sora-2-pro-preview"
prompt
string
必須
動画生成のテキスト説明生成したい動画の内容を詳細に説明してください。シーン、アクション、雰囲気などを含めます。例:"A majestic waterfall cascading down rocky cliffs, creating a beautiful rainbow in the mist"
duration
integer
デフォルト:"4"
動画の長さ(秒)以下の長さの値のみサポート
  • 4 - 4秒動画
  • 8 - 8秒動画
  • 12 - 12秒動画
その他の長さの値はエラーを返します。例:8
aspect_ratio
string
デフォルト:"landscape"
動画のアスペクト比サポートされている形式:
  • landscape または 16:9 - 横向き (16:9)
  • portrait または 9:16 - 縦向き (9:16)
square (1:1) 動画はサポートされていません例:"landscape"
resolution
string
デフォルト:"standard"
動画解像度(sora-2-pro-previewのみサポート)サポートされている値:
  • standard - 標準解像度(縦向き 720x1280、横向き 1280x720)
  • high - 高解像度(縦向き 1024x1792、横向き 1792x1024)
例:"high"
image_urls
array<url>
画像から動画生成用の参照画像URL配列重要な制限:最初の画像のみが参照として使用されます参照画像を使用すると、APIは画像のアスペクト比を自動的に検出し、ユーザーが提供したaspect_ratioパラメータを上書きします解決策
  • 出力動画のアスペクト比を正確に制御するには、参照画像を使用しないでください(純粋なテキストから動画)
  • 参照画像を使用する必要がある場合は、参照画像自体が目標のアスペクト比であることを確認してください
例:["https://example.com/reference-image.jpg"]制限:
  • 最大ファイルサイズ:10MB
  • サポート形式:.jpeg、.jpg、.png、.webp

Response

code
integer
レスポンスステータスコード、成功時は200
data
array
レスポンスデータ配列

料金

  • 課金方式:動画の長さ(秒)ごとに課金
  • 具体的な価格料金ページをご参照ください