Skip to Content
🚀 Orga AI is in open beta.
ReferenceCore (init config)

Core init config

OrgaAI.init(config) is the entry point for configuring the Orga client runtime. It lives in @orga-ai/core, which you do not normally install yourself: the React, React Native, and Widget SDKs depend on it and call init() when you set up your app (e.g. in a provider or initWidget()). This page documents the config object so you know what you can pass.


Where init runs

SDKHow config is passed
ReactYou call OrgaAI.init({ ... }) (from @orga-ai/react) before rendering <OrgaAIProvider>.
React NativeSame: OrgaAI.init({ ... }) from @orga-ai/react-native in your app bootstrap.
WidgetinitWidget({ ... }) forwards session/voice/log options into OrgaAI.init() internally.
Core onlyIf you use @orga-ai/core directly (e.g. custom adapter), you call OrgaAI.init(config) yourself.

OrgaAI.init(config)

Stores global defaults used for session creation, logging, and credential fetching. Call once before starting any session.

import { OrgaAI } from '@orga-ai/react'; // or @orga-ai/react-native, or @orga-ai/core OrgaAI.init({ fetchSessionConfig: async () => { /* ... */ }, logLevel: 'info', model: 'orga-1-beta', voice: 'SofĂ­a', });

Config object (OrgaAIConfig)

PropertyTypeRequiredDefaultDescription
fetchSessionConfig() => Promise<{ ephemeralToken: string; iceServers: RTCIceServer[] }>Yes1—Async function that returns ephemeral token and ICE servers. Typically calls your backend; never put API keys in client code.
sessionConfigEndpointstringNoundefinedHuman-readable endpoint label used in logs and error messages (e.g. "https://api.example.com/orga-session"). Does not trigger requests.
logLevel'disabled' | 'error' | 'warn' | 'info' | 'debug'No'info'SDK logging verbosity. Use 'debug' during development to inspect WebRTC and session flow.
modelOrgaAIModelNo'orga-1-beta'Default AI model for new sessions. See Models.
voiceOrgaAIVoiceNo'SofĂ­a'Default voice for synthesized audio. See Voices.
temperaturenumberNo0.7Default sampling temperature for model responses (0–1).
enableTranscriptionsbooleanNotrueWhether to request transcriptions for user and assistant turns in the session.

Either fetchSessionConfig or a backend that the SDK can call must be provided; in practice all client setups use fetchSessionConfig to keep credentials server-side.


Other methods

MethodReturnDescription
OrgaAI.getConfig()OrgaAIConfig | nullReturns the current config passed to init(), or null if not initialized.
OrgaAI.isInitialized()booleanWhether init() has been called.

Relation to Node SDK config

The Node SDK (@orga-ai/node) uses a different config type, also named OrgaAIConfig, for its server-side OrgaAI class: it includes apiKey, baseUrl, timeout, and debug. That type is documented under Node SDK types. The table above describes only the client config used by OrgaAI.init() from @orga-ai/core.


Last updated on