Developer guide
Limits
Every published number: room size, request rates, token lifetime and message sizes.
返回开发者中心
Applies to: engine API v1
Room size
| Product | Limit | Notes |
|---|---|---|
| Audio room | max_participants_per_room, set per project | Each project has a configurable room capacity. Read yours with GET /api/v1/project (max_participants_per_room). Where full-room enforcement is on for the project, a full room refuses the join with 409 room_full. |
| Live stream | No cap on viewers | One host publishes, any number of viewers subscribe, and the host promotes any number of co-publishers. The room is created unbounded; the kit decides how many guest tiles it shows. The viewer count is not load-tested to a published figure. |
| Concurrent rooms | max_concurrent_rooms, default 100 per project | Over it: 429 max_concurrent_rooms. |
| Empty room timeout | empty_room_timeout, default 300 seconds | An empty room closes after this. |
| Seats in a new audio room | 9 | Configurable by the host when the room opens. |
Request rates
Three REST limits apply, in this order. They are independent: a request must pass all three.
| Limit | Counted per | Default | Error code |
|---|---|---|---|
| REST requests per minute | the whole project | 600 | project_rate_limited |
| REST requests per minute | project + user | 120 | user_rate_limited |
| Token requests per minute | project + user + device | 30 | token_rate_limited |
| Token requests per minute | one user_id across all its devices | 100 | identity_rate_limited |
| Quality reports | identity | 1 per 10 seconds | report_rate_limited |
| Signaling WebSocket messages | connection | 60 per second | ack code 6 |
| Signaling WebSocket connections | identity | 5 | frame rate_limited |
The per-user and token limits are keyed on the user and device you name in the request, and each part falls back to the caller's IP address when it is missing. When your backend mints on behalf of its users that IP is one address for everybody. Always send user_id, and send device_id from a backend mint, or your whole user base shares one budget.
A limit answers 429 with a code that tells you which one. Back off with growing delays and jitter; never retry in a tight loop. Standard RateLimit-* headers are included.
Lifetimes
| What | Value |
|---|---|
| Media token (default) | 1 hour to use. Once connected, a user stays in the room with no time limit. |
user_token (per-user bearer) | 6 hours. The response carries user_token_expires_in; when it passes, REST calls fail with 401 token_expired until you mint a new one. The kits renew it at 80% of its lifetime. |
| Session takeover cooldown | 10 seconds: a different device cannot take over a session established in the last 10 seconds (session_cooldown). |
| Webhook delivery | Respond with 2xx within 5 seconds; 4 attempts in total (a 429 reply is retried once; any other 4xx is not retried). |
Sizes
| What | Value |
|---|---|
user_id / identity | Non-empty string, up to 400 bytes |
room_id / room_name | Letters, digits and _ - : ., up to 200 characters |
| Room metadata | Up to about 60 KB in total, shared with the seat state |
| Chat-ban list | 200 entries, 64 characters per identity, 5000 bytes serialized |