Skip to main content
The TypeScript SDK is generated from the same OpenAPI spec as the API reference, so every endpoint has a typed function with typed request and response objects. It needs Node 24 or later.

Install

The SDK is at version 0.1, a beta: it may change between 0.x releases. The source is public at github.com/Larynth-Labs/larynth-node. Report problems there.

Configure

Create an API key in the dashboard and keep it in an environment variable. Call configure once at startup.
Each endpoint is a function named after its operation, such as listAssistants, createCall or getCallAnalysis. The names match the operationId shown on every endpoint page. Functions take one options object with body, path, query and headers as the endpoint needs. By default they return { data, error, response }. Pass throwOnError: true to get data directly and throw on a failed request.

Example: list assistants

Example: place a call

createCall needs an Idempotency-Key so a retry cannot place the call twice. See idempotency. Use only numbers you have the right to call. Outbound calls go through the same compliance checks as a campaign.

Example: read a call summary

Example: create a webhook endpoint

The secret is shown once. Store it before you leave the script.

Handle errors

Without throwOnError, check error. It is the parsed problem response.

Verify webhooks

verifyWebhook throws a WebhookVerificationError if the signature or timestamp is wrong. signWebhook builds a signature, which is useful in tests. See verify signatures.