[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BY1N3WK6Z1TN3CK98KHXYB":3,"skill-same:01M6BY1N3WK6Z1TN3CK98KHXYB":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":31,"publishedAt":50,"linkOnly":51,"markdownContent":52,"markdownBody":53,"frontMatter":54,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":60,"ownerHtmlUrl":61,"ownerBlogUrl":12,"ownerDescription":62,"updatedAt":63,"install":64,"resources":77},"01M6BY1N3WK6Z1TN3CK98KHXYB","nodetool-api-reference",null,"Integrate with NodeTool over REST, tRPC, MsgPack WebSocket, MCP, or the OpenAI-compatible Chat API, including the document surfaces and workflow execution.","nodetool-ai\u002Fnodetool","nodetool-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F164873569?v=4","01M6BXPFDW36K9K1MR8ZH63HG2","nodetool.ai","01M6BXPFJ893XM219GQN60B0WK",635,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool\u002Fblob\u002Fmain\u002Fpackages\u002Fsystem-skills\u002Fnodetool-api-reference\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49],"api","nodetool api reference","nodetool","reference","openai-compatible","MCP","with","trpc","chat","document","surfaces","integrate","msgpack","websocket","execution","REST","openai","workflow","2026-11-10 10:12:30",false,"---\nname: nodetool-api-reference\ndescription: \"Integrate with NodeTool over REST, tRPC, MsgPack WebSocket, MCP, or the OpenAI-compatible Chat API, including the document surfaces and workflow execution.\"\n---\n\nYou help users integrate with NodeTool's HTTP + WebSocket server (default `http:\u002F\u002Flocalhost:7777`). Start it with `nodetool serve` (flags: `--host`, `--port`).\n\n# Surfaces\n\n| Surface | Path prefix | Use case |\n|---------|-------------|----------|\n| **REST** | `\u002Fapi\u002F...` | Workflows, assets, collections, models, bundles, health |\n| **tRPC** | `\u002Ftrpc\u002F...` | The document surfaces: timelines, storyboards, sketches, scripts, applications, JS scripts, projects, skills, settings |\n| **OpenAI-compatible** | `\u002Fv1\u002F...` | Chat completions + model list |\n| **WebSocket** | `\u002Fws` | Run\u002Fcancel\u002Fstream jobs, live chat, live editor tools |\n| **MCP** | `\u002Fmcp` | Agent tools over streamable HTTP, for Claude Desktop and CLI agents |\n\nAuth is controlled by environment variables, not CLI flags (§ Authentication).\n\n**Pick the right surface.** REST covers workflows, assets and the portable\nbundles. Everything that is a *document* someone edits (a timeline sequence, a\nstoryboard, a sketch, a script, a mini app, a JS script) is a tRPC router, and\nthe REST routes for those kinds cover only import, export and build. An\nintegration that reads or writes a document calls tRPC, or calls the agent\ncapability of the same name over `\u002Fmcp`.\n\n# Authentication\n\nThe server picks its auth mode from `SUPABASE_URL` and `SUPABASE_KEY` alone. It\nreads neither `AUTH_PROVIDER` nor `NODETOOL_SERVER_MODE`.\n\n| Mode | Enabled by | Accepted credentials |\n|------|------------|----------------------|\n| Local | Default, with the Supabase variables unset | Loopback connections run as user `\"1\"` with no token. `NODETOOL_TRUST_LOCALHOST=false` turns that off. Sources in `NODETOOL_TRUST_LOCAL_NETWORKS` (comma-separated CIDRs) also run as user `\"1\"` with no token. A bearer equal to `SERVER_AUTH_TOKEN` runs as user `\"1\"`. A token minted by `nodetool deploy users-add` runs as that API user. Anything else gets `401`. |\n| Supabase | `SUPABASE_URL` and `SUPABASE_KEY` both set | Every non-public request needs a valid Supabase JWT. `SERVER_AUTH_TOKEN`, `NODETOOL_TRUST_LOCAL_NETWORKS` and API-user tokens are ignored. Loopback is trusted only with `NODETOOL_TRUST_LOCALHOST=true`. |\n\nIn both modes, an access token (`ntk_…`) created in **Settings → MCP → Connect\nan agent remotely** authenticates as the person who created it. Send any token\nas `Authorization: Bearer \u003Ctoken>`. A WebSocket client that cannot set headers\npasses `?api_key=\u003Ctoken>` on the `\u002Fws` URL.\n\n# REST Endpoints\n\n## Workflows\n\n```bash\n# List workflows\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fworkflows \\\n  -H \"Authorization: Bearer TOKEN\"\n\n# Get a workflow\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fworkflows\u002F\u003Cid> \\\n  -H \"Authorization: Bearer TOKEN\"\n\n# Export helpers\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fworkflows\u002F\u003Cid>\u002Fdsl-export      # TypeScript DSL\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fworkflows\u002F\u003Cid>\u002Fexport-bundle   # .nodetool bundle (zip)\n```\n\n`PUT \u002Fapi\u002Fworkflows\u002F\u003Cid>` replaces the stored graph. A node's\n`ui_properties.position` is in canvas coordinates unless the node has a\n`parent_id`. A node inside a group (`nodetool.workflows.base_node.Group`)\nstores the group's id in `parent_id` and a `position` relative to the group's\ntop-left corner. A node at canvas `(920, 1356)` inside a group at `(880, 1000)`\nstores `{\"x\": 40, \"y\": 356}`. A node with no `parent_id` is not a group member,\neven when it lies inside the group's rectangle, and does not move with it.\n\nRun a saved workflow over REST. This is the route `run_workflow`,\n`debug_workflow` and `nodetool debug` use. The editor runs over WebSocket\ninstead (§ WebSocket API).\n\n```bash\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fworkflows\u002F\u003Cid>\u002Frun \\\n  -H \"Authorization: Bearer TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"params\": {\"prompt\": \"a red fox\"}}'\n# Same body, returns the full debug report (summary and verdict) instead of the run row\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fworkflows\u002F\u003Cid>\u002Fdebug ...\n```\n\nThe body also takes `background: true` to return a job id at once, and\n`interactive: true` to park on escalations as a debug session (below).\n\n## Documents (tRPC)\n\nThe routers under `\u002Ftrpc`, one per document kind:\n`timeline`, `storyboards`, `sketch`, `scripts`, `applications`, `jsScripts`,\n`documents`, `workflows`, `projects`, `assets`, `collections`, `jobs`, `runs`,\n`appRuns`, `appInstances`, `resources`, `models`, `customProviders`, `nodes`,\n`memories`, `messages`, `threads`, `settings`, `skills`, `storage`, `packs`,\n`costs`, `credits`, `files`, `fonts`, `games`, `integrations`, `triggers`,\n`externalMcp`, `agentAccess`, `users`, `worker`, `workspace`.\n\nEach follows the same shape: `list`, `get`, `create`, `update` (compare-and-swap\non `updated_at`), `delete`, plus sub-routers. Whole-document snapshots are\n`timeline.versions`, `sketch.documentVersions` and `jsScripts.documentVersions`\n(`sketch.versions` is a different thing: the per-layer generation takes).\n`applications` also carries `publish`, `released`, `deploy`, `budget` and\n`usage`, because publishing an app locks in the current graph of every workflow\nit runs and caps what it may spend. Read the router in\n`packages\u002Fwebsocket\u002Fsrc\u002Ftrpc\u002Frouters\u002F` for the exact procedure names rather than\nguessing them. `\u002Ftrpc\u002Fhealthz` answers without auth.\n\nAn agent reaches the same data through the capability tools, which need no\nclient: `list_timelines`, `get_storyboard`, `edit_sketch`, `save_js_script`,\n`edit_app`, and so on.\n\n## Document REST routes\n\nThe REST side of the document kinds is import, export and build.\n\n```bash\n# Mini apps\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fapplications\u002F:id\u002Fexport-bundle       # app + every bound graph\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fapplications\u002Fimport-bundle\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fapplications\u002Fbuild           # {prompt|spec, provider, model, ...}\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fapplications\u002Fspec            # {prompt, provider, model} → {spec, issues}\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fapplications\u002Fdebug\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fapplications\u002Fexamples\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fapplications\u002Fexamples\u002F:slug\u002Finstall\n\n# Timelines and storyboards\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Ftimelines\u002F:id\u002Fexport-zip\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Ftimelines\u002Fimport-zip\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fstoryboards\u002F:id\u002Fexport-zip\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Ftimelines\u002F:id\u002Fisolate-subject\n\n# Native games: the published revision as a zip (target=web, tauri or expo)\ncurl -o game.zip 'http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fgames\u002F:id\u002Fexport-zip?target=tauri'\n# Compile the desktop executable on this machine; streams cargo output as NDJSON (refused on hosted servers)\ncurl -N -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fgames\u002F:id\u002Fbuild-executable\n\n# JS scripts\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fjs-scripts\u002F:id\u002Frun\n```\n\nA build or an interactive debug runs for minutes, so those routes accept\n`poll: true`, return a session id, and are read at\n`GET \u002Fapi\u002Fdebug\u002Fsessions\u002F:id` until they settle. Cancel with\n`POST \u002Fapi\u002Fdebug\u002Fsessions\u002F:id\u002Fcancel`.\n\n## Collections (RAG)\n\n```bash\n# Upload a text file into a collection (multipart, field name \"file\")\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fcollections\u002F\u003Cname>\u002Findex \\\n  -H \"Authorization: Bearer TOKEN\" \\\n  -F \"file=@notes.md\"\n```\n\nThe route indexes text only: plain text, Markdown, HTML, CSV and JSON. It\nreturns `415` for PDFs, Office files and images, which need an indexing\nworkflow. The collection must have an embedding model.\n\n## Models\n\n```bash\n# OpenAI-compatible model list\ncurl http:\u002F\u002Flocalhost:7777\u002Fv1\u002Fmodels -H \"Authorization: Bearer TOKEN\"\n```\n\n## Storage \u002F Assets\n\n```bash\n# Asset bytes are served under \u002Fapi\u002Fstorage\u002F...\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fstorage\u002F\u003Cpath>\n```\n\n## Health\n\n```bash\ncurl http:\u002F\u002Flocalhost:7777\u002Fhealth      # liveness (no auth)\ncurl http:\u002F\u002Flocalhost:7777\u002Fready        # readiness\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fhealth   # detailed health\n```\n\n# Chat API (OpenAI-Compatible)\n\n## HTTP\n\n```bash\n# Chat completion\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Authorization: Bearer TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"model\": \"gpt-5.4\",\n    \"messages\": [\n      {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n      {\"role\": \"user\", \"content\": \"Hello!\"}\n    ],\n    \"stream\": false\n  }'\n\n# Streaming (Server-Sent Events)\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Authorization: Bearer TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"model\": \"gpt-5.4\", \"messages\": [{\"role\": \"user\", \"content\": \"Hi\"}], \"stream\": true}'\n```\n\n## Python Client (OpenAI SDK)\n\n```python\nimport openai\n\nclient = openai.OpenAI(api_key=\"TOKEN\", base_url=\"http:\u002F\u002Flocalhost:7777\u002Fv1\")\n\nresponse = client.chat.completions.create(\n    model=\"gpt-5.4\",\n    messages=[{\"role\": \"user\", \"content\": \"Hello!\"}],\n)\nprint(response.choices[0].message.content)\n\n# Streaming\nstream = client.chat.completions.create(\n    model=\"gpt-5.4\",\n    messages=[{\"role\": \"user\", \"content\": \"Hello!\"}],\n    stream=True,\n)\nfor chunk in stream:\n    if chunk.choices[0].delta.content:\n        print(chunk.choices[0].delta.content, end=\"\")\n```\n\n## JavaScript Client\n\n```typescript\nconst response = await fetch(\"http:\u002F\u002Flocalhost:7777\u002Fv1\u002Fchat\u002Fcompletions\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer TOKEN\",\n    \"Content-Type\": \"application\u002Fjson\",\n  },\n  body: JSON.stringify({\n    model: \"gpt-5.4\",\n    messages: [{ role: \"user\", content: \"Hello!\" }],\n    stream: false,\n  }),\n});\nconst data = await response.json();\nconsole.log(data.choices[0].message.content);\n```\n\n# WebSocket API — Running Jobs\n\n**Endpoint**: `ws(s):\u002F\u002F\u003Chost>\u002Fws`. Messages are an envelope `{ command, data }`.\nThe server replies in MsgPack until the client sends `set_mode` with\n`\"text\"`. A JSON client sends that first, or `JSON.parse` fails on every reply.\nIdentity comes from the connection's credential (§ Authentication), not from\nfields in the request body.\n\n```typescript\nconst socket = new WebSocket(\"ws:\u002F\u002Flocalhost:7777\u002Fws?api_key=\u003Ctoken>\");\n\nsocket.onopen = () => {\n  socket.send(JSON.stringify({ command: \"set_mode\", data: { mode: \"text\" } }));\n  \u002F\u002F Start a workflow run\n  socket.send(JSON.stringify({\n    command: \"run_job\",\n    data: {\n      type: \"run_job_request\",\n      workflow_id: \"\u003Cid>\",\n      job_type: \"workflow\",\n      params: { input_name: \"value\" },\n      job_id: \"\u003Cid>\",\n    },\n  }));\n};\n\nsocket.onmessage = (event) => {\n  const msg = JSON.parse(event.data);\n  switch (msg.type) {\n    case \"job_update\":\n      console.log(`Job ${msg.status}`); \u002F\u002F running | completed | failed | cancelled | suspended\n      if (msg.result) console.log(\"Result:\", msg.result);\n      break;\n    case \"node_update\":\n      console.log(`Node ${msg.node_name}: ${msg.status}`);\n      break;\n    case \"node_progress\":\n      console.log(`Progress: ${msg.progress}\u002F${msg.total}`);\n      break;\n    case \"output_update\":\n      console.log(`Output ${msg.output_name}:`, msg.value);\n      break;\n    case \"chunk\":\n      process.stdout.write(msg.content);\n      break;\n    case \"log_update\":\n      console.log(`[${msg.severity}] ${msg.content}`);\n      break;\n  }\n};\n```\n\n## Job Control Commands\n\n```typescript\nsocket.send(JSON.stringify({ command: \"cancel_job\",  data: { job_id: \"...\", workflow_id: \"...\" } }));\nsocket.send(JSON.stringify({ command: \"get_status\",  data: { job_id: \"...\" } }));\nsocket.send(JSON.stringify({ command: \"reconnect_job\", data: { job_id: \"...\", workflow_id: \"...\" } }));\n\n\u002F\u002F Stream input into a running node, then close the stream\nsocket.send(JSON.stringify({ command: \"stream_input\",     data: { job_id: \"...\", input: \"name\", value: \"data\", handle: \"...\" } }));\nsocket.send(JSON.stringify({ command: \"end_input_stream\", data: { job_id: \"...\", input: \"name\", handle: \"...\" } }));\n```\n\nThere is no pause or resume. An unknown command returns `Unknown command`.\n\n# Server Message Types\n\n| Type | Key fields | Purpose |\n|------|-----------|---------|\n| `job_update` | `status`, `result`, `error`, `cost` | Job lifecycle |\n| `node_update` | `node_id`, `node_name`, `status`, `error`, `result` | Node lifecycle |\n| `node_progress` | `progress`, `total`, `chunk` | Progress tracking |\n| `output_update` | `output_name`, `value`, `output_type` | Node output values |\n| `log_update` | `content`, `severity` | Log messages |\n| `chunk` | `content`, `done` | Streaming text |\n\n# MCP\n\n`\u002Fmcp` serves the agent capability tools over streamable HTTP, so an outside\nagent drives NodeTool with the same calls the in-product agent uses. Reach it\nthree ways:\n\n- `nodetool mcp install` configures a CLI agent (Claude Code, Codex).\n- In a NodeTool checkout, `npm run build:mcpb` builds `dist\u002Fnodetool.mcpb`, a one-file bundle Claude\n  Desktop installs by drag-and-drop. It is a stdio-to-HTTP bridge against a\n  running server's `\u002Fmcp`, and it starts in offline mode when the server is\n  down, then hot-attaches when it appears.\n- A deployed server is reached by pointing the client at `\u002Fmcp` with a token\n  minted in **Settings → MCP → Connect an agent remotely**.\n\n# Server Management (CLI)\n\n```bash\nnodetool serve                        # Start server (default 127.0.0.1:7777)\nnodetool serve --host 0.0.0.0          # Bind all interfaces\nnodetool serve --port 8080             # Custom port\nnodetool workflows list                # List saved workflows\nnodetool workflows get \u003Cid>            # Get workflow details\nnodetool workflows run \u003Cid>            # Run a workflow (uses the local DB)\nnodetool jobs list                     # List execution jobs\nnodetool secrets store OPENAI_API_KEY  # Store an API key\n```\n","You help users integrate with NodeTool's HTTP + WebSocket server (default `http:\u002F\u002Flocalhost:7777`). Start it with `nodetool serve` (flags: `--host`, `--port`).\n\n# Surfaces\n\n| Surface | Path prefix | Use case |\n|---------|-------------|----------|\n| **REST** | `\u002Fapi\u002F...` | Workflows, assets, collections, models, bundles, health |\n| **tRPC** | `\u002Ftrpc\u002F...` | The document surfaces: timelines, storyboards, sketches, scripts, applications, JS scripts, projects, skills, settings |\n| **OpenAI-compatible** | `\u002Fv1\u002F...` | Chat completions + model list |\n| **WebSocket** | `\u002Fws` | Run\u002Fcancel\u002Fstream jobs, live chat, live editor tools |\n| **MCP** | `\u002Fmcp` | Agent tools over streamable HTTP, for Claude Desktop and CLI agents |\n\nAuth is controlled by environment variables, not CLI flags (§ Authentication).\n\n**Pick the right surface.** REST covers workflows, assets and the portable\nbundles. Everything that is a *document* someone edits (a timeline sequence, a\nstoryboard, a sketch, a script, a mini app, a JS script) is a tRPC router, and\nthe REST routes for those kinds cover only import, export and build. An\nintegration that reads or writes a document calls tRPC, or calls the agent\ncapability of the same name over `\u002Fmcp`.\n\n# Authentication\n\nThe server picks its auth mode from `SUPABASE_URL` and `SUPABASE_KEY` alone. It\nreads neither `AUTH_PROVIDER` nor `NODETOOL_SERVER_MODE`.\n\n| Mode | Enabled by | Accepted credentials |\n|------|------------|----------------------|\n| Local | Default, with the Supabase variables unset | Loopback connections run as user `\"1\"` with no token. `NODETOOL_TRUST_LOCALHOST=false` turns that off. Sources in `NODETOOL_TRUST_LOCAL_NETWORKS` (comma-separated CIDRs) also run as user `\"1\"` with no token. A bearer equal to `SERVER_AUTH_TOKEN` runs as user `\"1\"`. A token minted by `nodetool deploy users-add` runs as that API user. Anything else gets `401`. |\n| Supabase | `SUPABASE_URL` and `SUPABASE_KEY` both set | Every non-public request needs a valid Supabase JWT. `SERVER_AUTH_TOKEN`, `NODETOOL_TRUST_LOCAL_NETWORKS` and API-user tokens are ignored. Loopback is trusted only with `NODETOOL_TRUST_LOCALHOST=true`. |\n\nIn both modes, an access token (`ntk_…`) created in **Settings → MCP → Connect\nan agent remotely** authenticates as the person who created it. Send any token\nas `Authorization: Bearer \u003Ctoken>`. A WebSocket client that cannot set headers\npasses `?api_key=\u003Ctoken>` on the `\u002Fws` URL.\n\n# REST Endpoints\n\n## Workflows\n\n```bash\n# List workflows\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fworkflows \\\n  -H \"Authorization: Bearer TOKEN\"\n\n# Get a workflow\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fworkflows\u002F\u003Cid> \\\n  -H \"Authorization: Bearer TOKEN\"\n\n# Export helpers\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fworkflows\u002F\u003Cid>\u002Fdsl-export      # TypeScript DSL\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fworkflows\u002F\u003Cid>\u002Fexport-bundle   # .nodetool bundle (zip)\n```\n\n`PUT \u002Fapi\u002Fworkflows\u002F\u003Cid>` replaces the stored graph. A node's\n`ui_properties.position` is in canvas coordinates unless the node has a\n`parent_id`. A node inside a group (`nodetool.workflows.base_node.Group`)\nstores the group's id in `parent_id` and a `position` relative to the group's\ntop-left corner. A node at canvas `(920, 1356)` inside a group at `(880, 1000)`\nstores `{\"x\": 40, \"y\": 356}`. A node with no `parent_id` is not a group member,\neven when it lies inside the group's rectangle, and does not move with it.\n\nRun a saved workflow over REST. This is the route `run_workflow`,\n`debug_workflow` and `nodetool debug` use. The editor runs over WebSocket\ninstead (§ WebSocket API).\n\n```bash\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fworkflows\u002F\u003Cid>\u002Frun \\\n  -H \"Authorization: Bearer TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"params\": {\"prompt\": \"a red fox\"}}'\n# Same body, returns the full debug report (summary and verdict) instead of the run row\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fworkflows\u002F\u003Cid>\u002Fdebug ...\n```\n\nThe body also takes `background: true` to return a job id at once, and\n`interactive: true` to park on escalations as a debug session (below).\n\n## Documents (tRPC)\n\nThe routers under `\u002Ftrpc`, one per document kind:\n`timeline`, `storyboards`, `sketch`, `scripts`, `applications`, `jsScripts`,\n`documents`, `workflows`, `projects`, `assets`, `collections`, `jobs`, `runs`,\n`appRuns`, `appInstances`, `resources`, `models`, `customProviders`, `nodes`,\n`memories`, `messages`, `threads`, `settings`, `skills`, `storage`, `packs`,\n`costs`, `credits`, `files`, `fonts`, `games`, `integrations`, `triggers`,\n`externalMcp`, `agentAccess`, `users`, `worker`, `workspace`.\n\nEach follows the same shape: `list`, `get`, `create`, `update` (compare-and-swap\non `updated_at`), `delete`, plus sub-routers. Whole-document snapshots are\n`timeline.versions`, `sketch.documentVersions` and `jsScripts.documentVersions`\n(`sketch.versions` is a different thing: the per-layer generation takes).\n`applications` also carries `publish`, `released`, `deploy`, `budget` and\n`usage`, because publishing an app locks in the current graph of every workflow\nit runs and caps what it may spend. Read the router in\n`packages\u002Fwebsocket\u002Fsrc\u002Ftrpc\u002Frouters\u002F` for the exact procedure names rather than\nguessing them. `\u002Ftrpc\u002Fhealthz` answers without auth.\n\nAn agent reaches the same data through the capability tools, which need no\nclient: `list_timelines`, `get_storyboard`, `edit_sketch`, `save_js_script`,\n`edit_app`, and so on.\n\n## Document REST routes\n\nThe REST side of the document kinds is import, export and build.\n\n```bash\n# Mini apps\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fapplications\u002F:id\u002Fexport-bundle       # app + every bound graph\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fapplications\u002Fimport-bundle\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fapplications\u002Fbuild           # {prompt|spec, provider, model, ...}\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fapplications\u002Fspec            # {prompt, provider, model} → {spec, issues}\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fapplications\u002Fdebug\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fapplications\u002Fexamples\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fapplications\u002Fexamples\u002F:slug\u002Finstall\n\n# Timelines and storyboards\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Ftimelines\u002F:id\u002Fexport-zip\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Ftimelines\u002Fimport-zip\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fstoryboards\u002F:id\u002Fexport-zip\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Ftimelines\u002F:id\u002Fisolate-subject\n\n# Native games: the published revision as a zip (target=web, tauri or expo)\ncurl -o game.zip 'http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fgames\u002F:id\u002Fexport-zip?target=tauri'\n# Compile the desktop executable on this machine; streams cargo output as NDJSON (refused on hosted servers)\ncurl -N -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fgames\u002F:id\u002Fbuild-executable\n\n# JS scripts\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fjs-scripts\u002F:id\u002Frun\n```\n\nA build or an interactive debug runs for minutes, so those routes accept\n`poll: true`, return a session id, and are read at\n`GET \u002Fapi\u002Fdebug\u002Fsessions\u002F:id` until they settle. Cancel with\n`POST \u002Fapi\u002Fdebug\u002Fsessions\u002F:id\u002Fcancel`.\n\n## Collections (RAG)\n\n```bash\n# Upload a text file into a collection (multipart, field name \"file\")\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fcollections\u002F\u003Cname>\u002Findex \\\n  -H \"Authorization: Bearer TOKEN\" \\\n  -F \"file=@notes.md\"\n```\n\nThe route indexes text only: plain text, Markdown, HTML, CSV and JSON. It\nreturns `415` for PDFs, Office files and images, which need an indexing\nworkflow. The collection must have an embedding model.\n\n## Models\n\n```bash\n# OpenAI-compatible model list\ncurl http:\u002F\u002Flocalhost:7777\u002Fv1\u002Fmodels -H \"Authorization: Bearer TOKEN\"\n```\n\n## Storage \u002F Assets\n\n```bash\n# Asset bytes are served under \u002Fapi\u002Fstorage\u002F...\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fstorage\u002F\u003Cpath>\n```\n\n## Health\n\n```bash\ncurl http:\u002F\u002Flocalhost:7777\u002Fhealth      # liveness (no auth)\ncurl http:\u002F\u002Flocalhost:7777\u002Fready        # readiness\ncurl http:\u002F\u002Flocalhost:7777\u002Fapi\u002Fhealth   # detailed health\n```\n\n# Chat API (OpenAI-Compatible)\n\n## HTTP\n\n```bash\n# Chat completion\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Authorization: Bearer TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"model\": \"gpt-5.4\",\n    \"messages\": [\n      {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n      {\"role\": \"user\", \"content\": \"Hello!\"}\n    ],\n    \"stream\": false\n  }'\n\n# Streaming (Server-Sent Events)\ncurl -X POST http:\u002F\u002Flocalhost:7777\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Authorization: Bearer TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"model\": \"gpt-5.4\", \"messages\": [{\"role\": \"user\", \"content\": \"Hi\"}], \"stream\": true}'\n```\n\n## Python Client (OpenAI SDK)\n\n```python\nimport openai\n\nclient = openai.OpenAI(api_key=\"TOKEN\", base_url=\"http:\u002F\u002Flocalhost:7777\u002Fv1\")\n\nresponse = client.chat.completions.create(\n    model=\"gpt-5.4\",\n    messages=[{\"role\": \"user\", \"content\": \"Hello!\"}],\n)\nprint(response.choices[0].message.content)\n\n# Streaming\nstream = client.chat.completions.create(\n    model=\"gpt-5.4\",\n    messages=[{\"role\": \"user\", \"content\": \"Hello!\"}],\n    stream=True,\n)\nfor chunk in stream:\n    if chunk.choices[0].delta.content:\n        print(chunk.choices[0].delta.content, end=\"\")\n```\n\n## JavaScript Client\n\n```typescript\nconst response = await fetch(\"http:\u002F\u002Flocalhost:7777\u002Fv1\u002Fchat\u002Fcompletions\", {\n  method: \"POST\",\n  headers: {\n    Authorization: \"Bearer TOKEN\",\n    \"Content-Type\": \"application\u002Fjson\",\n  },\n  body: JSON.stringify({\n    model: \"gpt-5.4\",\n    messages: [{ role: \"user\", content: \"Hello!\" }],\n    stream: false,\n  }),\n});\nconst data = await response.json();\nconsole.log(data.choices[0].message.content);\n```\n\n# WebSocket API — Running Jobs\n\n**Endpoint**: `ws(s):\u002F\u002F\u003Chost>\u002Fws`. Messages are an envelope `{ command, data }`.\nThe server replies in MsgPack until the client sends `set_mode` with\n`\"text\"`. A JSON client sends that first, or `JSON.parse` fails on every reply.\nIdentity comes from the connection's credential (§ Authentication), not from\nfields in the request body.\n\n```typescript\nconst socket = new WebSocket(\"ws:\u002F\u002Flocalhost:7777\u002Fws?api_key=\u003Ctoken>\");\n\nsocket.onopen = () => {\n  socket.send(JSON.stringify({ command: \"set_mode\", data: { mode: \"text\" } }));\n  \u002F\u002F Start a workflow run\n  socket.send(JSON.stringify({\n    command: \"run_job\",\n    data: {\n      type: \"run_job_request\",\n      workflow_id: \"\u003Cid>\",\n      job_type: \"workflow\",\n      params: { input_name: \"value\" },\n      job_id: \"\u003Cid>\",\n    },\n  }));\n};\n\nsocket.onmessage = (event) => {\n  const msg = JSON.parse(event.data);\n  switch (msg.type) {\n    case \"job_update\":\n      console.log(`Job ${msg.status}`); \u002F\u002F running | completed | failed | cancelled | suspended\n      if (msg.result) console.log(\"Result:\", msg.result);\n      break;\n    case \"node_update\":\n      console.log(`Node ${msg.node_name}: ${msg.status}`);\n      break;\n    case \"node_progress\":\n      console.log(`Progress: ${msg.progress}\u002F${msg.total}`);\n      break;\n    case \"output_update\":\n      console.log(`Output ${msg.output_name}:`, msg.value);\n      break;\n    case \"chunk\":\n      process.stdout.write(msg.content);\n      break;\n    case \"log_update\":\n      console.log(`[${msg.severity}] ${msg.content}`);\n      break;\n  }\n};\n```\n\n## Job Control Commands\n\n```typescript\nsocket.send(JSON.stringify({ command: \"cancel_job\",  data: { job_id: \"...\", workflow_id: \"...\" } }));\nsocket.send(JSON.stringify({ command: \"get_status\",  data: { job_id: \"...\" } }));\nsocket.send(JSON.stringify({ command: \"reconnect_job\", data: { job_id: \"...\", workflow_id: \"...\" } }));\n\n\u002F\u002F Stream input into a running node, then close the stream\nsocket.send(JSON.stringify({ command: \"stream_input\",     data: { job_id: \"...\", input: \"name\", value: \"data\", handle: \"...\" } }));\nsocket.send(JSON.stringify({ command: \"end_input_stream\", data: { job_id: \"...\", input: \"name\", handle: \"...\" } }));\n```\n\nThere is no pause or resume. An unknown command returns `Unknown command`.\n\n# Server Message Types\n\n| Type | Key fields | Purpose |\n|------|-----------|---------|\n| `job_update` | `status`, `result`, `error`, `cost` | Job lifecycle |\n| `node_update` | `node_id`, `node_name`, `status`, `error`, `result` | Node lifecycle |\n| `node_progress` | `progress`, `total`, `chunk` | Progress tracking |\n| `output_update` | `output_name`, `value`, `output_type` | Node output values |\n| `log_update` | `content`, `severity` | Log messages |\n| `chunk` | `content`, `done` | Streaming text |\n\n# MCP\n\n`\u002Fmcp` serves the agent capability tools over streamable HTTP, so an outside\nagent drives NodeTool with the same calls the in-product agent uses. Reach it\nthree ways:\n\n- `nodetool mcp install` configures a CLI agent (Claude Code, Codex).\n- In a NodeTool checkout, `npm run build:mcpb` builds `dist\u002Fnodetool.mcpb`, a one-file bundle Claude\n  Desktop installs by drag-and-drop. It is a stdio-to-HTTP bridge against a\n  running server's `\u002Fmcp`, and it starts in offline mode when the server is\n  down, then hot-attaches when it appears.\n- A deployed server is reached by pointing the client at `\u002Fmcp` with a token\n  minted in **Settings → MCP → Connect an agent remotely**.\n\n# Server Management (CLI)\n\n```bash\nnodetool serve                        # Start server (default 127.0.0.1:7777)\nnodetool serve --host 0.0.0.0          # Bind all interfaces\nnodetool serve --port 8080             # Custom port\nnodetool workflows list                # List saved workflows\nnodetool workflows get \u003Cid>            # Get workflow details\nnodetool workflows run \u003Cid>            # Run a workflow (uses the local DB)\nnodetool jobs list                     # List execution jobs\nnodetool secrets store OPENAI_API_KEY  # Store an API key\n```\n",{"name":5,"description":7},"main","c7226baa82daca42a19a5855c116544f97aa8bac","packages\u002Fsystem-skills\u002Fnodetool-api-reference",91,"https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool","https:\u002F\u002Fnodetool.ai\u002F","https:\u002F\u002Fgithub.com\u002Fnodetool-ai","No-code AI development","2026-11-15 03:27:49",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add nodetool-ai\u002Fnodetool --skill nodetool-api-reference",{"tool":70,"command":71},"bunx","bunx skills add nodetool-ai\u002Fnodetool --skill nodetool-api-reference",{"tool":73,"command":74},"pnpm","pnpm dlx skills add nodetool-ai\u002Fnodetool --skill nodetool-api-reference","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool\u002Fblob\u002Fmain\u002Fpackages\u002Fsystem-skills\u002Fnodetool-api-reference\u002FSKILL.md",true,[],[79,88,114,144,159,174],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":83,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":87},"01M742MX3Y2ZYK884ZXTRFKB9P","humanizer","Rewrite AI-sounding text so it reads like the writer without changing what it says.\nUse when editing or reviewing prose for AI tells: not-X-but-Y contrasts, one-line\nclosers, staged openers, forced triads, dashes everywhere, inflated claims, sales\nlanguage, stock AI words, bold labels, or filler.","MIT","https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fhumanizer\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":89,"name":34,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":95,"publishedAt":50},"01M6BY4D93R0Q9400ZHJ04DXP1","Use the NodeTool MCP server to build, validate, run, and debug visual AI workflows, and to work with assets, collections, and jobs. Use when the user mentions NodeTool or asks for a workflow graph, a node, or a media generation run on their NodeTool server.","https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool\u002Fblob\u002Fmain\u002Fplugins\u002Fchatgpt\u002Fnodetool\u002Fskills\u002Fnodetool\u002FSKILL.md",[93,94],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},[34,37,96,97,98,99,100,38,101,102,103,104,105,106,107,108,109,110,111,112,113,49],"Media","workflows","when","generation","media generation","visual","use","collections","for","node","work","debug","graph","validate","assets","run","server","mcp server",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":123,"publishedAt":50},"01M6BY4AEB05ZPBRVD078ATR2H","wan-2-6-prompting","Prompt Alibaba's Wan 2.6 video — text-to-video with a global style line plus timing-bracketed shots, and image-to-video that describes only what changes over time. Covers the shot-mode switch per provider, the prompt budget, negative prompts, motion intensity wording, audio input and prompt expansion. Use whenever the model id names a Wan 2.6 video route (alibaba\u002Fwan-2.6\u002Ftext-to-video, alibaba\u002Fwan-2.6\u002Fimage-to-video, wan-video\u002Fwan-2.6-t2v, wan-video\u002Fwan-2.6-i2v, wan-video\u002Fwan2.6-i2v-flash) on generate_video, animate_image or a TextToVideo node. Not for Wan 2.5 or 2.7, or the Wan 2.6 image routes.","https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool\u002Fblob\u002Fmain\u002Fpackages\u002Fsystem-skills\u002Fwan-2-6-prompting\u002FSKILL.md",[120],{"categoryNo":121,"categoryName":122,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",[124,125,126,127,128,129,130,105,131,132,133,134,135,136,137,138,139,140,141,142,143],"prompting","wan 2 6 prompting","line","expansion","input","image-to-video","text-to-video","route","only","mode","time","flash","Budget","generate","text","image","animate","model","Audio","Video",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":152,"publishedAt":50},"01M6BY47T4748ZG5ZMTAR97ZWZ","video-workflow","Build a reusable NodeTool video workflow for batches or repeated inputs. For a single finished piece, use a storyboard skill.","https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool\u002Fblob\u002Fmain\u002Fpackages\u002Fsystem-skills\u002Fvideo-workflow\u002FSKILL.md",[150,151],{"categoryNo":121,"categoryName":122,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[49,153,143,154,155,156,157,102,158,34,104],"video workflow","reusable","storyboard","build","batches","single",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":166,"publishedAt":50},"01M6BY4587N2SYN315SXGEMZC3","video-clone","Analyze a reference video and recreate its shot structure with a new product or cast in NodeTool.","https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool\u002Fblob\u002Fmain\u002Fpackages\u002Fsystem-skills\u002Fvideo-clone\u002FSKILL.md",[165],{"categoryNo":121,"categoryName":122,"taxonomyType":21,"taxonomyTypeDesc":22},[167,168,143,38,169,170,34,171,172,173,35],"clone","video clone","cast","new","analyze","product","structure",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":181,"publishedAt":50},"01M6BY4257C2KQYYMD9EK6DK8E","video-audio-continuity","Keep sound continuous across a multi-scene piece cut from generated video — why one clip per scene hard-cuts the audio at every boundary, when to write all the scenes into a single generation instead, the sound-design vocabulary that survives a provider's copyright filter, and how to check the length, the aspect ratio and the mix of what came back. Use when a piece has more than one scene and the video model writes its own audio (Seedance 2, Veo 3, MiniMax H3, Kling 2.6 and later), or when a cut's sound drops out at the shot changes.","https:\u002F\u002Fgithub.com\u002Fnodetool-ai\u002Fnodetool\u002Fblob\u002Fmain\u002Fpackages\u002Fsystem-skills\u002Fvideo-audio-continuity\u002FSKILL.md",[180],{"categoryNo":121,"categoryName":122,"taxonomyType":21,"taxonomyTypeDesc":22},[182,143,142,183,184,185,186,187,188,189,190,191,192,98,193,194,141,195,196,197,198],"video audio continuity","continuity","write","why","back","veo 3","at","cut","later","across","filter","generated","how to","mix","design","boundary","how"]