curl --request POST \
--url https://api.varg.ai/v2/ffmpeg \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "rendi_ffmpeg_trim",
"url": "https://s3.varg.ai/files/acc_x/video.mp4",
"start": 2.5,
"duration": 5,
"precise": true
}
'{
"id": "job_a1b2c3d4e5f6",
"status": "queued",
"tool": "image",
"input": {},
"output": {
"version": "v1",
"outputs": [
{
"url": "<string>",
"file_id": "<string>",
"media_type": "video/mp4",
"size_bytes": 123,
"thumbnail_url": "<string>"
}
]
},
"error": {},
"progress_message": "stitching 3/8 (40%)",
"progress": 123,
"progress_metadata": {},
"estimated_duration_ms": 123,
"estimated_cost_cents": 123,
"actual_cost_cents": 123,
"pricing": {
"estimated": 123,
"actual": 123,
"billing": "<string>",
"cached": true,
"billed_units": {
"images": 1
},
"pricing_id": "<string>"
},
"provider": "fal",
"provider_model": "fal:flux_schnell",
"provider_status": "<string>",
"provider_job_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"urls": {
"self": "<string>",
"status": "<string>",
"refresh": "<string>",
"cancel": "<string>",
"retry": "<string>"
}
}{
"id": "job_a1b2c3d4e5f6",
"status": "queued",
"tool": "image",
"input": {
"model": "flux_schnell",
"prompt": "a cat astronaut"
},
"output": null,
"error": null,
"estimated_cost_cents": 4,
"actual_cost_cents": null,
"pricing": {
"estimated": 4,
"actual": null,
"billing": "metered",
"cached": null,
"billed_units": null,
"pricing_id": "ppr_abc123"
},
"provider": "fal",
"provider_model": "fal:flux_schnell",
"created_at": "2026-07-01T10:00:00Z",
"urls": {
"self": "https://api.varg.ai/v2/jobs/job_a1b2c3d4e5f6",
"status": "https://api.varg.ai/v2/jobs/job_a1b2c3d4e5f6/status",
"refresh": "https://api.varg.ai/v2/jobs/job_a1b2c3d4e5f6/refresh",
"cancel": "https://api.varg.ai/v2/jobs/job_a1b2c3d4e5f6/cancel",
"retry": "https://api.varg.ai/v2/jobs/job_a1b2c3d4e5f6/retry"
}
}{
"error": {
"code": "insufficient_balance",
"message": "Insufficient balance to run this job"
}
}{
"error": {
"code": "model_not_found",
"message": "Unknown model: flux-shnell"
}
}{
"error": {
"code": "invalid_request",
"message": "Body validation failed (text: Required)"
}
}{
"error": {
"code": "model_not_found",
"message": "Unknown model: flux-shnell",
"details": "<unknown>"
}
}{
"error": {
"code": "model_not_found",
"message": "Unknown model: flux-shnell",
"details": "<unknown>"
}
}Run an ffmpeg operation
Media processing via ffmpeg. One endpoint, four operation modes selected
by the model field:
| Model | Operation | Fields |
|---|---|---|
rendi_ffmpeg | Generic command | command, input_files, output_files |
rendi_ffmpeg_trim | Trim | url, start, end or duration, precise |
rendi_ffmpeg_resize | Resize | url, width/height, fit |
rendi_ffmpeg_slice | Slice into segments | video_url, every/at/count/ranges, codec, thumbnails |
Generic commands use placeholder references, e.g.
-i {{in_1}} -t 5 {{out_1}} with input_files mapping in_1 to a URL
and output_files mapping out_1 to an output filename.
curl --request POST \
--url https://api.varg.ai/v2/ffmpeg \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "rendi_ffmpeg_trim",
"url": "https://s3.varg.ai/files/acc_x/video.mp4",
"start": 2.5,
"duration": 5,
"precise": true
}
'{
"id": "job_a1b2c3d4e5f6",
"status": "queued",
"tool": "image",
"input": {},
"output": {
"version": "v1",
"outputs": [
{
"url": "<string>",
"file_id": "<string>",
"media_type": "video/mp4",
"size_bytes": 123,
"thumbnail_url": "<string>"
}
]
},
"error": {},
"progress_message": "stitching 3/8 (40%)",
"progress": 123,
"progress_metadata": {},
"estimated_duration_ms": 123,
"estimated_cost_cents": 123,
"actual_cost_cents": 123,
"pricing": {
"estimated": 123,
"actual": 123,
"billing": "<string>",
"cached": true,
"billed_units": {
"images": 1
},
"pricing_id": "<string>"
},
"provider": "fal",
"provider_model": "fal:flux_schnell",
"provider_status": "<string>",
"provider_job_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"urls": {
"self": "<string>",
"status": "<string>",
"refresh": "<string>",
"cancel": "<string>",
"retry": "<string>"
}
}{
"id": "job_a1b2c3d4e5f6",
"status": "queued",
"tool": "image",
"input": {
"model": "flux_schnell",
"prompt": "a cat astronaut"
},
"output": null,
"error": null,
"estimated_cost_cents": 4,
"actual_cost_cents": null,
"pricing": {
"estimated": 4,
"actual": null,
"billing": "metered",
"cached": null,
"billed_units": null,
"pricing_id": "ppr_abc123"
},
"provider": "fal",
"provider_model": "fal:flux_schnell",
"created_at": "2026-07-01T10:00:00Z",
"urls": {
"self": "https://api.varg.ai/v2/jobs/job_a1b2c3d4e5f6",
"status": "https://api.varg.ai/v2/jobs/job_a1b2c3d4e5f6/status",
"refresh": "https://api.varg.ai/v2/jobs/job_a1b2c3d4e5f6/refresh",
"cancel": "https://api.varg.ai/v2/jobs/job_a1b2c3d4e5f6/cancel",
"retry": "https://api.varg.ai/v2/jobs/job_a1b2c3d4e5f6/retry"
}
}{
"error": {
"code": "insufficient_balance",
"message": "Insufficient balance to run this job"
}
}{
"error": {
"code": "model_not_found",
"message": "Unknown model: flux-shnell"
}
}{
"error": {
"code": "invalid_request",
"message": "Body validation failed (text: Required)"
}
}{
"error": {
"code": "model_not_found",
"message": "Unknown model: flux-shnell",
"details": "<unknown>"
}
}{
"error": {
"code": "model_not_found",
"message": "Unknown model: flux-shnell",
"details": "<unknown>"
}
}Authorizations
varg API key (varg_...). Get one at app.varg.ai
or run bunx vargai login. App sessions may alternatively send a
Supabase JWT.
Headers
Any unique string. Retrying a request with the same key returns the existing job (HTTP 200) instead of creating and charging a new one (HTTP 202).
Body
Response
Idempotency replay — the existing job for this Idempotency-Key (no new charge).
"job_a1b2c3d4e5f6"
Lifecycle is queued then submitting then running, ending in a
terminal status (completed, failed, or cancelled).
queued, submitting, running, completed, failed, cancelled "image"
The request body as submitted (model, prompt, ...)
Canonical output envelope. Present only when the job is completed.
Show child attributes
Show child attributes
"stitching 3/8 (40%)"
Fraction 0..1
Structured pricing. 1 credit = 1 cent = $0.01.
Show child attributes
Show child attributes
"fal"
"fal:flux_schnell"
The provider's raw status string
Lifecycle URLs (present on creation responses)
Show child attributes
Show child attributes
Was this page helpful?