Kling 3.0 Pro Image to Video API: AI画像から動画生成

Muapi REST API経由でKling 3.0 Pro Image to Videoを使用して画像を動画化。従量課金制 — サブスクリプション不要。

インタラクティブなモデルコントロール

MuAPIの低遅延APIを通じてkling-v3.0-pro-image-to-videoモデルを統合。従量課金制で柔軟かつスケーラブルに利用可能です。

Kling 3.0 Pro Image to Video APIリファレンス

エンドポイント

POST https://api.muapi.ai/api/v1/kling-v3.0-pro-image-to-video

x-api-keyヘッダーにMuapi APIキーを設定してタスクを送信し、 https://api.muapi.ai/api/v1/predictions/{request_id}/result ステータスがcompletedになるまでポーリングします。

パラメータ

名前型必須説明
promptstringはい生成する動画の内容を記述するプロンプト。
image_urlstringはい処理の開始点となる入力元画像のURLまたはBase64データ。
last_imagestringいいえ生成プロセスを適切に制御するためのパラメータ設定(URL of the input last image.)。
durationintいいえ生成する動画または音声の長さ(秒単位)。デフォルト: 5
generate_audiobooleanいいえ生成プロセスを適切に制御するためのパラメータ設定(Whether to generate audio for the video)。デフォルト: true

cURLの例

REQUEST_ID=$(curl -s -X POST https://api.muapi.ai/api/v1/kling-v3.0-pro-image-to-video \
  -H "x-api-key: $MUAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"<prompt>","image_url":"https://example.com/your-image_url"}' | jq -r .request_id)

curl -s https://api.muapi.ai/api/v1/predictions/$REQUEST_ID/result -H "x-api-key: $MUAPI_API_KEY"

Pythonの例

import os, time, requests

API = "https://api.muapi.ai/api/v1"
headers = {"x-api-key": os.environ["MUAPI_API_KEY"]}

r = requests.post(f"{API}/kling-v3.0-pro-image-to-video", headers=headers, json={"prompt":"<prompt>","image_url":"https://example.com/your-image_url"})
request_id = r.json()["request_id"]

while True:
    res = requests.get(f"{API}/predictions/{request_id}/result", headers=headers).json()
    if res["status"] == "completed":
        print(res["outputs"]); break
    if res["status"] == "failed":
        raise RuntimeError(res.get("error"))
    time.sleep(3)

完全なドキュメントとエージェント/MCP統合: llms.txt. APIキーの取得はこちら: muapi.ai/access-keys.