Skip to main content
POST
/
ffmpeg
/
slice
curl --request POST \
  --url https://api.varg.ai/v1/ffmpeg/slice \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "video_url": "https://s3.varg.ai/o/my-video.mp4",
  "every": 15
}
'
{
  "job_id": "job_abc123",
  "status": "queued",
  "cache": {
    "hit": false
  },
  "pricing": {
    "estimated": 5,
    "billing": "metered"
  }
}

Authorizations

Authorization
string
header
required

API key from varg.ai/dashboard.

Pass as Authorization: Bearer varg_xxx.

Body

application/json
video_url
string<uri>
required

URL of the source video

Example:

"https://s3.varg.ai/o/my-video.mp4"

codec
enum<string>
default:copy

copy for fast keyframe-aligned cuts, reencode for frame-accurate

Available options:
copy,
reencode
every
number

Split every N seconds

Required range: 0.1 <= x <= 3600
Example:

15

at
number[]

Split at specific timestamps (seconds)

Required range: x >= 0
Example:
[5, 15, 30]
count
integer

Split into N equal parts

Required range: 2 <= x <= 1000
Example:

4

ranges
object[]

Explicit time ranges to extract

thumbnails
boolean
default:true

Extract first_frame (full-res JPEG) and thumbnail (480px WebP) for each segment

Response

Job created. Poll with GET /jobs/{job_id}. Completed job metadata contains segments array.

job_id
string
required

Unique job identifier

Example:

"job_a1b2c3d4"

status
enum<string>
required

Current job status

Available options:
queued,
processing,
completed,
failed,
cancelled
Example:

"completed"

model
string
required

Resolved model identifier (provider:model format)

Example:

"fal:kling-v2.5"

created_at
string<date-time>
required

When the job was created

Example:

"2026-02-13T10:00:00Z"

completed_at
string<date-time>

When the job finished (completed, failed, or cancelled)

Example:

"2026-02-13T10:02:30Z"

output
object

Job output, present when status is completed

cache
object

Cache metadata

error
string

Error message, present when status is failed

Example:

"Provider returned an error"