技能 人工智能 Runway ML SDK 安装与配置

Runway ML SDK 安装与配置

v20260423
runway-install-auth
本指南提供详细的步骤,用于安装和配置Runway ML SDK。内容涵盖Python和Node.js两种环境的先决条件、API密钥设置以及连接验证。掌握此流程后,开发者即可顺利开始利用Runway平台进行高保真度的AI视频生成、图像编辑和创意内容创作。
获取技能
114 次下载
概览

Runway Install Auth

Overview

Install the Runway ML SDK and configure API key authentication for AI video generation.

Prerequisites

  • Runway account at runwayml.com
  • API key from the Runway Developer Portal (dev.runwayml.com)
  • Python 3.9+ or Node.js 18+

Instructions

Step 1: Install SDK

set -euo pipefail
# Python
pip install runwayml

# Node.js
npm install @runwayml/sdk

Step 2: Configure Environment

# .env
RUNWAYML_API_SECRET=key_xxxxxxxxxxxxxxxxxxxxxxxx

Step 3: Verify Connection (Python)

from runwayml import RunwayML

client = RunwayML()  # Reads RUNWAYML_API_SECRET from env

# The client is ready — no explicit auth call needed
# SDK auto-authenticates on first API call
print("RunwayML client initialized")

Step 4: Verify Connection (Node.js)

import RunwayML from '@runwayml/sdk';

const runway = new RunwayML();  // Reads RUNWAYML_API_SECRET from env
console.log('RunwayML client initialized');

Output

  • runwayml SDK installed
  • API key configured via environment variable
  • Client ready for video generation

Error Handling

Error Cause Solution
401 Unauthorized Invalid API key Verify key at dev.runwayml.com
ModuleNotFoundError SDK not installed pip install runwayml
RUNWAYML_API_SECRET not set Missing env var Set in .env or export

Resources

Next Steps

Generate your first video: runway-hello-world

信息
Category 人工智能
Name runway-install-auth
版本 v20260423
大小 2.2KB
更新时间 2026-04-28
语言