Web
React SDK Setup
Get started with the Outspeed React SDK for realtime voice AI applications
Installation
Install the React SDK using your preferred package manager:
Prerequisites
Before using the React SDK, you’ll need:
- Outspeed API Key: Get your API key from the Outspeed Dashboard
- Backend Token Endpoint: A server endpoint to generate ephemeral keys for client authentication
Backend Setup
The React SDK requires a backend endpoint to generate ephemeral tokens for secure client authentication. Create a /token
endpoint on your server:
Environment Variables
Add your Outspeed API key to your server’s environment variables:
Never expose your Outspeed API key in client-side code. Always generate ephemeral tokens on your backend server.
Session Configuration
The React SDK uses a SessionConfig
object to configure voice sessions:
Configuration Options
Option | Type | Description |
---|---|---|
model | string | Must be "outspeed-v1" |
instructions | string | System prompt for the AI assistant |
voice | string | Voice ID to use for speech synthesis |
turn_detection | object | Voice activity detection settings |
first_message | string | Optional initial message from assistant |
You can find available voices for outspeed-v1
at dashboard.outspeed.com
Next Steps
Now that you have the SDK installed and configured, you can start building voice AI applications:
- Basic Example - Learn how to create a simple voice conversation
- API Reference - Explore all available methods and events