Skip to main content
The Hyperclip API ships official SDKs for Node and Python. Both wrap the same REST endpoints documented elsewhere in this section, so you can mix and match — start with curl in a notebook, switch to the SDK when you ship.

Node SDK

npm install hyperclip · TypeScript-first · Node 18+ · zero runtime deps

Python SDK

pip install hyperclipco · Python 3.9+ · httpx under the hood
Source: github.com/hyperclip/hyperclip-sdks

Install

The npm package is hyperclip. The PyPI package is hyperclipco (the bare hyperclip name was already taken). The Python module imports as hyperclipco, but the class is still Hyperclip for consistency with the Node SDK.

Configure

The only thing you need is your API key. Set HYPERCLIP_API_KEY in your environment and the SDK picks it up automatically — the base URL defaults to Hyperclip production, so you don’t have to configure it.
You can also pass the key explicitly — handy for multi-tenant servers, tests, or edge runtimes without process.env:

Constructor options

Method reference

All methods are grouped under two namespaces: runs (the asynchronous-execution endpoints) and flows (saved-flow inspection).

runs.create(params) · POST /runs

Submit a new run. Returns immediately with a run handle — does not wait for completion.
Parameters (mutually-exclusive: one of flow_id or flow_schema required):
  • flow_id · saved flow UUID from flows.list()
  • flow_schema · inline FlowSchema JSON; see flows
  • inputs · per-step overrides; see inputs
  • idempotency_key · opaque retry key; strongly recommended for every call
Always pass an idempotency_key. If your code retries the call after a network blip, the same key returns the existing run instead of creating a duplicate one.

runs.get(id) · GET /runs/:id

Fetch the latest state of a single run. Use this to poll, or use the higher-level wait() method below.

runs.wait(id, options?) · convenience polling

Poll until the run reaches a terminal state (completed, failed, or cancelled). Replaces hand-rolled polling loops.
Behavior:
  • Returns the final run object on completed, failed, or cancelled.
  • Raises HyperclipTimeoutError if the run doesn’t finish within timeoutMs / timeout.
  • The onUpdate / on_update callback fires on every poll — use it for progress UI or structured logging.

runs.list(params?) · GET /runs

List your recent runs. Useful for dashboards or reconciliation jobs.

runs.cancel(id) · POST /runs/:id/cancel

Cancel a queued or running run. The worker stops at the next step boundary; any in-flight provider call still completes and bills naturally.

flows.list() · GET /flows

List flows the API key can access (your own flows plus any public ones you’ve saved).

flows.get(id) · GET /flows/:id

Fetch a single flow’s full FlowSchema plus its required_inputs summary — what prompts and media slots the API caller must fill in.

Errors

Both SDKs raise a typed error class when the API returns a non-2xx response:
See error codes for the full catalog of code values you can branch on.

Runtime requirements

The Node SDK works on Vercel, Netlify, AWS Lambda, Cloudflare Workers, Bun, and Deno (with npm: specifiers). Edge runtimes need to support fetch and crypto.randomUUID(). The Python SDK works in any 3.9+ environment that allows installing httpx. For async codebases, you can pass your own httpx.AsyncClient and call the SDK from synchronous threads, or wait for the upcoming async client.

Versioning

Both SDKs follow SemVer and ship in lockstep — [email protected] matches hyperclipco==0.1.x. Pin to a minor version in production:

When not to use the SDK

The SDKs are thin wrappers — they don’t unlock any capabilities you can’t get from raw HTTP. Reach for raw fetch / requests / curl when:
  • You’re calling Hyperclip from a language we don’t ship an SDK for (Go, Ruby, PHP, etc.). The REST API is plain JSON over HTTPS.
  • You need an HTTP client behavior the SDK doesn’t expose — custom retries, mTLS, structured logging hooks. The SDK uses fetch / httpx, both of which are wrappable.
  • You’re prototyping in a notebook or shell. curl | jq and requests.post() are perfectly fine.
The endpoint reference in runs and flows covers the raw HTTP path for every operation.

Where to next

Quickstart

End-to-end: install the SDK, run a flow, save the MP4.

Node example

Bulk processing, Next.js routes, idempotency patterns.

Python example

CSV-driven batch jobs, FastAPI proxies, async patterns.

Error reference

Every error code with recovery guidance.

Build with AI tools

Wire Claude, Cursor, or Copilot into these docs via the hosted MCP server.