check-compatibility

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Check Compatibility

兼容性检查

Analyze the user's project to determine whether it is compatible with Runway's public API.
分析用户项目,判断其是否与Runway公共API兼容。

Why This Matters

为什么重要

Runway's public API requires server-side invocation. The API key must never be exposed in client-side code. Projects that are purely frontend (static HTML/JS, client-only SPAs without a backend) cannot safely call the API.
Runway公共API要求必须通过服务端调用。绝对不能将API密钥暴露在客户端代码中,纯前端项目(静态HTML/JS、无后端的仅客户端SPA)无法安全调用该API。

Analysis Steps

分析步骤

Step 1: Identify the Project Type

步骤1:识别项目类型

Search the project root for these files to determine the stack:
FileIndicates
package.json
Node.js project
requirements.txt
,
pyproject.toml
,
Pipfile
,
setup.py
Python project
go.mod
Go project
Cargo.toml
Rust project
pom.xml
,
build.gradle
Java/Kotlin project
Gemfile
Ruby project
composer.json
PHP project
If none of these exist, flag the project as unknown and ask the user what language/runtime they're using.
在项目根目录搜索以下文件来判断技术栈:
文件说明
package.json
Node.js项目
requirements.txt
,
pyproject.toml
,
Pipfile
,
setup.py
Python项目
go.mod
Go项目
Cargo.toml
Rust项目
pom.xml
,
build.gradle
Java/Kotlin项目
Gemfile
Ruby项目
composer.json
PHP项目
如果不存在以上任何文件,将项目标记为未知,并询问用户使用的语言/运行时。

Step 2: Check for Server-Side Capability

步骤2:检查服务端能力

Look for indicators of a server/backend:
Node.js projects — check
package.json
dependencies for:
  • express
    ,
    fastify
    ,
    koa
    ,
    hapi
    ,
    nest
    ,
    hono
    → HTTP server framework
  • next
    → Next.js (has API routes — compatible)
  • nuxt
    → Nuxt.js (has server routes — compatible)
  • remix
    → Remix (has loaders/actions — compatible)
  • @sveltejs/kit
    → SvelteKit (has server routes — compatible)
  • astro
    → Astro (has API endpoints if SSR enabled)
Python projects — check for:
  • flask
    ,
    django
    ,
    fastapi
    ,
    starlette
    ,
    tornado
    ,
    aiohttp
    ,
    sanic
    → web server framework
  • streamlit
    ,
    gradio
    → can make server-side calls
Red flags (frontend-only):
  • package.json
    with only
    react
    ,
    vue
    ,
    svelte
    ,
    angular
    and NO server framework
  • vite.config.ts
    or
    webpack.config.js
    with no server/SSR configuration
  • Static site generators without server routes (e.g., plain Gatsby, plain Eleventy)
  • index.html
    as the only entry point with inline
    <script>
    tags
寻找服务端/后端的相关特征:
Node.js项目 — 检查
package.json
依赖中是否包含:
  • express
    ,
    fastify
    ,
    koa
    ,
    hapi
    ,
    nest
    ,
    hono
    → HTTP服务端框架
  • next
    → Next.js(具备API路由 — 兼容)
  • nuxt
    → Nuxt.js(具备服务端路由 — 兼容)
  • remix
    → Remix(具备loaders/actions — 兼容)
  • @sveltejs/kit
    → SvelteKit(具备服务端路由 — 兼容)
  • astro
    → Astro(开启SSR时具备API端点 — 兼容)
Python项目 — 检查是否包含:
  • flask
    ,
    django
    ,
    fastapi
    ,
    starlette
    ,
    tornado
    ,
    aiohttp
    ,
    sanic
    → Web服务端框架
  • streamlit
    ,
    gradio
    → 可发起服务端调用
危险信号(仅前端项目):
  • package.json
    中仅包含
    react
    vue
    svelte
    angular
    ,无任何服务端框架
  • 存在
    vite.config.ts
    webpack.config.js
    但无服务端/SSR配置
  • 无服务端路由的静态站点生成器(例如纯Gatsby、纯Eleventy)
  • 仅以
    index.html
    作为入口,包含内联
    <script>
    标签

Step 3: Check for Existing Runway SDK

步骤3:检查是否已安装Runway SDK

Search for existing Runway SDK installations:
Node.js:
  • Check
    package.json
    for
    @runwayml/sdk
  • Search for
    import RunwayML
    or
    require('@runwayml/sdk')
    in source files
Python:
  • Check
    requirements.txt
    /
    pyproject.toml
    for
    runwayml
  • Search for
    from runwayml import RunwayML
    or
    import runwayml
    in source files
搜索现有Runway SDK安装情况:
Node.js:
  • 检查
    package.json
    中是否有
    @runwayml/sdk
  • 在源码文件中搜索
    import RunwayML
    require('@runwayml/sdk')
Python:
  • 检查
    requirements.txt
    /
    pyproject.toml
    中是否有
    runwayml
  • 在源码文件中搜索
    from runwayml import RunwayML
    import runwayml

Step 4: Check Runtime Version

步骤4:检查运行时版本

Node.js: Must be version 18 or higher (
node --version
) Python: Must be version 3.8 or higher (
python3 --version
)
Node.js:必须为18或更高版本(
node --version
Python:必须为3.8或更高版本(
python3 --version

Step 5: Check for Environment Variable Support

步骤5:检查环境变量支持

Look for
.env
file,
.env.example
,
.env.local
, or dotenv configuration:
  • Node.js:
    dotenv
    in dependencies, or framework-native env support (Next.js, etc.)
  • Python:
    python-dotenv
    in dependencies, or framework-native support
查找
.env
文件、
.env.example
.env.local
或dotenv配置:
  • Node.js:依赖中包含
    dotenv
    ,或框架原生支持环境变量(Next.js等)
  • Python:依赖中包含
    python-dotenv
    ,或框架原生支持

Report Format

报告格式

After analysis, provide a clear report:
undefined
分析完成后,提供清晰的报告:
undefined

Runway API Compatibility Report

Runway API Compatibility Report

Project type: [Node.js / Python / etc.] Server-side capable: [Yes / No / Partial] Runtime version: [version] — [Compatible / Needs upgrade] Runway SDK installed: [Yes / No] Environment variable support: [Yes / No / Needs setup]
Project type: [Node.js / Python / etc.] Server-side capable: [Yes / No / Partial] Runtime version: [version] — [Compatible / Needs upgrade] Runway SDK installed: [Yes / No] Environment variable support: [Yes / No / Needs setup]

Verdict: [COMPATIBLE / NEEDS CHANGES / INCOMPATIBLE]

Verdict: [COMPATIBLE / NEEDS CHANGES / INCOMPATIBLE]

[If COMPATIBLE] Your project is ready for Runway API integration. Proceed with API key setup.
[If NEEDS CHANGES] Your project needs the following changes:
  1. [List specific changes needed]
[If INCOMPATIBLE] Your project is frontend-only and cannot safely call Runway's API. Options:
  1. Add a backend — Add an Express/FastAPI server or use a framework with server routes (Next.js, SvelteKit, etc.)
  2. Use a serverless function — Add API routes via Vercel Functions, AWS Lambda, Cloudflare Workers, etc.
  3. Create a separate backend — Build a thin API proxy that your frontend calls
undefined
[If COMPATIBLE] Your project is ready for Runway API integration. Proceed with API key setup.
[If NEEDS CHANGES] Your project needs the following changes:
  1. [List specific changes needed]
[If INCOMPATIBLE] Your project is frontend-only and cannot safely call Runway's API. Options:
  1. Add a backend — Add an Express/FastAPI server or use a framework with server routes (Next.js, SvelteKit, etc.)
  2. Use a serverless function — Add API routes via Vercel Functions, AWS Lambda, Cloudflare Workers, etc.
  3. Create a separate backend — Build a thin API proxy that your frontend calls
undefined

Important Notes

重要注意事项

  • Never suggest embedding the API key in client-side code. This is a security risk.
  • If the project uses Next.js, Remix, SvelteKit, Nuxt, or Astro with SSR, it IS compatible — the server-side route handlers can call the API.
  • Serverless platforms (Vercel, Netlify, AWS Lambda, Cloudflare Workers) are compatible.
  • Docker/containerized apps are compatible if they run a server process.
  • 永远不要建议将API密钥嵌入客户端代码,这存在安全风险。
  • 如果项目使用Next.js、Remix、SvelteKit、Nuxt或开启SSR的Astro,则是兼容的 — 服务端路由处理程序可以调用API。
  • 无服务器平台(Vercel、Netlify、AWS Lambda、Cloudflare Workers)兼容。
  • Docker/容器化应用如果运行服务端进程则兼容。

After Compatibility Check

兼容性检查完成后

If the project is compatible, suggest the user proceed with
+setup-api-key
to configure their API credentials.
如果项目兼容,建议用户执行
+setup-api-key
配置API凭证。