Client
new Spine(options)
Runs
| Method | Returns | Description |
|---|---|---|
client.runs.create(params) | Promise<CreatedRun> | Submit a new run. |
client.runs.retrieve(runId) | Promise<Run> | One-shot status fetch. |
client.runs.waitForCompletion(runId, options?) | Promise<TerminalRun> | Poll until terminal; throws on timeout or failure. |
CreateRunParams
WaitForCompletionOptions
Canvas
| Method | Returns |
|---|---|
client.canvases.getDag(canvasId) | Promise<Canvas> |
client.canvases.getTasks(canvasId) | Promise<TaskTree> |
client.canvases.getTask(canvasId, taskId) | Promise<Task> |
Discriminated run union
status to access state-specific fields — result,
progress, duration_ms, errors.
String enums
Template
'auto', 'deep_research', 'report', 'slides', 'memo',
'excel', 'app', 'landing_page'. See
Templates.
BlockType
17 members covering every block type the platform produces. See
Block types.
RunStatus
'running', 'completed', 'partial', 'failed'.
TaskType
'parent-task', 'persona-task', 'tool-call-task'.
Types
All exported from the top-levelspine-sdk package:
Errors
Utilities
Runtime support
- Node.js ≥ 18 (native
fetch,FormData,Blob). - Modern browsers.
- Deno (via npm specifier).
- Bun.
- Cloudflare Workers and other V8-isolate edge runtimes.
.d.ts bundles. Zero
runtime dependencies.