@talqing/sdk is the server-side client for the whole /v1 API, generated from the OpenAPI document. Node 20+, ESM and CommonJS builds, no runtime dependencies beyond fetch.
Breaking changes in 0.13.0. RecordingSpec.consent and consent_notice are replaced by notice, and consent_withdrawn is no longer a recording state. New: secrets on calls.token, calls.outbound, calls.resume, chats.create and tools.run (session secrets).
The client holds a personal access token with your full workspace role. Keep it on your server. For browsers, mint a call token with POST /v1/calls/token and use @talqing/react.

Creating a client

The call shape

Path and query parameters go in one flat object; a request body is keyed by its schema name in camelCase. Every method resolves to the response body and throws on any non-2xx.
The body key for each method is the request schema’s name (createAgentRequest, outboundCallRequest, chatMessageRequest, …); your editor autocompletes it.

Errors

Every API error is thrown as TalqingApiError with .status, .message, .errors (always an array) and .response. instanceof works across the ESM and CommonJS builds. A request that never reached the API (DNS, abort, offline) rethrows the transport’s own error. See errors.

Pagination

paginate(page, { limit = 200 }) is an async generator over any list method. Put filters in the closure.

Streams

conversations.events and copilot.agents.stream / tools.stream / tasks.stream resolve to { stream }, an async iterable of frames typed by event. Pass an AbortSignal in the second argument to stop.
The options argument also accepts sseMaxRetryAttempts, sseDefaultRetryDelay, sseMaxRetryDelay, onSseError and onSseEvent. Frame shapes are in streaming.

Types

Every request and response schema is exported under its API name, plus:

Next

SDK overview

Every resource namespace.

React and browser

Joining a call from a web page.