Docs
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
Neon
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
Class References
Function References
Interface References
Type Alias References
Variable References
Interface References

RealtimeAdapter

Interface: RealtimeAdapter

Defined in: packages/ai/src/realtime/types.ts:312

Adapter interface for connecting to realtime providers. Each provider (OpenAI, ElevenLabs, etc.) implements this interface.

Defined here in @tanstack/ai — the shared layer that both provider adapter packages and the client runtime (@tanstack/ai-client) already depend on — so a provider package can describe its realtime adapter without taking a dependency on the client-only @tanstack/ai-client. @tanstack/ai-client re-exports this type for backwards compatibility.

Properties

connect()

ts
connect: (token, clientTools?) => Promise<RealtimeConnection>;
connect: (token, clientTools?) => Promise<RealtimeConnection>;

Defined in: packages/ai/src/realtime/types.ts:322

Create a connection using the provided token

Parameters

token

RealtimeToken

The ephemeral token from the server

clientTools?

readonly AnyClientTool[]

Optional client-side tools to register with the provider

Returns

Promise<RealtimeConnection>

A connection instance


provider

ts
provider: string;
provider: string;

Defined in: packages/ai/src/realtime/types.ts:314

Provider identifier