メインコンテンツへスキップ
POST
/
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": "kling-v2-6-motion-control",
    "prompt": "参考動画に合わせてキャラクターが振り向いて手を振る動作を行う、映画的な照明",
    "image_url": "https://example.com/ref-image.png",
    "video_url": "https://example.com/ref-video-8s.mp4",
    "keep_original_sound": "yes",
    "character_orientation": "image",
    "mode": "std",
    "watermark_info": {"enabled": false}
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.apimart.ai/llms.txt

Use this file to discover all available pages before exploring further.

curl --request POST \
  --url https://api.apimart.ai/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "kling-v2-6-motion-control",
    "prompt": "参考動画に合わせてキャラクターが振り向いて手を振る動作を行う、映画的な照明",
    "image_url": "https://example.com/ref-image.png",
    "video_url": "https://example.com/ref-video-8s.mp4",
    "keep_original_sound": "yes",
    "character_orientation": "image",
    "mode": "std",
    "watermark_info": {"enabled": false}
  }'
{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ"
    }
  ]
}

認証

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

リクエストパラメータ

model
string
必須
モデル名:kling-v3-motion-control または kling-v2-6-motion-control
prompt
string
動作・カメラ・スタイルを補足するテキストプロンプト省略可能ですが、具体的に記述するほど安定した結果が得られます例:"キャラクターが参考動画に合わせて踊る、滑らかな動き、リアルなスタイル"
image_url
string
必須
参考画像 URL公開アクセス可能なリンクを指定してください
video_url
string
必須
参考動画 URL公開アクセス可能な直リンクを指定してください。mp4/mov 推奨、100MB 以内
サーバーが video_url の実際の時間を検出します。最短は 3 秒、上限は character_orientation によって決まります。
keep_original_sound
string
デフォルト:"yes"
参考動画の元の音声を保持するかどうか選択肢:
  • yes:元の音声を保持(デフォルト)
  • no:元の音声を保持しない
character_orientation
string
必須
キャラクターの向きの制御方式選択肢:
  • image:参考画像のキャラクターの向きを使用(参考動画の時間:3~10s
  • video:参考動画のキャラクターの向きを使用(参考動画の時間:3~30s
mode
string
必須
生成モード選択肢:
  • std:標準モード(速度と品質のバランス)
  • pro:高品質モード(処理時間が長くなります)
watermark_info
object
ウォーターマーク制御オブジェクト(オプション)

時間ルール

条件参考動画の許容時間
character_orientation = image3s ~ 10s
character_orientation = video3s ~ 30s
課金時間は、サーバーが video_url から検出した実際の時間によって決まります。クライアント側の推定値ではありません。

レスポンス

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

使用例

例 1:image 方向(10 秒以内)

{
  "model": "kling-v2-6-motion-control",
  "prompt": "参考画像のキャラクターの向きに合わせて振り向いて手を振る",
  "image_url": "https://example.com/ref-image.png",
  "video_url": "https://example.com/ref-video-8s.mp4",
  "character_orientation": "image",
  "mode": "std",
  "keep_original_sound": "yes",
  "watermark_info": {"enabled": false}
}

例 2:video 方向(30 秒以内)

{
  "model": "kling-v2-6-motion-control",
  "prompt": "参考動画のキャラクターの向きとリズムに合わせて、滑らかな動きを維持する",
  "image_url": "https://example.com/ref-image.png",
  "video_url": "https://example.com/ref-video-12s.mp4",
  "character_orientation": "video",
  "mode": "pro",
  "keep_original_sound": "no",
  "watermark_info": {"enabled": false}
}