Labsco
runwayml logo

rw-setup-api-key

โ˜… 55

by runwayml ยท part of runwayml/skills

Guide users through obtaining and configuring a Runway API key

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedPaid serviceNeeds API keys
๐Ÿงฉ One of 7 skills in the runwayml/skills package โ€” works on its own, and pairs well with its siblings.

Guide users through obtaining and configuring a Runway API key

Inspect the full instructions your agent will receiveExpand

This is the exact playbook injected into your agent when the skill activates โ€” shown here so you can audit it before installing. You don't need to read it to use the skill.

by runwayml

Guide users through obtaining and configuring a Runway API key npx skills add https://github.com/runwayml/skills --skill rw-setup-api-key Download ZIPGitHub55

Step 1: Create a Runway Developer Account

Direct the user to:

  • Go to https://dev.runwayml.com/

  • Create an organization (or use an existing one)

  • Navigate to Organization Settings โ†’ API Keys

  • Click Create API Key

  • Copy the key immediately โ€” it is only shown once and cannot be recovered

Important warnings to tell the user:

  • Lost keys cannot be retrieved. If lost, disable the old key and create a new one.

  • API keys are organization-scoped, not user-scoped.

  • You must prepay for credits before the API will work. Minimum purchase is $10 (1,000 credits at $0.01/credit). Do this at https://dev.runwayml.com/ under billing.

Step 3: Configure the Environment Variable

The SDK automatically reads the API key from the RUNWAYML_API_SECRET environment variable.

Option A: .env file (recommended for development)

Check if the project already has a .env file. If so, append to it. If not, create one.

Copy & paste โ€” that's it
RUNWAYML_API_SECRET=your_api_key_here

For Node.js projects: Ensure the project loads .env files:

  • Next.js, Remix, Vite โ€” built-in .env support, no extra setup needed

  • Express/Fastify/plain Node โ€” install dotenv:

Copy & paste โ€” that's it
npm install dotenv

Add to the entry point:

Copy & paste โ€” that's it
import 'dotenv/config';

For Python projects: Ensure python-dotenv is installed if not using a framework with built-in support:

Copy & paste โ€” that's it
pip install python-dotenv

Add to the entry point:

Copy & paste โ€” that's it
from dotenv import load_dotenv
load_dotenv()

Option B: System environment variable

Copy & paste โ€” that's it
export RUNWAYML_API_SECRET=your_api_key_here

Option C: Pass directly to the client (not recommended)

Copy & paste โ€” that's it
// Node.js
const client = new RunwayML({ apiKey: 'your_api_key_here' });
Copy & paste โ€” that's it
# Python
client = RunwayML(api_key='your_api_key_here')

Warn the user: Never hardcode keys in source code. Use environment variables or a secrets manager.

Step 4: Update .gitignore

Ensure .env is in .gitignore to prevent accidentally committing the API key:

Copy & paste โ€” that's it
.env
.env.local
.env.*.local

Check the existing .gitignore and add the entry if it's missing.

Step 6: Confirm Credit Balance

Remind the user:

  • The API requires prepaid credits to function

  • Minimum purchase: $10 (1,000 credits)

  • Purchase at: https://dev.runwayml.com/ โ†’ Billing

  • They can check their balance via the API:

Copy & paste โ€” that's it
// Node.js - check organization info
const response = await fetch('https://api.dev.runwayml.com/v1/organization', {
 headers: {
 'Authorization': `Bearer ${process.env.RUNWAYML_API_SECRET}`,
 'X-Runway-Version': '2024-11-06'
 }
});
const org = await response.json();
console.log('Credits:', org.creditBalance);

Security Checklist

Before moving on, verify:

  • API key is stored in an environment variable, not hardcoded

  • .env file is in .gitignore

  • API calls will only happen server-side (not in browser-executed code)

  • User has purchased credits

Next Steps

Once the API key is configured, the user can proceed with integration:

  • +rw-integrate-video โ€” Video generation (text-to-video, image-to-video)

  • +rw-integrate-image โ€” Image generation

  • +rw-integrate-audio โ€” Audio generation (TTS, sound effects, voice)

  • +rw-integrate-uploads โ€” File upload for models that require image/video input