npx skills add ...
npx skills add runwayml/skills --skill rw-setup-api-key
npx skills add runwayml/skills --skill rw-setup-api-key
Guide users through obtaining and configuring a Runway API key
Guide the user through obtaining a Runway API key, installing the SDK, and configuring their project for API access.
PREREQUISITE: Run
+rw-check-compatibilityfirst to ensure the project has server-side capability.
Direct the user to:
Important warnings to tell the user:
Requires Node.js 18+. The SDK includes TypeScript type definitions.
Requires Python 3.8+. Includes MyPy type annotations.
The SDK automatically reads the API key from the RUNWAYML_API_SECRET environment variable.
.env file (recommended for development)Check if the project already has a .env file. If so, append to it. If not, create one.
For Node.js projects: Ensure the project loads .env files:
.env support, no extra setup neededdotenv:
For Python projects: Ensure python-dotenv is installed if not using a framework with built-in support:
Add to the entry point:
Warn the user: Never hardcode keys in source code. Use environment variables or a secrets manager.
Ensure .env is in .gitignore to prevent accidentally committing the API key:
Check the existing .gitignore and add the entry if it's missing.
Suggest the user run a quick verification:
Remind the user:
Before moving on, verify:
.env file is in .gitignoreOnce 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.env
.env.local
.env.*.localimport RunwayML from '@runwayml/sdk';
const client = new RunwayML();
// If no error is thrown, the API key is configured correctly
console.log('Runway SDK initialized successfully');from runwayml import RunwayML
client = RunwayML()
# If no error is thrown, the API key is configured correctly
print('Runway SDK initialized successfully')// 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);