Start a New Streaming Session
POST
https://api.konpro.ai/v1/streaming/newInitialize a new real-time streaming session featuring an Interactive Avatar. This session enables live interaction and communication with customizable settings.
Request History
Log in to see full request history
| TIME | STATUS | USER AGENT |
|---|---|---|
| Make a request to see history. | ||
0 Requests This Month
Request Body Parameters
| Field | Type | Description |
|---|---|---|
| quality | string | Streaming quality. Options: "high" (2000 kbps, 720p), "medium" (1000 kbps, 480p, default), "low" (500 kbps, 360p) |
| avatar_id | string | (Optional) ID of the Interactive Avatar to use. Defaults to "default" if omitted. |
| voice | object | (Optional) Voice settings for the avatar, including rate, emotion, and third-party configurations. |
| stt_settings | object | (Optional, beta) Speech-to-text configuration, selecting provider (e.g., deepgram, gladia, assembly_ai) and confidence threshold. |
| video_encoding | string | Video encoding format. Options: "H264" or "VP8" (default). |
| knowledge_base | string | (Optional) Prompt for chatbot knowledge base in chat mode. |
| version | string | (Optional) API version to use. Valid: "v1". Defaults to "v1" if omitted. |
| knowledge_base_id | string | (Optional, beta) Knowledge base identifier for avatar responses, applicable only when version is "v1". |
| disable_idle_timeout | boolean | (Optional) Disable the default 2-minute idle timeout. Use with caution to avoid excessive credit consumption. Defaults to false. |
| activity_idle_timeout | integer | (Optional) Max idle time in seconds before session is deemed inactive. Default: 120s, Min: 30s, Max: 3600s. |
| livekit_settings | object | (Optional, beta) Custom LiveKit instance connection settings, including room, url, and access token. |
Voice Settings Object (Example)
| Field | Type | Description |
|---|---|---|
| voice_id | string | Voice ID; not all voices support streaming API |
| rate | float | Speech speed rate, default is 1 |
| emotion | string | Emotion style, e.g., "Excited", "Friendly" |
| elevenlabs_settings | object | ElevenLabs-specific voice model parameters (optional) |
Speech-to-Text Settings Object (Example)
| Field | Type | Description |
|---|---|---|
| provider | string | STT provider: "deepgram", "gladia", "assembly_ai" (default "assembly_ai" for English) |
| confidence | float | Confidence threshold, default 0.55 |
Response Fields
| Field | Type | Description |
|---|---|---|
| code | integer | Response status code |
| message | string | Human-readable response message |
| data.session_id | string | Unique session identifier |
| data.url | string | WebSocket URL for connecting to the LiveKit room |
| data.access_token | string | Access token to authenticate with the LiveKit server |
| data.session_duration_limit | integer | Maximum session duration in seconds |
| data.is_paid | boolean | Indicates if the session is under a paid plan |
| data.realtime_endpoint | string | URL for alpha real-time signaling features (optional) |
| data.livekit_agent_token | string | Token for HeyGen's audio agents, only if using managed LiveKit |
cURL Request
shell
curl --request POST \
--url https://api.konpro.ai/v1/streaming/new \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{
"quality": "medium",
"avatar_id": "default",
"voice": {
"rate": 1
},
"video_encoding": "VP8",
"disable_idle_timeout": false,
"version": "v1",
"stt_settings": {
"provider": "deepgram",
"confidence": 0.55
},
"activity_idle_timeout": 120
}'LANGUAGE
CREDENTIALS
HEADER
RESPONSE
Examples
Choose an example:
application/json
200 - Success
400 - Bad Request
LANGUAGE
CREDENTIALS
HEADER
RESPONSE
Examples
Choose an example:
application/json
200 - Success
400 - Bad Request