Skip to content

Probe Media Metadata

Use mode: "probe" to run ffprobe against an input URL. When the job completes, enriched metadata is returned on the job record under probe — no output file is written and no storage upload occurs.

The response preserves the raw ffprobe shape (format, streams, chapters, programs) and adds convenience flags such as hasVideo, hasAudio, isVideo, isAudio, isImage, isHdr, stream counts, codec names, dimensions, duration, size, bitrate, and frame rate.

Use this when you need media metadata before deciding which encode recipe to run, or to power upload validation and CMS previews.

Terminal window
curl -X POST https://api.xora.sh/v1/jobs \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "probe",
"input": {
"url": "https://example.com/video.mp4"
}
}'

Poll GET /v1/jobs/:id (or use a webhook) until state is completed. Read metadata from probe, not output or output_files.

FieldTypeRequiredDescription
modestringYesMust be "probe"
input.urlstringOne ofHTTPS or S3 URL of the media file to inspect
input.uploadIdstringOne ofId from POST /v1/uploads, for locally uploaded files. Provide exactly one of url or uploadId.
stageInputbooleanNoSkip input staging when your origin supports byte ranges. Defaults to true. See Input staging.
webhookUrlstringNoOptional webhook for completion notification

Probe jobs do not accept output, recipe, outputPath, or preset bodies.

When the job completes, probe includes:

  • Raw ffprobe fields under format, streams, chapters, and programs
  • Top-level convenience flags such as hasVideo, hasAudio, isHdr, durationSeconds, width, height, videoCodec, and audioCodec
  • A nested flags object with the same convenience fields for programmatic access

Example (truncated):

{
"id": "01KSD388ERH85FGR79JCW0SZZ0",
"state": "completed",
"mode": "probe",
"probe": {
"hasVideo": true,
"hasAudio": true,
"isVideo": true,
"durationSeconds": 125.4,
"width": 1920,
"height": 1080,
"videoCodec": "h264",
"audioCodec": "aac",
"flags": {
"hasVideo": true,
"hasAudio": true,
"isVideo": true
},
"format": { "duration": "125.400000", "bit_rate": "4500000" },
"streams": []
}
}