Third-party tools / 第三方工具接入

把 NextAPI Key 填进 ComfyUI、n8n、Make、Dify。

如果你不想在 NextAPI 控制台里生成视频,可以把 NextAPI 当作视频后端,用支持自定义 HTTP、OpenAPI 或 Bearer Token 的工具来调用。下面是中文严格配置流程和可验证的工具路径。

Use NextAPI as the video backend behind ComfyUI-style workflows, automation tools, or local canvases that can call a custom API.

中文严格配置流程

按这个顺序配置,用户不需要理解供应商密钥或内部任务系统。

  1. 1登录 https://app.nextapi.top,进入 API Keys,创建并复制 sk_*。完整 key 只显示一次。
  2. 2确认第三方工具支持 Custom HTTP Request、OpenAPI Tool、Custom Provider 或 Bearer Token 其中一种能力。
  3. 3Base URL 填 https://api.nextapi.top/v1;如果工具拆分 Host 和 Path,Host 填 https://api.nextapi.top,Path 填 /v1/videos。
  4. 4Headers 必填 Authorization: Bearer sk_... 和 Content-Type: application/json。
  5. 5创建视频只调用 POST /v1/videos,Body 必须是 JSON。不要填写上游 provider key,也不要暴露任何供应商密钥。
  6. 6保存创建响应里的 id,再轮询 GET /v1/videos/{id} 或 GET /v1/videos/{id}/wait。
  7. 7只有 status = succeeded 且 output.url 或 output.video_url 有值,才算生成成功。

字段照填表

第三方工具里看到这些字段时,就按右侧填写。

Base URL / 基址https://api.nextapi.top/v1
Fallback root / 根地址https://api.nextapi.top
Create path / 创建路径POST /v1/videos
Poll path / 轮询路径GET /v1/videos/{id}
Wait path / 长轮询路径GET /v1/videos/{id}/wait
AuthorizationBearer sk_...
Content-Typeapplication/json
Models / 模型seedance-2.0-pro, seedance-2.0-fast, seedance-v2-pro

Universal REST configuration

所有第三方工具本质上都走这两步:先创建异步视频任务,再轮询任务结果。

Create video / 创建视频
POST https://api.nextapi.top/v1/videos
Authorization: Bearer sk_...
Content-Type: application/json

{
  "model": "seedance-2.0-pro",
  "input": {
    "prompt": "A cinematic product reveal",
    "duration_seconds": 5,
    "resolution": "720p"
  }
}
Poll result / 轮询结果
GET https://api.nextapi.top/v1/videos/{id}
Authorization: Bearer sk_...

Wait until:
status = "succeeded"
output.url or output.video_url is present

按工具配置

这些不是泛泛而谈的“支持 API Key”。每个工具都写清楚应该进哪个能力入口、填哪些字段、怎样拿到最终视频。

ComfyUI

不是在原生 ComfyUI 设置里填 key;当前严格做法是通过可信 HTTP/API request 自定义节点接入。

  1. 01只使用本地或你信任的 ComfyUI 安装,不要把 sk_* 粘到陌生网页镜像。
  2. 02安装一个可信的 HTTP/API Request 自定义节点。
  3. 03添加创建请求节点:method = POST,URL = https://api.nextapi.top/v1/videos。
  4. 04Headers 添加 Authorization: Bearer sk_... 与 Content-Type: application/json。
  5. 05Body 使用 JSON,至少包含 model 与 input.prompt。
  6. 06把响应里的 id 保存到后续节点,再用 GET https://api.nextapi.top/v1/videos/{id} 轮询。
  7. 07读取 output.url;若只看到 output.video_url,也可以作为下载地址使用。

n8n

n8n 最适合做“表单/表格/队列 -> 生成视频 -> 下载或发通知”的自动化流程。

  1. 01创建 Header Auth credential,Header Name = Authorization,Header Value = Bearer sk_...。
  2. 02添加 HTTP Request 节点,Method = POST,URL = https://api.nextapi.top/v1/videos。
  3. 03Body Content Type 选 JSON,Body 填 model 与 input。
  4. 04把返回 id 传给第二个 HTTP Request 节点。
  5. 05第二个节点 Method = GET,URL = https://api.nextapi.top/v1/videos/{{$json.id}}。
  6. 06判断 status,成功后把 output.url 传给下载、存储或通知节点。

Make

Make 适合无代码用户,把 NextAPI 作为 HTTP 模块里的一个视频生成步骤。

  1. 01添加 HTTP app,选择 Make a request。
  2. 02Method = POST,URL = https://api.nextapi.top/v1/videos。
  3. 03Headers 填 Authorization: Bearer sk_... 与 Content-Type: application/json。
  4. 04Body type 选 Raw,Content type 选 JSON,粘贴请求体。
  5. 05用后续 HTTP 模块轮询 GET /v1/videos/{id},或设置间隔后再查。
  6. 06status = succeeded 后再读取 output.url。

Dify

Dify 应走 Custom tool / OpenAPI schema,不要把 NextAPI 当成聊天模型随便塞进去。

  1. 01在 Dify 工作区创建 Custom tool。
  2. 02导入或填写 OpenAPI schema,至少定义 POST /v1/videos 与 GET /v1/videos/{id}。
  3. 03认证方式选择 Bearer token,填入 NextAPI 的 sk_*。
  4. 04工作流里先调用创建视频工具,保存 id。
  5. 05再调用查询工具轮询结果,并把 output.url 返回给用户。

Tool setup matrix

下面列的是当前能讲清楚的第三方路径;有些是 HTTP 工作流,不是原生模型供应商集成。

ToolHow it accepts NextAPIConfigurationStatus
ComfyUITrusted HTTP/API request custom nodeCore ComfyUI does not ship a native NextAPI provider. Use a trusted HTTP/API request custom node to POST /v1/videos, store id, then GET /v1/videos/{id}.Path available; packaged NextAPI node pending
n8nBuilt-in HTTP Request nodeCreate Header Auth or set headers in the HTTP Request node. POST the JSON body, then add a second HTTP Request node for polling.Good fit for automation workflows
MakeHTTP app / Make a requestUse HTTP > Make a request. Add method, URL, Authorization, Content-Type, raw JSON body, then chain a polling request.Good fit for no-code workflows
DifyCustom tool / OpenAPI schemaCreate a custom tool that defines POST /v1/videos and GET /v1/videos/{id}, then configure bearer-token auth with the NextAPI key.Good fit for AI app builders
AI-CanvasProUser-installed upstream onlyInstall the official upstream yourself. Generic provider fields may help for some model types, but its video node is not verified against NextAPI /v1/videos yet.Do not redistribute; adapter pending verification
Runway / Pika / Luma / Kling / Canva-style hosted editorsNo generic NextAPI key path verifiedUse only if the product exposes a custom HTTP, OpenAPI, or OpenAI-compatible provider setting. Most hosted editors hardcode their own providers.Not enough evidence

验收检查

  • POST 返回 HTTP 202,并有 id、status、estimated_cost_cents。
  • GET 使用同一个 sk_* 查询同一个 id。
  • 小任务先跑通:720p、5 秒、短提示词。
  • 成功标准是 status = succeeded 且 output.url 或 output.video_url 可访问。

排障表

401 / unauthorized

key 缺失、复制不完整、Bearer 前缀漏写,或 key 已撤销。重新在 app.nextapi.top 创建并替换。

402 / insufficient_credits

账户余额不足或预算限制触发。先充值或调低测试任务规模。

404 / not_found

轮询 id 写错,或使用了其他账号的 key。创建和查询必须使用同一个 NextAPI key。

422 / invalid_request

JSON 字段不符合 OpenAPI:确认 model、input.prompt、duration_seconds、resolution。

一直 queued/running

视频任务是异步的。先用 5 秒、720p 测试;自动化工具里加等待或使用 /wait。

AI-CanvasPro note

AI-CanvasPro 是第三方本地画布。用户可以自行从官方上游仓库安装。NextAPI 目前不分发、不镜像、不白标它,也不会承诺它的视频节点已经兼容 NextAPI,除非后续有可验证 adapter。

Official AI-CanvasPro repository

密钥安全

  • 只把 sk_* 填入本地工具、可信自动化账户或你自己控制的服务端。
  • 不要把 key 填进非官方托管镜像、陌生网页客户端或公开工作流模板。
  • 怀疑泄露时,立刻在 app.nextapi.top 撤销旧 key 并创建新 key。

Creator Kit is planned

NextAPI 会做自己的填 key 即用工具:用户只填 NextAPI Key,任务、计费、视频存储都走现有网关,不暴露上游供应商 key,也不另建第二套计费。

创建 API Key