
Teaches your agent the Runway API model lineup, task lifecycle, and the shot-list prompt grammar Runway actually rewards. Stops credit burn on guesswork.
Install command
npm install @scopeful/runway-gen4-apiDownload skill file
runway-gen4-api.md
8 KB
Fetch via the Scopeful MCP (any client)
Once your agent is connected to the Scopeful MCP, it can load this skill on demand, no install required:
get_skill('runway-gen4-api')The Runway API is a separate product from the runwayml.com consumer app. Different keys, different billing, separate dashboard at dev.runwayml.com. Agents that confuse the two waste an hour trying to authenticate. The other thing agents get wrong: Runway's prompt grammar is closer to a shot list than to a text-to-image prompt. Concrete subject, concrete motion, concrete camera. This skill teaches the model lineup, task lifecycle, and prompt structure Runway actually rewards.
Use Runway when the user wants:
Do not reach for Runway when:
veo3 routegen4_aleph, a different endpointPython SDK (current 4.14.0) and Node SDK (current 3.17.0):
pip install runwayml # Python 3.9+
npm install @runwayml/sdk # Node 18+
export RUNWAYML_API_SECRET=key_...
Official MCP server at github.com/runwayml/runway-api-mcp-server. Not on npm yet, clone + build:
git clone https://github.com/runwayml/runway-api-mcp-server
cd runway-api-mcp-server && npm install && npm run build
Point your agent's MCP config at the built index.js with RUNWAYML_API_SECRET in env. Tools: runway_generateVideo, runway_generateImage, runway_upscaleVideo, runway_editVideo, runway_getTask, runway_cancelTask, runway_getOrg.
| Model | Best for | Duration | Cost (credits/sec) | Notes |
|---|---|---|---|---|
gen4_turbo | Default image-to-video. Fast, cheap, good motion coherence | 5 or 10s | 5 | Start here for iteration |
gen4.5 | Higher quality, also supports text-to-video without promptImage | 5 or 10s | 12 | Use after locking direction on Turbo |
gen4_aleph | Video-to-video restyling, not image-to-video | varies | varies [VERIFY] | Different endpoint, not interchangeable |
veo3 / veo3.1 | Routed via Runway, premium quality | varies | 40 | Expensive, save for finals |
Gen-3 Alpha models (including gen3a_turbo) are no longer listed in the current Runway API docs. If you have old code referencing them, migrate to gen4_turbo.
Default playbook: iterate on gen4_turbo until composition and motion look right, then re-render the keeper on gen4.5 at the same prompt + seed.
Every generation is a task. Statuses: PENDING, RUNNING, SUCCEEDED, FAILED, CANCELED. Output URLs live 24 to 48 hours, then evaporate. Download immediately, do not hand the raw URL to the user as a deliverable.
Python polling pattern:
import os, time
from runwayml import RunwayML
client = RunwayML(api_key=os.environ["RUNWAYML_API_SECRET"])
task = client.image_to_video.create(
model="gen4_turbo",
prompt_image="https://your-cdn.example/frame.jpg",
prompt_text="The cyclist pedals away as the camera dollies back, dusk light",
ratio="1280:720",
duration=5,
)
# Use the SDK helper, do not hand-roll the loop
result = client.tasks.wait_for_task_output(task.id, timeout=600)
output_url = result.output[0] # download this immediately
Node:
import RunwayML from "@runwayml/sdk";
const client = new RunwayML({ apiKey: process.env.RUNWAYML_API_SECRET });
const task = await client.imageToVideo.create({
model: "gen4_turbo",
promptImage: "https://your-cdn.example/frame.jpg",
promptText: "The cyclist pedals away as the camera dollies back, dusk light",
ratio: "1280:720",
duration: 5,
});
const result = await client.tasks.waitForTaskOutput(task.id, { timeout: 600_000 });
const outputUrl = result.output[0];
If you must hand-roll polling, sleep 5 seconds between retrieves. Faster polling gets rate-limited and does not return faster.
Three slots, in this order:
Bad: a guy walking
Bad: cinematic shot of a person
Good: man in a navy overcoat walks left to right across a cobblestone street, camera tracks alongside at waist height, overcast afternoon, shallow depth of field
If the user gives a vague request, ask one question before generating: is there a starting frame, or does this need text-to-video on gen4.5? Then generate. Do not stack three clarifying questions.
Aspect ratio is locked at task creation. Supported on gen4_turbo:
| Ratio | Use case |
|---|---|
1280:720 | Standard landscape, YouTube, web |
720:1280 | Phone vertical, Reels, TikTok |
1584:672 | Ultra-wide cinematic |
1104:832 | 4:3-ish landscape |
832:1104 | 4:3-ish portrait |
960:960 | Square, Instagram feed |
Duration is 5 or 10. There is no in-between. A 10-second clip costs exactly 2x a 5-second clip.
gen4_turbo 5-second clip is 25 credits; the same prompt on gen4.5 is 60 credits. Always iterate on TurboFAILED status) typically do not consume credits, but CANCELED mid-run may. Cancel early if you cancel at allLive USD-per-second math and current model availability: scopeful.org/tools/runway.
For each successful generation, return:
gen4_turbo at 720p for cheap iteration, switch to gen4.5 for the final")FAILED tasks more than once. Read the error, adjust the promptgen4.5 for first iteration. Burn 25 credits on gen4_turbo before burning 60 on gen4.5[VERIFY]higgsfield-mcp skill. Its preset library is sharper than Runway's freeform camera promptseleven_multilingual_v2 is also accessible via Runway's audio endpoints if you want one billing surfacegen4_image in the same SDK, or hand off to Midjourney via the midjourney-v7-prompts skill