Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

runway-ml

БесплатноБез исполняемых скриптовНе проверен

Runway ML API generates and edits AI video and images from text, images or video, with models such as Gen-4.5, Gen-4 Turbo and Aleph 2.0. Use when generating…

TerminalSkillsот TerminalSkills★ 221 звезда на GitHub

Об этом скилле

Runway ML API

Overview

Runway's developer API (docs.dev.runwayml.com) exposes video, image, audio and upscaling models behind one task pattern: POST a generation request, receive a task id, poll the task until it is SUCCEEDED, then download the output. The older Gen-3 Alpha Turbo model (gen3a_turbo) is no longer in the model list; current video models include gen4.5, gen4_turbo, aleph2 (video editing), veo3.1, seedance2_5, hailuo3, wan3 and others. Model identifiers change, so check https://docs.dev.runwayml.com/guides/models before hard-coding one. Official SDKs: runwayml (Python) and @runwayml/sdk (Node.js).

Instructions

Setup

Create an API key in the Runway developer portal (dev.runway.com), buy credits, and export the key. The SDKs read RUNWAYML_API_SECRET automatically.

pip install runwayml          # or: npm install @runwayml/sdk
export RUNWAYML_API_SECRET="key_live_from_dev_portal"

REST base URL is https://api.dev.runwayml.com/v1; every request needs Authorization: Bearer $RUNWAYML_API_SECRET and X-Runway-Version: 2024-11-06.

Choose an endpoint and model

Endpoint Use Models (examples)
POST /v1/text_to_video prompt only gen4.5, veo3.1, veo3.1_fast, seedance2, wan3
POST /v1/image_to_video animate a still gen4.5, gen4_turbo, veo3.1, seedance2_5
POST /v1/video_to_video edit or restyle a clip aleph2 (input at most 30 s), seedance2
POST /v1/text_to_image stills and reference images gen4_image, gen4_image_turbo, gemini_2.5_flash
GET /v1/tasks/{id} status and output -

Allowed ratio and duration depend on the model. For gen4.5 text-to-video: ratio 1280:720 or 720:1280, duration an integer from 2 to 10, promptText up to 1000 characters. gen4_turbo is image-to-video only; ratios 1280:720, 720:1280, 1104:832, 832:1104, 960:960, 1584:672; promptText optional. veo3.1 takes durations 4, 6 or 8 and an audio boolean that changes the price. A wrong ratio for the model returns a 400 error.

Generate with the Python SDK

from runwayml import RunwayML, TaskFailedError

client = RunwayML()  # reads RUNWAYML_API_SECRET

try:
    task = client.text_to_video.create(
        model="gen4.5",
        prompt_text="Drone shot over a misty alpine valley at golden hour, slow forward motion",
        ratio="1280:720",
        duration=5,
    ).wait_for_task_output()
    print(task.output[0])          # URL of the mp4
except TaskFailedError as e:
    print("Generation failed:", e.task_details)

Image to video accepts an HTTPS URL, a Runway upload URI, or a base64 data URI as prompt_image:

import base64, pathlib

png = base64.b64encode(pathlib.Path("kettle-product.png").read_bytes()).decode()
task = client.image_to_video.create(
    model="gen4_turbo",
    prompt_image=f"data:image/png;base64,{png}",
    prompt_text="Steam rises from the spout, camera slowly pushes in",
    ratio="1280:720",
    duration=5,
).wait_for_task_output()

Generate with Node.js

import RunwayML, { TaskFailedError } from '@runwayml/sdk';

const client = new RunwayML();
try {
  const task = await client.imageToVideo
    .create({
      model: 'gen4.5',
      promptImage: 'https://assets.northwind-outdoor.com/tent-hero.jpg',
      promptText: 'Wind moves the grass, light shifts across the tent',
      ratio: '1280:720',
      duration: 5,
    })
    .waitForTaskOutput();
  console.log(task.output[0]);
} catch (error) {
  if (error instanceof TaskFailedError) console.error(error.taskDetails);
  else throw error;
}

Plain REST with polling

import os, time, requests

BASE = "https://api.dev.runwayml.com/v1"
HEADERS = {
    "Authorization": f"Bearer {os.environ['RUNWAYML_API_SECRET']}",
    "X-Runway-Version": "2024-11-06",
}

def generate(payload: dict, endpoint: str = "text_to_video") -> list[str]:
    r = requests.post(f"{BASE}/{endpoint}", json=payload, headers=HEADERS, timeout=60)
    r.raise_for_status()
    task_id = r.json()["id"]
    while True:
        time.sleep(5)            # the API updates a task at most every 5 seconds
        t = requests.get(f"{BASE}/tasks/{task_id}", headers=HEADERS, timeout=60).json()
        if t["status"] == "SUCCEEDED":
            return t["output"]
        if t["status"] in ("FAILED", "CANCELLED"):
            raise RuntimeError(f"{t['status']}: {t.get('failure')} ({t.get('failureCode')})")

urls = generate({"model": "gen4.5", "promptText": "Close-up of espresso pouring, shallow depth of field",
                 "ratio": "720:1280", "duration": 5})
with requests.get(urls[0], stream=True, timeout=120) as resp, open("espresso.mp4", "wb") as f:
    for chunk in resp.iter_content(1 << 16):
        f.write(chunk)

Task statuses: PENDING, THROTTLED, RUNNING (with progress), SUCCEEDED (with output), FAILED (with failure

Полный SKILL.md на GitHub

Установить runway-ml в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

_scores.json

FAQ

Что делает скилл runway-ml?

Runway ML API generates and edits AI video and images from text, images or video, with models such as Gen-4.5, Gen-4 Turbo and Aleph 2.0. Use when generating video from a prompt or a still image, editing a clip with video-to-video, automating B-roll or product-ad pipelines, or polling Runway tasks from Python or Node.js.

Как установить скилл runway-ml?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл runway-ml запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить runway-ml с