Skip to main content
The official TypeScript SDK provides a type-safe, ergonomic way to interact with the Sully.ai API. It handles authentication, retries, and error handling automatically.

Installation

Install the SDK using npm:
Or using yarn:

Quick Setup

Environment Variables

The SDK automatically reads credentials from environment variables:

Client Initialization

Audio Transcriptions

Upload a File

Upload an audio file for transcription:

Poll for Completion

After uploading, poll until the transcription is complete:

Delete a Transcription

Remove a transcription when no longer needed:

Notes

Create a SOAP Note

Generate a SOAP note from a transcript:

Create with Context

Provide additional context to improve note quality:

Retrieve a Note

Poll until the note is ready:

Error Handling

The SDK provides specific error classes for different failure scenarios:

Error Properties

All SDK errors include helpful properties:

Automatic Retries

The SDK automatically retries failed requests with exponential backoff for transient errors (network issues, 5xx responses).

Timeouts

Configure request timeouts to prevent hanging requests:

TypeScript Benefits

The SDK is written in TypeScript and provides full type safety:

Type-Safe Requests

Response Types

All responses are fully typed for excellent IDE autocompletion:

Exported Types

Import types for use in your application:

Next Steps

Audio Transcription Guide

Learn more about transcribing audio files and streaming

Error Handling

Understand API authentication and error responses