Discussions

Ask a Question
Back to All

Free Plan - Persistent 400 Error and Connection Issues with Streaming Avatar API

Hello,

I am writing to report persistent issues with your Streaming Avatar API when using a Free Plan account. Despite extensive troubleshooting and configuration adjustments, we continue to experience failures that prevent proper integration.

Account Information

Plan: Free Plan
Integration: Streaming Avatar API with Video Creation fallback
Application: AI Avatar Chat Application (React/TypeScript)
Primary Issues

Persistent 400 Errors from /v1/streaming.new endpoint
Error Details: Failed to load resource: the server responded with a status of 400 () Failed to start session: APIError: API request failed with status 400

Current Configuration Attempts:

Initially used standard configuration with ElevenLabs voice model
Reduced to minimal Free Plan configuration (Low quality, basic voice)
Removed premium features (ElevenLabs, STT, VoiceChatTransport)
Tried both DEFAULT_CONFIG and MINIMAL_FREE_CONFIG fallback
Connection Instability Issues
Symptoms:

Frequent "Connection unstable (X failures)" warnings
Automatic fallback to video mode after 4-15 connection failures
Health monitoring shows consecutive failures even when streaming appears functional
Technical Implementation Details

Configurations Tested

Standard Configuration (Failed with 400 error): { quality: AvatarQuality.Low, avatarName: AVATARS[0].avatar_id, voice: { rate: 1.0, emotion: VoiceEmotion.NEUTRAL, voice_id: "b7d50908b934a1a3e6802df2e5b40bd0" }, language: "ja" }

Minimal Free Plan Configuration (Still fails with 400): { quality: AvatarQuality.Low, avatarName: AVATARS[0].avatar_id, language: "ja" }

Error Handling Implementation

Implemented circuit breaker pattern with exponential backoff
Added token caching and management system
Created fallback to video generation API when streaming fails
Added comprehensive health monitoring system
Attempted Solutions

Configuration Optimization:

Removed ElevenLabs voice models (eleven_flash_v2_5)
Eliminated premium features (STT, VoiceChatTransport)
Set quality to lowest available (AvatarQuality.Low)
Used basic voice IDs compatible with free plan
Connection Reliability Improvements:

Implemented health monitoring with 300-second timeout tolerance
Added circuit breaker with 10-failure threshold
Created message queue with retry logic
Implemented exponential backoff for temporary failures
API Integration Troubleshooting:

Verified API key configuration
Tested with minimal request parameters
Added detailed error logging and diagnostics
Implemented fallback video creation service


Questions for Support

Free Plan Limitations: What specific parameters/features are restricted in the Free Plan for the Streaming Avatar API?
400 Error Root Cause: What causes the 400 error from /v1/streaming.new when using minimal configuration on Free Plan?
Recommended Configuration: Could you provide a working example configuration specifically for Free Plan users?
Connection Stability: Are there known issues with WebRTC/LiveKit connectivity that affect streaming stability on Free Plans?
Rate Limiting: Are there undocumented rate limits or quota restrictions that could cause these issues?