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
Persistence (Advanced)
Embeddings
Reranking
Evaluate
Sandboxes (Advanced)
Class References
Function References
Interface References
Type Alias References
Variable References
Interface References

RealtimeAdapter

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

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:329

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:321

Provider identifier