runway-ml
テキストや画像から動画を生成したり、AIを使って動画編集をしたり、動画制作の工程を自動化したりするなど、AIを活用したクリエイティブな動画制作を支援するSkill。
📜 元の英語説明(参考)
Runway ML API for AI video generation and editing — Gen-3 Alpha Turbo, image-to-video, and video-to-video. Use when generating video from text or images, applying AI video effects, or automating creative video production pipelines.
🇯🇵 日本人クリエイター向け解説
テキストや画像から動画を生成したり、AIを使って動画編集をしたり、動画制作の工程を自動化したりするなど、AIを活用したクリエイティブな動画制作を支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o runway-ml.zip https://jpskill.com/download/15356.zip && unzip -o runway-ml.zip && rm runway-ml.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/15356.zip -OutFile "$d\runway-ml.zip"; Expand-Archive "$d\runway-ml.zip" -DestinationPath $d -Force; ri "$d\runway-ml.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
runway-ml.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
runway-mlフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Runway ML API
概要
Runway の Gen-3 Alpha Turbo モデルは、テキストプロンプトまたは画像から高品質な動画を生成します。REST API は非同期タスクパターンに従います。タスクを作成し、完了をポーリングし、結果をダウンロードします。これを使用して、映画のようなクリップを作成したり、画像をアニメーション化したり、自動化された動画コンテンツパイプラインを構築したりできます。
セットアップ
pip install requests python-dotenv
export RUNWAY_API_KEY="your_api_key_here"
Base URL: https://api.dev.runwayml.com/v1
API docs: https://docs.runwayml.com
コアコンセプト
- Task: 非同期の動画生成ジョブです。
task_idをすぐに返します。 - Gen-3 Alpha Turbo: 最速の Gen-3 モデルです。プロダクションパイプラインに最適です。
- image-to-video (
gen3a_turbo): 静止画をアニメーション化して動かします。 - text-to-video: テキストプロンプトのみから動画を生成します。
- Duration: 5秒または10秒です。
- Ratio:
1280:720(横向き),720:1280(縦向き),1104:832,832:1104,960:960(正方形)です。
手順
ステップ 1: クライアントのセットアップ
import os
import time
import requests
API_KEY = os.environ["RUNWAY_API_KEY"]
BASE_URL = "https://api.dev.runwayml.com/v1"
HEADERS = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
"X-Runway-Version": "2024-11-06"
}
ステップ 2: Text-to-video 生成
def text_to_video(
prompt_text: str,
duration: int = 5,
ratio: str = "1280:720",
seed: int = None
) -> str:
"""Submit a text-to-video task and return the task_id."""
payload = {
"model": "gen3a_turbo",
"promptText": prompt_text,
"duration": duration,
"ratio": ratio
}
if seed is not None:
payload["seed"] = seed
r = requests.post(f"{BASE_URL}/image_to_video", json=payload, headers=HEADERS)
r.raise_for_status()
return r.json()["id"]
task_id = text_to_video(
prompt_text="A drone shot flying over a misty mountain valley at golden hour, cinematic, slow motion",
duration=5,
ratio="1280:720"
)
print(f"Task submitted: {task_id}")
ステップ 3: Image-to-video 生成
import base64
from pathlib import Path
def image_to_video(
image_path: str,
prompt_text: str = "",
duration: int = 5,
ratio: str = "1280:720",
seed: int = None
) -> str:
"""Animate an image into video. image_path can be a local file or URL."""
if image_path.startswith("http"):
prompt_image = image_path
else:
# Encode local file as data URI
img_bytes = Path(image_path).read_bytes()
ext = Path(image_path).suffix.lstrip(".").lower()
mime = {"jpg": "image/jpeg", "jpeg": "image/jpeg", "png": "image/png", "webp": "image/webp"}.get(ext, "image/png")
b64 = base64.b64encode(img_bytes).decode()
prompt_image = f"data:{mime};base64,{b64}"
payload = {
"model": "gen3a_turbo",
"promptImage": prompt_image,
"promptText": prompt_text,
"duration": duration,
"ratio": ratio
}
if seed is not None:
payload["seed"] = seed
r = requests.post(f"{BASE_URL}/image_to_video", json=payload, headers=HEADERS)
r.raise_for_status()
return r.json()["id"]
task_id = image_to_video(
image_path="product_shot.png",
prompt_text="The product slowly rotates, sparkling particles float around it, luxury feel",
duration=5,
ratio="1280:720"
)
print(f"Task submitted: {task_id}")
ステップ 4: タスクステータスのポーリング
def get_task(task_id: str) -> dict:
r = requests.get(f"{BASE_URL}/tasks/{task_id}", headers=HEADERS)
r.raise_for_status()
return r.json()
def wait_for_task(task_id: str, poll_interval: int = 5, timeout: int = 600) -> list[str]:
"""Poll until task completes; return list of output video URLs."""
start = time.time()
while True:
task = get_task(task_id)
status = task["status"]
progress = task.get("progress", 0)
print(f"[{int(time.time()-start)}s] Status: {status} ({int(progress*100)}%)")
if status == "SUCCEEDED":
return task["output"] # list of video URLs
elif status in ("FAILED", "CANCELLED"):
raise RuntimeError(f"Task {status}: {task.get('failure', '')}")
elif time.time() - start > timeout:
raise TimeoutError(f"Task not done after {timeout}s")
time.sleep(poll_interval)
output_urls = wait_for_task(task_id)
print(f"Video(s) ready: {output_urls}")
ステップ 5: 結果のダウンロード
def download_video(url: str, output_path: str = "output.mp4") -> str:
r = requests.get(url, stream=True)
r.raise_for_status()
with open(output_path, "wb") as f:
for chunk in r.iter_content(chunk_size=8192):
f.write(chunk)
size_mb = os.path.getsize(output_path) / 1024 / 1024
print(f"Saved: {output_path} ({size_mb:.1f} MB)")
return output_path
download_video(output_urls[0], "mountain_valley.mp4")
完全なパイプラインの例
def generate_and_download(prompt: str, output_path: str = "output.mp4", **kwargs) -> str:
"""One-shot: generate video from text and download it."""
print(f"Generating: {prompt[:80]}...")
task_id = text_to_video(prompt, **kwargs)
urls = wait_for_task(task_id)
return download_video(urls[0], output_path)
# Generate a product ad clip
generate_and_download(
prompt="Close-up of a sleek smartphone on a white desk, screen lights up, smooth camera pull-back",
output_path="product_ad.mp4",
duration=5,
ratio="1280:720"
)
パラメータリファレンス
| Parameter | Values | Description |
|---|---|---|
model |
gen3a_turbo |
Gen-3 Alpha Turbo (最速) を使用します |
duration |
5, 10 |
動画の長さ (秒) |
ratio |
1280:720, 720:1280, 1104:832, 832:1104, 960:960 |
解像度のアスペクト比 |
seed |
integer | 決定性のある出力のための再現性シード |
promptText |
string | 目的の動画を説明するテキストプロンプト |
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Runway ML API
Overview
Runway's Gen-3 Alpha Turbo model generates high-quality video from text prompts or images. The REST API follows an async task pattern: create a task, poll for completion, then download the result. Use it to produce cinematic clips, animate images, or build automated video content pipelines.
Setup
pip install requests python-dotenv
export RUNWAY_API_KEY="your_api_key_here"
Base URL: https://api.dev.runwayml.com/v1
API docs: https://docs.runwayml.com
Core Concepts
- Task: An async video generation job. Returns a
task_idimmediately. - Gen-3 Alpha Turbo: Fastest Gen-3 model — best for production pipelines.
- image-to-video (
gen3a_turbo): Animate a still image into motion. - text-to-video: Generate video purely from a text prompt.
- Duration: 5 or 10 seconds.
- Ratio:
1280:720(landscape),720:1280(portrait),1104:832,832:1104,960:960(square).
Instructions
Step 1: Set up the client
import os
import time
import requests
API_KEY = os.environ["RUNWAY_API_KEY"]
BASE_URL = "https://api.dev.runwayml.com/v1"
HEADERS = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
"X-Runway-Version": "2024-11-06"
}
Step 2: Text-to-video generation
def text_to_video(
prompt_text: str,
duration: int = 5,
ratio: str = "1280:720",
seed: int = None
) -> str:
"""Submit a text-to-video task and return the task_id."""
payload = {
"model": "gen3a_turbo",
"promptText": prompt_text,
"duration": duration,
"ratio": ratio
}
if seed is not None:
payload["seed"] = seed
r = requests.post(f"{BASE_URL}/image_to_video", json=payload, headers=HEADERS)
r.raise_for_status()
return r.json()["id"]
task_id = text_to_video(
prompt_text="A drone shot flying over a misty mountain valley at golden hour, cinematic, slow motion",
duration=5,
ratio="1280:720"
)
print(f"Task submitted: {task_id}")
Step 3: Image-to-video generation
import base64
from pathlib import Path
def image_to_video(
image_path: str,
prompt_text: str = "",
duration: int = 5,
ratio: str = "1280:720",
seed: int = None
) -> str:
"""Animate an image into video. image_path can be a local file or URL."""
if image_path.startswith("http"):
prompt_image = image_path
else:
# Encode local file as data URI
img_bytes = Path(image_path).read_bytes()
ext = Path(image_path).suffix.lstrip(".").lower()
mime = {"jpg": "image/jpeg", "jpeg": "image/jpeg", "png": "image/png", "webp": "image/webp"}.get(ext, "image/png")
b64 = base64.b64encode(img_bytes).decode()
prompt_image = f"data:{mime};base64,{b64}"
payload = {
"model": "gen3a_turbo",
"promptImage": prompt_image,
"promptText": prompt_text,
"duration": duration,
"ratio": ratio
}
if seed is not None:
payload["seed"] = seed
r = requests.post(f"{BASE_URL}/image_to_video", json=payload, headers=HEADERS)
r.raise_for_status()
return r.json()["id"]
task_id = image_to_video(
image_path="product_shot.png",
prompt_text="The product slowly rotates, sparkling particles float around it, luxury feel",
duration=5,
ratio="1280:720"
)
print(f"Task submitted: {task_id}")
Step 4: Poll for task status
def get_task(task_id: str) -> dict:
r = requests.get(f"{BASE_URL}/tasks/{task_id}", headers=HEADERS)
r.raise_for_status()
return r.json()
def wait_for_task(task_id: str, poll_interval: int = 5, timeout: int = 600) -> list[str]:
"""Poll until task completes; return list of output video URLs."""
start = time.time()
while True:
task = get_task(task_id)
status = task["status"]
progress = task.get("progress", 0)
print(f"[{int(time.time()-start)}s] Status: {status} ({int(progress*100)}%)")
if status == "SUCCEEDED":
return task["output"] # list of video URLs
elif status in ("FAILED", "CANCELLED"):
raise RuntimeError(f"Task {status}: {task.get('failure', '')}")
elif time.time() - start > timeout:
raise TimeoutError(f"Task not done after {timeout}s")
time.sleep(poll_interval)
output_urls = wait_for_task(task_id)
print(f"Video(s) ready: {output_urls}")
Step 5: Download the result
def download_video(url: str, output_path: str = "output.mp4") -> str:
r = requests.get(url, stream=True)
r.raise_for_status()
with open(output_path, "wb") as f:
for chunk in r.iter_content(chunk_size=8192):
f.write(chunk)
size_mb = os.path.getsize(output_path) / 1024 / 1024
print(f"Saved: {output_path} ({size_mb:.1f} MB)")
return output_path
download_video(output_urls[0], "mountain_valley.mp4")
Full pipeline example
def generate_and_download(prompt: str, output_path: str = "output.mp4", **kwargs) -> str:
"""One-shot: generate video from text and download it."""
print(f"Generating: {prompt[:80]}...")
task_id = text_to_video(prompt, **kwargs)
urls = wait_for_task(task_id)
return download_video(urls[0], output_path)
# Generate a product ad clip
generate_and_download(
prompt="Close-up of a sleek smartphone on a white desk, screen lights up, smooth camera pull-back",
output_path="product_ad.mp4",
duration=5,
ratio="1280:720"
)
Parameters reference
| Parameter | Values | Description |
|---|---|---|
model |
gen3a_turbo |
Use Gen-3 Alpha Turbo (fastest) |
duration |
5, 10 |
Video length in seconds |
ratio |
1280:720, 720:1280, 1104:832, 832:1104, 960:960 |
Resolution aspect ratio |
seed |
integer | Reproducibility seed for deterministic outputs |
promptText |
string | Text prompt describing the desired video |
promptImage |
URL or data URI | Starting image for image-to-video |
Guidelines
- Runway tasks take 30–120 seconds depending on duration and load.
- Output URLs expire after a period — download videos promptly after generation.
- Keep prompts descriptive and cinematic: include camera movement, lighting, mood.
- Use
seedto reproduce the same result when iterating on prompts. - For batch generation, queue tasks in parallel but respect rate limits (check HTTP 429 and retry after the
Retry-Afterheader value). - Store API keys in environment variables — never hardcode them.
- Check https://docs.runwayml.com for the latest model names and endpoints as they evolve rapidly.