WebSocket API Connection
Connect directly to NextEVI’s WebSocket API for maximum control and platform flexibility. This guide covers establishing connections, authentication, and basic message handling.Quick Start
WebSocket URL
string
required
Unique connection identifier. Generate a UUID v4 for each new connection.
Authentication Methods
- API Key (Recommended)
- JWT Token (Header)
- JWT Token (Query Parameter)
Pass your organization API key as a query parameter:Required Parameters:
api_key- Your organization API key (starts withoak_)config_id- Voice configuration identifierproject_id- Project identifier (optional, auto-detected from config if not provided)
Connection Examples
Platform-Specific Examples
- Browser
- Node.js
- Python
- cURL (Testing)
Connection Flow
- WebSocket Handshake: Client initiates WebSocket connection
- Authentication: Server validates API key or JWT token
- Connection Metadata: Server sends connection details
- Session Settings: Client configures audio and feature settings
- Ready: Connection ready for voice communication
Next Steps
Message Protocol
Learn the complete WebSocket message format
Audio Handling
See examples of sending and receiving audio
Troubleshooting
Connection Issues
- Ensure your API key starts with
oak_ - Verify your config_id is valid
- Check network connectivity and firewall settings
Authentication Errors
- Double-check API key format and permissions
- Ensure JWT token is properly formatted and not expired
- Verify project_id matches your configuration
