check-compatibility
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCheck 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:
| File | Indicates |
|---|---|
| Node.js project |
| Python project |
| Go project |
| Rust project |
| Java/Kotlin project |
| Ruby project |
| PHP project |
If none of these exist, flag the project as unknown and ask the user what language/runtime they're using.
在项目根目录搜索以下文件来判断技术栈:
| 文件 | 说明 |
|---|---|
| Node.js项目 |
| Python项目 |
| Go项目 |
| Rust项目 |
| Java/Kotlin项目 |
| Ruby项目 |
| PHP项目 |
如果不存在以上任何文件,将项目标记为未知,并询问用户使用的语言/运行时。
Step 2: Check for Server-Side Capability
步骤2:检查服务端能力
Look for indicators of a server/backend:
Node.js projects — check dependencies for:
package.json- ,
express,fastify,koa,hapi,nest→ HTTP server frameworkhono - → Next.js (has API routes — compatible)
next - → Nuxt.js (has server routes — compatible)
nuxt - → Remix (has loaders/actions — compatible)
remix - → SvelteKit (has server routes — compatible)
@sveltejs/kit - → Astro (has API endpoints if SSR enabled)
astro
Python projects — check for:
- ,
flask,django,fastapi,starlette,tornado,aiohttp→ web server frameworksanic - ,
streamlit→ can make server-side callsgradio
Red flags (frontend-only):
- with only
package.json,react,vue,svelteand NO server frameworkangular - or
vite.config.tswith no server/SSR configurationwebpack.config.js - Static site generators without server routes (e.g., plain Gatsby, plain Eleventy)
- as the only entry point with inline
index.htmltags<script>
寻找服务端/后端的相关特征:
Node.js项目 — 检查依赖中是否包含:
package.json- ,
express,fastify,koa,hapi,nest→ HTTP服务端框架hono - → Next.js(具备API路由 — 兼容)
next - → Nuxt.js(具备服务端路由 — 兼容)
nuxt - → Remix(具备loaders/actions — 兼容)
remix - → SvelteKit(具备服务端路由 — 兼容)
@sveltejs/kit - → Astro(开启SSR时具备API端点 — 兼容)
astro
Python项目 — 检查是否包含:
- ,
flask,django,fastapi,starlette,tornado,aiohttp→ Web服务端框架sanic - ,
streamlit→ 可发起服务端调用gradio
危险信号(仅前端项目):
- 中仅包含
package.json、react、vue、svelte,无任何服务端框架angular - 存在或
vite.config.ts但无服务端/SSR配置webpack.config.js - 无服务端路由的静态站点生成器(例如纯Gatsby、纯Eleventy)
- 仅以作为入口,包含内联
index.html标签<script>
Step 3: Check for Existing Runway SDK
步骤3:检查是否已安装Runway SDK
Search for existing Runway SDK installations:
Node.js:
- Check for
package.json@runwayml/sdk - Search for or
import RunwayMLin source filesrequire('@runwayml/sdk')
Python:
- Check /
requirements.txtforpyproject.tomlrunwayml - Search for or
from runwayml import RunwayMLin source filesimport runwayml
搜索现有Runway SDK安装情况:
Node.js:
- 检查中是否有
package.json@runwayml/sdk - 在源码文件中搜索或
import RunwayMLrequire('@runwayml/sdk')
Python:
- 检查/
requirements.txt中是否有pyproject.tomlrunwayml - 在源码文件中搜索或
from runwayml import RunwayMLimport runwayml
Step 4: Check Runtime Version
步骤4:检查运行时版本
Node.js: Must be version 18 or higher ()
Python: Must be version 3.8 or higher ()
node --versionpython3 --versionNode.js:必须为18或更高版本()
Python:必须为3.8或更高版本()
node --versionpython3 --versionStep 5: Check for Environment Variable Support
步骤5:检查环境变量支持
Look for file, , , or dotenv configuration:
.env.env.example.env.local- Node.js: in dependencies, or framework-native env support (Next.js, etc.)
dotenv - Python: in dependencies, or framework-native support
python-dotenv
查找文件、、或dotenv配置:
.env.env.example.env.local- Node.js:依赖中包含,或框架原生支持环境变量(Next.js等)
dotenv - Python:依赖中包含,或框架原生支持
python-dotenv
Report Format
报告格式
After analysis, provide a clear report:
undefined分析完成后,提供清晰的报告:
undefinedRunway 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:
- [List specific changes needed]
[If INCOMPATIBLE]
Your project is frontend-only and cannot safely call Runway's API. Options:
- Add a backend — Add an Express/FastAPI server or use a framework with server routes (Next.js, SvelteKit, etc.)
- Use a serverless function — Add API routes via Vercel Functions, AWS Lambda, Cloudflare Workers, etc.
- 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:
- [List specific changes needed]
[If INCOMPATIBLE]
Your project is frontend-only and cannot safely call Runway's API. Options:
- Add a backend — Add an Express/FastAPI server or use a framework with server routes (Next.js, SvelteKit, etc.)
- Use a serverless function — Add API routes via Vercel Functions, AWS Lambda, Cloudflare Workers, etc.
- Create a separate backend — Build a thin API proxy that your frontend calls
undefinedImportant 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 to configure their API credentials.
+setup-api-key如果项目兼容,建议用户执行配置API凭证。
+setup-api-key