curl --request POST \
--url https://api.varg.ai/v2/video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kling_v3",
"prompt": "cat jumping over a fence in slow motion",
"duration": 5,
"aspect_ratio": "16:9"
}
'{
"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>"
}
}Generate a video
Create a video generation job. Handles text-to-video, image-to-video
(send a start frame in files), lipsync (sync_v2, veed_fabric_1.0,
omnihuman_v1.5, …), video editing (grok_imagine_edit), avatars
(heygen_avatar), and video upscaling (topaz_video, seedvr_video).
When files contains an image and the model has an image-to-video
variant, varg routes to it automatically — same model family, never
substituted.
curl --request POST \
--url https://api.varg.ai/v2/video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kling_v3",
"prompt": "cat jumping over a fence in slow motion",
"duration": 5,
"aspect_ratio": "16:9"
}
'{
"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
"kling_v3"
2000"16:9"
Seconds
1 <= x <= 120Start frame (image-to-video), source video + audio (lipsync), etc.
10Show child attributes
Show child attributes
Provider-native overrides, keyed by provider id
(e.g. a fal object with seed, num_images, ...). Discover
per-model fields via GET /tools/{tool_key}?model=<model>.
Show child attributes
Show child attributes
Cross-cutting job options
Show child attributes
Show child attributes
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?