Reprocess videos in 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
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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 credits

Credits are charged per video queued. Videos skipped for insufficient_funds are reported in skipped, not charged.

📘

Authorization

Requires a valid API token in the Authorization header (without Bearer prefix).

HTTP Method & Path

POST /videos/reencode_bulk

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

Authentication Requirements

HeaderValue
AuthorizationYour Panda API token (no Bearer prefix)

Request Body

Content-Type: application/json

Body Parameters

NameTypeRequiredDescription
video_idsstring[] (uuid v4)yes1 to 100 IDs, no duplicates
idempotency_keystring (uuid v4)yesIdentifies the batch — used to track and to cancel it
hls_encryptionbooleannoEncrypt the videos
compression_modestringnosize, balanced or quality
hls_segment_durationintegernoSegment duration in seconds (415)
{
  "video_ids": [
    "11111111-2222-3333-4444-555555555555",
    "66666666-7777-8888-9999-000000000000"
  ],
  "hls_encryption": true,
  "idempotency_key": "3f1c9a52-6d84-4a1e-9b77-2c5f0a8e4d31"
}
⚠️

Keep the idempotency_key

It 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

FieldTypeDescription
idempotency_keystring (uuid)The batch identifier you sent
totalintegerVideos received in the request
queuedintegerVideos actually queued
skippedobject[]Videos not queued — each { video_id, reason }

skipped[].reason values

ValueMeaning
not_foundVideo does not exist or does not belong to the account
already_in_progressThe video is already being reprocessed
already_encryptedThe video is already encrypted
cost_not_computableMissing duration or resolutions — cost cannot be calculated
insufficient_fundsNot enough credits for this video
credits_errorFailure while charging credits
errorAny other failure

Error Responses

StatusWhen
400More than 100 IDs (video_ids exceeds the maximum of 100 per request), duplicates, invalid uuid, or a missing required field
500Internal 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
Body Params
video_ids
array of uuids
required
length between 1 and 100
video_ids*
boolean
string
enum
Allowed:
integer
4 to 15
uuid
required
Responses

400

video_ids exceeds the maximum of 100 per request, or validation error

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