Base URL
The Ant Media Server REST API is accessible at:API Endpoints
Ant Media Server provides the following API endpoint groups:- Broadcasts -
/v2/broadcasts- Manage live streams, IP cameras, and stream sources - VoD -
/v2/vods- Manage video-on-demand files - Push Notifications -
/v2/push-notification- Send notifications to subscribers - Cluster -
/cluster-communication- Internal cluster node communication (hidden)
Authentication
Ant Media Server REST API uses JWT (JSON Web Token) authentication. You need to include the JWT token in theAuthorization header:
Getting a JWT Token
You can generate JWT tokens for specific streams using the authentication endpoints. Tokens can be created for:- Publish - Allow publishing to a stream
- Play - Allow playing a stream
- Room Access - Allow joining a conference room
Common Response Format
Most API endpoints return aResult object:
boolean
Indicates whether the operation was successful
string
Human-readable message describing the result
string
ID of the created or affected resource
integer
Error code if the operation failed (0 for success)
Common Error Codes
Rate Limits
There are no explicit rate limits, but resource-intensive operations may be throttled based on system load. The server monitors CPU and memory usage and may reject requests with:Pagination
List endpoints support pagination withoffset and size parameters:
- Maximum items per request: 50
- Default offset: 0
Next Steps
Authentication
Learn how to generate and validate tokens
Broadcasts API
Manage live streams and recordings
VoD API
Handle video-on-demand content
Push Notifications
Send notifications to subscribers
