AIOZ Stream API
Video chapter

Video Chapter

Add Video Chapter in a Specific Language

This endpoint is used to add a chapter in a specific language for a video.

POSThttps://api.aiozstream.network/api/videos/:video_id/chapters/:lan

Parameters

video_id* The unique identifier of the video
lan* The language of the video's chapter in BCP 47 format (e.g. en, fr)

Headers

Authorization Bearer your_access_token_here
stream-public-key your_public_key_here
stream-secret-key your_secret_key_here

Body

file* Chapter file (allow: .vtt)

Response

201: Created
{
  "status": "success",
  "data": {
    "chapter": {
      "id": "string",
      "video_id": "string",
      "url": "string",
      "language": "string",
      "created_at": "2023-06-11T11:11:11.111111Z"
    }
  }
}
curl --location 'https://api.aiozstream.network/api/videos/video_id/chapters/en' \
  --header 'accept: application/json' \
  --header 'Authorization: Bearer <YOUR_JWT_TOKEN>' \
  --form 'file=@"/path/to/file.vtt"'

Get Video Chapters List

This endpoint will list all your video's chapters.

GEThttps://api.aiozstream.network/api/videos/:video_id/chapters

Parameters

video_id* The unique identifier of the video

Query

offset The number of records to skip before starting to return the results (default: 0)
limit The maximum number of records to return in a query (default: 25, max: 100)

Headers

Authorization Bearer your_access_token_here
stream-public-key your_public_key_here
stream-secret-key your_secret_key_here

Response

200: OK
{
  "status": "success",
  "data": {
    "chapters": [
      {
        "id": "string",
        "video_id": "string",
        "url": "string",
        "language": "string",
        "created_at": "2023-06-11T11:11:11.111111Z"
      }
    ],
    "total": 1
  }
}
curl --location 'https://api.aiozstream.network/api/videos/video_id/chapters?offset=0&limit=10' \
  --header 'accept: application/json' \
  --header 'Authorization: Bearer <YOUR_JWT_TOKEN>'

Remove Video Chapter

This endpoint will remove your video's chapter.

DELETEhttps://api.aiozstream.network/api/videos/:video_id/chapters/:lan

Parameters

video_id* The unique identifier of the video
lan* The language of the video's chapter (e.g., en, fr)

Headers

Authorization Bearer your_access_token_here
stream-public-key your_public_key_here
stream-secret-key your_secret_key_here

Body

is_default* Indicates whether this chapter is the default choice.

Response

200: OK
{
  "status": "success",
  "message": "Delete chapter successfully."
}
curl --location --request DELETE 'https://api.aiozstream.network/api/videos/video_id/chapters/en' \
  --header 'accept: application/json' \
  --header 'Authorization: Bearer <YOUR_JWT_TOKEN>'