API Overview
Welcome to the Orga React SDK API Reference — your complete guide to the hooks, components, and types exposed by @orga‑ai/react.
The React SDK enables Orga AI’s multimodal features—voice, video, and real‑time data streams—directly inside web and desktop React applications through a simple provider + hook architecture.
Sections
- Hooks — Hook interfaces for controlling sessions, media, and AI interactions (
useOrgaAI()). - Components — Context provider and lightweight media components (
<OrgaAIProvider>,<OrgaAudio>,<OrgaVideo>). - Types — TypeScript interfaces, enums, and configuration types exported by the SDK.
đź’ˇ Tip:
The React SDK mirrors the design of the React Native SDK. If you plan to target both web and mobile, your app logic can often be shared directly between@orga‑ai/reactand@orga‑ai/react‑native.
Structure
Each reference page includes:
- Concise descriptions of the API surface.
- Code examples using TypeScript / JSX.
- Detailed tables describing props, return values, and parameters.
- Implementation notes around lifecycle, state, and performance.
Development Environment Requirements
| Requirement | Description |
|---|---|
| React ≥18.2 | Required for concurrent‑safe context and hooks. |
| Browser support | Uses WebRTC (RTCPeerConnection, MediaStream) and the Permissions API. |
| Bundlers | Works with Vite, Next.js, CRA, and custom Webpack setups. Make sure your bundler resolves exports maps. |
| Backend integration | A backend service (Server SDK or REST proxy) is required to securely issue ephemeral tokens for client sessions. |
Never expose your Orga API key in client‑side code.
Always proxy requests through a backend using one of the server SDKs.
Versioning
All Orga SDKs follow semantic versioning (SemVer).
Breaking API changes correspond to major version bumps (e.g., 1.x → 2.x).
The React SDK’s current stable version is v1.0.5 (open beta).
See the Changelog for release notes.
Recommended Reading
If this is your first time using the SDK, start here:
- Quick Start → Step‑by‑step walkthrough for web integration.
- Architecture → Understand how context, hooks, and the core runtime interact.
- Troubleshooting → Resolve common initialization issues.
Next Steps
- Hooks → Control sessions, devices, permissions, and AI interactions using
useOrgaAI(). - Components → UI primitives such as
<OrgaAIProvider>and media components. - Types → TypeScript types and enums exported by the SDK.