Reprocesses a single video. Used to encrypt or re-encode content that already exists.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
POST /videos/{video_id}?reencode
{video_id}?reencodeReprocesses a single video — the way to encrypt, re-compress or re-segment content that already exists.
This operation consumes creditsInsufficient balance returns
402(not400), with the number of credits required. Budget for it before reprocessing a catalogue.
AuthorizationRequires a valid API token in the
Authorizationheader (withoutBearerprefix). The video must belong to the authenticated user.
HTTP Method & Path
POST /videos/{video_id}?reencode
Base URL: https://api-v2.pandavideo.com.br
Authentication Requirements
| Header | Value |
|---|---|
Authorization | Your Panda API token (no Bearer prefix) |
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
video_id | string (uuid) | yes | Internal video ID |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
reencode | flag | yes | Present as a bare query flag — ?reencode |
Request Body
Content-Type: application/json
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
hls_encryption | boolean | no | Encrypt the video |
compression_mode | string | no | size, balanced or quality |
hls_segment_duration | integer | no | Segment duration in seconds (4–15) |
{ "hls_encryption": true }
These values override the library
compression_modeandhls_segment_durationsent here take precedence over the library configuration for this video.
Response
Success Response (200)
{
"message": "Reencode request sent to SQS",
"video_id": "11111111-2222-3333-4444-555555555555"
}The response confirms the request was queued — reprocessing happens asynchronously.
Prerequisite: the original fileThe library must have
keep_original_filesenabled and the video must still have its original file. Otherwise the call fails with400.
Error Responses
| Status | Meaning |
|---|---|
400 | The video has no original file and cannot be reprocessed |
400 | Cost could not be computed — the video is missing duration or resolutions (cost_not_computable) |
402 | Insufficient credits (insufficient_credits) — the payload states how many are required |
404 | Video not found |
500 | Internal error |
Example Usage
cURL
curl -X POST \
"https://api-v2.pandavideo.com.br/videos/{video_id}?reencode" \
-H "Authorization: $PANDA_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "hls_encryption": true }'Related
- Many videos at once:
POST /videos/reencode_bulk - Check which videos are encrypted:
GET /videos/hls_encrypted - The library switch this applies retroactively: HLS Encryption
400Video has no original file, or cost not computable
402Insufficient credits
404Video was not found
