Add subtitle to video

Upload a subtitle file (.vtt) to an existing video. The subtitle becomes available as a selectable track in the player. A video can have multiple subtitle tracks in different languages.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

POST /subtitles/{video_id}

Upload a subtitle file (.vtt or .srt) to an existing video. SRT files are automatically converted to VTT on upload. The subtitle becomes available as a selectable track in the player. A video can have multiple subtitle tracks in different languages.

📘

Authorization

Use your API token in the Authorization header. For sub-accounts, use the parent account's API token.

HTTP Method & Path

POST /subtitles/{video_id}

Base URL: https://api-v2.pandavideo.com.br

Authentication Requirements

Security SchemeHeaderNote
apiKeyAuthorizationYour API token

Parameters

ParameterTypeRequiredDescription
Authorizationstring✅ YesYour API token

Path Parameters

ParameterTypeRequiredDescription
video_idstring (uuid)✅ YesUnique ID of the video to attach the subtitle to

Request Body

Content-Type: multipart/form-data

Body Parameters

ParameterTypeRequiredDescription
labelstring✅ YesDisplay name shown on the player (e.g. "Português (BR)")
srclangstring✅ YesLanguage code in BCP 47 format (e.g. pt-br, en, es)
filefile✅ YesSubtitle file, UTF-8 encoded. Accepts .vtt or .srt (SRT is auto-converted to VTT).

Response

Success Response (200)

The subtitle was uploaded and attached to the video. The response returns the video's updated subtitle list.

{
  "response": [
    { "srclang": "pt-BR", "label": "Português (BR)", "hidden": false, "is_uploaded": true }
  ]
}
📘

You can also send the file as base64 with Content-Type: application/json ({ "file": "<base64>", "label": "...", "srclang": "..." }) instead of multipart/form-data.

Error Responses

  • 400 Bad Request — Missing required field or empty/invalid file (e.g. Archive is empty, The file should have more information)
  • 401 Unauthorized — Missing or invalid API token
  • 404 Not Found — Video not found
  • 500 Internal Server Error — Unexpected server error

Example Usage

cURL

curl --request POST \
  --url https://api-v2.pandavideo.com.br/subtitles/{video_id} \
  --header 'Authorization: <your_api_key>' \
  --header 'content-type: multipart/form-data' \
  --form 'label=Português (BR)' \
  --form 'srclang=pt-br' \
  --form '[email protected]'
Path Params
uuid
required

Unique ID of the video to attach the subtitle to

Body Params
string
required

Display name shown on the player (e.g. "Português (BR)")

string
required

Language code in BCP 47 format (e.g. pt-br, en, es)

file
required

Subtitle file in .vtt format, UTF-8 encoded

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json