Documentation Index
Fetch the complete documentation index at: https://docs.nextevi.com/llms.txt
Use this file to discover all available pages before exploring further.
Error Reference
Complete guide to NextEVI API errors, including error codes, common causes, and troubleshooting solutions.Error Format
All API errors follow a consistent format:WebSocket Errors
Connection Errors
Connection failures use WebSocket close codes with reason phrases:Authentication Errors
AUTH_REQUIRED (4001)
HTTP Status: 401 UnauthorizedWebSocket Close Code: 4001 Cause: No authentication credentials provided in the connection request. Solutions:
- Include
api_keyquery parameter with valid API key - Include
Authorizationheader with valid JWT token - Include
authorizationquery parameter with JWT token
AUTH_FAILED (4001)
HTTP Status: 401 UnauthorizedWebSocket Close Code: 4001 Cause: Authentication credentials are invalid, expired, or malformed. Common Issues:
- API key format incorrect (must start with
oak_) - API key revoked or expired
- JWT token expired or invalid signature
- JWT token missing required claims
- API Key Issues
- JWT Token Issues
ACCESS_DENIED (4003)
HTTP Status: 403 ForbiddenWebSocket Close Code: 4003 Cause: Valid authentication but insufficient permissions for the requested resource. Common Issues:
- API key doesn’t have access to specified project
- JWT token missing required permissions
- Account suspended or billing issues
- Verify project permissions in NextEVI dashboard
- Check account status and billing
- Ensure JWT token includes required scopes
- Contact support if permissions appear correct
Configuration Errors
CONFIG_NOT_FOUND (4004)
HTTP Status: 404 Not FoundWebSocket Close Code: 4004 Cause: The specified
config_id does not exist or is not accessible.
Solutions:
- Verify config_id exists in your NextEVI dashboard
- Check config_id spelling and format
- Ensure config belongs to the correct project
- Create a new config if necessary
INVALID_PROJECT (4004)
HTTP Status: 404 Not FoundWebSocket Close Code: 4004 Cause: The specified
project_id is invalid or not accessible.
Solutions:
- Verify project_id in NextEVI dashboard
- Remove project_id parameter to use auto-detection
- Check project ownership and permissions
Connection Errors
CONNECTION_FAILED (4002)
WebSocket Close Code: 4002 Cause: Failed to establish or register the WebSocket connection. Common Issues:- Server overloaded or unavailable
- Network connectivity problems
- Invalid connection parameters
- Retry connection with exponential backoff
- Check network connectivity
- Verify all required parameters are provided
- Try connecting to a different region if available
CONNECTION_TIMEOUT (1001)
WebSocket Close Code: 1001 Cause: Connection timed out due to inactivity or network issues. Solutions:- Implement keep-alive messages
- Check network stability
- Reduce idle timeout if configurable
- Implement automatic reconnection
Audio Processing Errors
AUDIO_PROCESSING_FAILED (5001)
Cause: Failed to process audio input data. Common Issues:- Invalid audio format or encoding
- Corrupted audio data
- Audio chunk too large
- Unsupported sample rate
- Audio Format
- Data Validation
AUDIO_FORMAT_UNSUPPORTED (5002)
Cause: Audio format not supported by the processing pipeline. Supported Formats:- Encoding: linear16 (16-bit PCM)
- Sample Rate: 24000 Hz
- Channels: 1 (mono)
- Bit Depth: 16 bits
AUDIO_CHUNK_TOO_LARGE (5003)
Cause: Audio chunk exceeds maximum allowed size. Limits:- Maximum chunk size: 1 MB
- Recommended chunk size: 100-200 KB (100-200ms of audio)
Rate Limiting Errors
RATE_LIMITED (4004)
HTTP Status: 429 Too Many RequestsWebSocket Close Code: 4004 Cause: Exceeded rate limits for connections or messages. Rate Limits:
- Connections: 100 per minute per API key
- Messages: 1000 per minute per connection
- Audio chunks: 100 per second per connection
- Connection Pooling
- Message Throttling
Session Errors
SESSION_EXPIRED (5004)
Cause: Session has expired or been terminated. Common Causes:- Session exceeded maximum duration (60 minutes)
- Inactivity timeout reached
- Server restart or maintenance
- Implement session refresh logic
- Reconnect with new session
- Handle graceful session termination
SESSION_LIMIT_EXCEEDED (5005)
Cause: Maximum number of concurrent sessions exceeded. Limits:- Free tier: 1 concurrent session
- Pro tier: 10 concurrent sessions
- Enterprise: Custom limits
- Implement session management
- Queue connections when at limit
- Upgrade plan for higher limits
Server Errors
INTERNAL_ERROR (5000)
WebSocket Close Code: 1011 Cause: Internal server error occurred. Solutions:- Retry connection after delay
- Check NextEVI status page
- Contact support if error persists
SERVICE_UNAVAILABLE (5503)
HTTP Status: 503 Service Unavailable Cause: NextEVI service is temporarily unavailable. Solutions:- Implement exponential backoff retry
- Check service status
- Use fallback if available
Message Format Errors
INVALID_MESSAGE_FORMAT (4000)
Cause: Message does not conform to expected JSON schema. Common Issues:- Invalid JSON syntax
- Missing required fields
- Incorrect data types
UNSUPPORTED_MESSAGE_TYPE (4000)
Cause: Message type is not recognized or supported. Supported Client Message Types:session_settingsaudio_inputkeep_alive
Troubleshooting Guide
Connection Issues
-
Check authentication credentials
- Verify API key format and validity
- Ensure JWT tokens are not expired
- Confirm config_id exists
-
Verify network connectivity
- Test basic internet connection
- Check for firewall/proxy blocking WebSockets
- Try connecting from different network
-
Validate parameters
- Ensure all required parameters are provided
- Check parameter spelling and format
- Verify project and config ownership
Audio Issues
-
Check audio format
- Verify 24kHz, 16-bit, mono PCM
- Test with known good audio file
- Validate base64 encoding
-
Monitor chunk sizes
- Keep chunks under 1MB
- Aim for 100-200ms of audio per chunk
- Implement chunking for large audio
-
Handle microphone permissions
- Request permissions explicitly
- Provide fallback for denied permissions
- Test on different browsers/devices
Performance Issues
-
Monitor connection health
- Track message latency
- Monitor reconnection frequency
- Log connection lifecycle events
-
Implement proper error handling
- Use exponential backoff for retries
- Don’t retry authentication failures
- Handle all error event types
-
Optimize message flow
- Batch non-critical messages
- Use binary audio when possible
- Implement client-side buffering
Getting Help
Support Channels
- Documentation: docs.nextevi.com
- Status Page: status.nextevi.com
- Support Email: support@nextevi.com
- Discord Community: discord.gg/nextevi
Support Information
When contacting support, please include:- Error Code: The specific error code received
- Connection ID: From connection metadata
- Timestamp: When the error occurred (UTC)
- API Key: First 10 characters (e.g.,
oak_abc123...) - Code Sample: Minimal reproduction case
- Browser/Environment: Version and environment details
