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.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
POST /subtitles/{video_id}
{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.
AuthorizationUse 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 Scheme | Header | Note |
|---|---|---|
| apiKey | Authorization | Your API token |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string | ✅ Yes | Your API token |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| video_id | string (uuid) | ✅ Yes | Unique ID of the video to attach the subtitle to |
Request Body
Content-Type: multipart/form-data
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| label | string | ✅ Yes | Display name shown on the player (e.g. "Português (BR)") |
| srclang | string | ✅ Yes | Language code in BCP 47 format (e.g. pt-br, en, es) |
| file | file | ✅ Yes | Subtitle 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 withContent-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]'