Create an anonymous playback session for a shared video
Create an anonymous playback session for a shared video
/v1/playback/embed-sessionsUnauthenticated session mint for videos whose visibility is public
or unlisted — called by the hosted watch/embed pages (and usable
from any page) so viewers never need a customer server to mint
tokens. Sessions carry every protection of the authenticated mint:
signed segment URLs, the edge session mirror, the heartbeat-gated
key, geo/ASN policy, and the account overdraft gate. The per-viewer
concurrency cap keys on a hash of the viewer IP. Rate limit: 30
requests per 60 s per IP.
Error codes: invalid_body (400), video_not_found (404),
video_not_playable (409), insufficient_balance (402).
Authentication
- This operation needs no authentication.
Parameters
This operation takes no parameters.
Request body
required
Content type: application/json
Schema: EmbedSessionCreateRequest
{
"videoId": "01JZ9WV3N8GQ5T2M7K4C6XBARH"
}Responses
| Status | Meaning |
|---|---|
201 | Playback session created. |
400 | The request body or query failed validation. The per-operation description lists the exact error.code values. |
402 | The account's balance is below its plan overdraft limit. |
404 | The resource does not exist or is not visible to this caller. |
409 | The request conflicts with the resource's current state. The per-operation description lists the exact error.code values. |
429 | Rate limit exceeded. |
Example request
{
"videoId": "01JZ9WV3N8GQ5T2M7K4C6XBARH"
}Try it
/v1/playback/embed-sessionsAPI playground
Send a live request to api.videohati.com with a test-mode key.
The key is stored in your browser on docs.videohati.com only.