post
https://api-v2.pandavideo.com.br/videos/reencode_bulk
Queues up to 100 videos for reprocessing. Individual videos may be skipped with a reason.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
POST /videos/reencode_bulk
Queues up to 100 videos for reprocessing in a single call. The batch never fails as a whole — each video is either queued or skipped with a reason.
This operation consumes creditsCredits are charged per video queued. Videos skipped for
insufficient_fundsare reported inskipped, not charged.
AuthorizationRequires a valid API token in the
Authorizationheader (withoutBearerprefix).
HTTP Method & Path
POST /videos/reencode_bulk
Base URL: https://api-v2.pandavideo.com.br
Authentication Requirements
| Header | Value |
|---|---|
Authorization | Your Panda API token (no Bearer prefix) |
Request Body
Content-Type: application/json
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
video_ids | string[] (uuid v4) | yes | 1 to 100 IDs, no duplicates |
idempotency_key | string (uuid v4) | yes | Identifies the batch — used to track and to cancel it |
hls_encryption | boolean | no | Encrypt the videos |
compression_mode | string | no | size, balanced or quality |
hls_segment_duration | integer | no | Segment duration in seconds (4–15) |
{
"video_ids": [
"11111111-2222-3333-4444-555555555555",
"66666666-7777-8888-9999-000000000000"
],
"hls_encryption": true,
"idempotency_key": "3f1c9a52-6d84-4a1e-9b77-2c5f0a8e4d31"
}
Keep theidempotency_keyIt is the only handle to the batch — you need it to check progress for that batch and to cancel it. Generate a uuid v4 and store it.
Response
Success Response (200)
{
"idempotency_key": "3f1c9a52-6d84-4a1e-9b77-2c5f0a8e4d31",
"total": 2,
"queued": 1,
"skipped": [
{ "video_id": "66666666-7777-8888-9999-000000000000", "reason": "already_encrypted" }
]
}Response Schema
| Field | Type | Description |
|---|---|---|
idempotency_key | string (uuid) | The batch identifier you sent |
total | integer | Videos received in the request |
queued | integer | Videos actually queued |
skipped | object[] | Videos not queued — each { video_id, reason } |
skipped[].reason values
skipped[].reason values| Value | Meaning |
|---|---|
not_found | Video does not exist or does not belong to the account |
already_in_progress | The video is already being reprocessed |
already_encrypted | The video is already encrypted |
cost_not_computable | Missing duration or resolutions — cost cannot be calculated |
insufficient_funds | Not enough credits for this video |
credits_error | Failure while charging credits |
error | Any other failure |
Error Responses
| Status | When |
|---|---|
400 | More than 100 IDs (video_ids exceeds the maximum of 100 per request), duplicates, invalid uuid, or a missing required field |
500 | Internal error |
Example Usage
cURL
curl -X POST \
"https://api-v2.pandavideo.com.br/videos/reencode_bulk" \
-H "Authorization: $PANDA_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"video_ids": ["{video_id_1}", "{video_id_2}"],
"hls_encryption": true,
"idempotency_key": "{uuid_v4}"
}'Related
- Track it:
GET /videos/reencode_bulk_status - Cancel it:
POST /videos/reencode_bulk_cancel - The library switch this applies retroactively: HLS Encryption
- Check which videos are already encrypted:
GET /videos/hls_encrypted
400video_ids exceeds the maximum of 100 per request, or validation error
