Skip to main content
The @corti/sdk package exports four main APIs:

CortiClient

The main client for all Corti API operations.

Constructor options

JavaScript

Request options

Every HTTP method accepts an optional request options object as the last argument:
JavaScript

Client methods


Resource groups

The client exposes the following resource groups as properties:

Interactions

Manage interaction sessions that group recordings, transcripts, documents, and facts together.

Recordings

Upload and manage audio recordings within an interaction.
JavaScript
See File uploads for all supported file input types.

Languages

List available languages and which endpoints support each language.

Transcripts

Create transcriptions from uploaded recordings and retrieve results.
JavaScript

Guided Document Generation

Generate structured clinical documents using guided synthesis. Accepts a template reference, an ad-hoc assembly of sections, or a fully inline dynamic template.
See the Guided Synthesis guide for the four template-supply paths and context options.

Guided Templates

Create, version, and publish document templates that define section composition and generation instructions.

Template Versions


Guided Sections

Create, version, and publish document sections that define individual clinical note components with structured output schemas.

Section Versions


Documents (Classic)

These interaction-scoped methods are deprecated. Use Guided Document Generation with client.documents.generate() instead.

Facts

Extract structured clinical facts from text or manage facts on an interaction.

Templates

List and inspect document generation templates available to your tenant.
JavaScript

Codes

Predict medical codes from clinical data.
JavaScript

Agents

Create and interact with AI agents (Agentic Framework).
JavaScript

Stream

Real-time WebSocket connection for combined transcription, fact extraction, and more — tied to an interaction.

connect parameters

The SDK injects tenantName and token automatically. If configuration is provided and awaitConfiguration is true, the promise rejects when the stream configuration is denied (CONFIG_DENIED, CONFIG_MISSING, CONFIG_NOT_PROVIDED).

Socket methods


Transcribe

Real-time WebSocket speech-to-text without an interaction context.
JavaScript

connect parameters

The socket methods are the same as Stream (sendAudio, sendFlush, sendEnd, close, etc.). The key differences are:
  • No interaction ID — Transcribe operates standalone
  • Different message types — Transcribe delivers transcript, command, flushed, ended, usage, delta_usage, and error messages, while Stream delivers transcript, facts, flushed, ended, usage, delta_usage, and error

Auth

OAuth token management. In most cases you won’t call these directly — the SDK handles tokens automatically based on the auth option you pass to the constructor. These methods are useful for advanced scenarios like generating authorization URLs for browser-based flows.
For detailed usage and end-to-end examples, see the Authentication Guide. For standalone use without CortiClient, see CortiAuth below.

CortiAuth

A standalone authentication client for when you need OAuth token management without the full CortiClient. Useful for proxy servers, custom backends, or applications that handle tokens separately from API calls.
JavaScript

Constructor options

Methods

All token methods accept an optional scopes array. openid and profile are added automatically — pass additional scopes like "streams" or "transcribe" to get a scoped token.
For end-to-end examples and detailed usage of each method, see the Authentication Guide.

CortiWebSocketProxyClient

A lightweight client for WebSocket-only proxy scenarios. Unlike CortiClient, it requires no environment, tenant, or authentication configuration — all routing is handled by the proxy option you pass at connect time.
JavaScript

Static properties

stream.connect

Returns Promise<CustomStreamSocket> — same socket API as client.stream.connect.

transcribe.connect

Returns Promise<CustomTranscribeSocket> — same socket API as client.transcribe.connect.

ProxyOptions

The ProxyOptions type is also exported from @corti/sdk for use when typing proxy arguments in your own code.
JavaScript
For a full walkthrough of proxy patterns (including baseUrl, custom environments, encodeHeadersAsWsProtocols, and scoped tokens), see the Proxy Guide.

Utilities

The @corti/sdk/utils sub-package exports helper functions for token inspection, environment resolution, PKCE, and dictation transcript assembly. These are useful in proxy servers, middleware, custom authentication flows, and dictation UIs.
JavaScript