Skip to main content
The Corti.Sdk package exports two main entry points:

CortiClient

The main client for all Corti API operations.

Constructors

CortiEnvironmentInput accepts a region string, a CortiClientEnvironment, or CortiEnvironments.FromBaseUrl(...) via implicit conversion. Overload 2 decodes tenant and environment from the access token JWT. If the token cannot be decoded, use overload 1 instead. Overload 3 sends no Authorization header. CreateStreamApiAsync / CreateTranscribeApiAsync require a tenant and will throw. See Proxy / passthrough.

CortiRequestOptions


Request options

Every HTTP method accepts an optional RequestOptions parameter:
C# .NET

Resource groups

The client exposes the following resource groups as properties: WebSocket APIs are created via factory methods:

Interactions

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

Recordings

Upload and manage audio recordings within an interaction.
C# .NET

Languages

List available languages and which endpoints support each language.

Transcripts

Create transcriptions from uploaded recordings and retrieve results.
C# .NET

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

C# .NET

Documents (Classic)

These interaction-scoped methods are superseded by Guided Document Generation via client.Documents.GenerateAsync(). Migrate to the guided API for new integrations.
C# .NET

Facts

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

Templates

List and inspect document generation templates available to your tenant.
C# .NET

Codes

Predict medical codes from clinical data.
C# .NET

Agents

Create and interact with AI agents (Agentic Framework).
C# .NET

Stream

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

Factory method

Returns Task<IStreamApi>.

ConnectAsync parameters

Events

Subscribe to events using the .Subscribe() method on each Event<T> field:

Methods


Transcribe

Real-time WebSocket speech-to-text without an interaction context.
C# .NET

ConnectAsync parameters

Events

Methods

The key differences from Stream are:
  • No interaction ID — Transcribe operates standalone via CreateTranscribeApiAsync() (no interactionId parameter)
  • 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 via client.Auth. 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. All GetTokenAsync overloads also accept *WithScopes request variants (e.g. OAuthTokenRequestWithScopes) to request scoped tokens.
For detailed usage and end-to-end examples, see the Authentication Guide. For standalone use without CortiClient, see CustomAuthClient below.

CustomAuthClient

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.
C# .NET

Constructor options

Methods

All GetTokenAsync overloads also accept *WithScopes request variants to request scoped tokens.
For end-to-end examples of each method, see the Authentication Guide.

Authentication types

The CortiClientAuth abstract record has the following concrete variants used with the CortiClient constructor:

Error handling

The SDK throws typed exceptions you can catch and inspect:
C# .NET
All inherit from CortiClientApiException, which inherits from CortiClientException.

Utilities

Helper types for dictation transcript assembly when building a UI on /transcribe:

Environments

Use CortiEnvironments to create custom environments:
C# .NET