curl --request POST \
--url https://api.varg.ai/v2/jobs/{id}/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "approve"
}
'{
"id": "job_a1b2c3d4e5f6",
"status": "queued",
"stage": "queued",
"attempts": [
{
"n": 1,
"provider": "byteplus",
"model_key": "byteplus:dreamina-seedance-2-5-260628",
"status": "running",
"reason": "real person in the reference images",
"reason_code": "content_privacy",
"references_uploaded": 123,
"resubmitted": true,
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z"
}
],
"tool": "tool_2001a2b3c4d5",
"input": {},
"output": {
"version": "v1",
"outputs": [
{
"url": "<string>",
"file_id": "<string>",
"media_type": "video/mp4",
"size_bytes": 123,
"thumbnail_url": "<string>",
"data": "<unknown>",
"raw": "<unknown>"
}
]
},
"error": "<string>",
"progress_message": "stitching 3/8 (40%)",
"progress": 123,
"progress_metadata": {},
"step_state": {
"current_step": "extend",
"steps": {}
},
"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>",
"completed_by_provider_model_id": "<string>",
"last_attempt_provider_model_id": "<string>",
"workspace_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"warnings": [
"<string>"
],
"urls": {
"self": "<string>",
"status": "<string>",
"refresh": "<string>",
"cancel": "<string>",
"retry": "<string>",
"confirm": "<string>",
"rerun": "<string>"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key or JWT"
}
}{
"error": {
"code": "insufficient_balance",
"message": "Needs 40 credits; 25 available right now (60 on hold for 2 running jobs)",
"details": {
"needed_cents": 40,
"available_cents": 25,
"reserved_cents": 60,
"total_cents": 85,
"held_jobs": 2,
"job_id": "job_a1b2c3d4e5f6"
}
}
}{
"error": {
"code": "model_not_found",
"message": "Unknown model: flux-shnell",
"details": "<unknown>"
}
}{
"error": {
"code": "conflict",
"message": "Job is not awaiting_confirmation (status: running)"
}
}{
"error": {
"code": "invalid_request",
"message": "Body validation failed (text: Required)"
}
}Approve, retry or reject a paused job
Resumes or ends a multi-step pipeline job that is paused in
awaiting_confirmation after a step that asked for confirmation.
The job’s step_state shows each step’s status and intermediate output.
approve(default) runs the next step.retryruns the same step again (a new take). Useoverridesto change the input, for example an edited prompt.rejectcancels the job. Steps already completed stay billed.
The steps completed so far are billed when the job pauses and the hold
is released, so approve and retry reserve the estimate for the
remaining steps again. If the balance does not cover it, the response is
402 insufficient_balance and the job stays paused: add credits and
confirm again. The response is the job, now queued (approve/retry) or
cancelled (reject).
curl --request POST \
--url https://api.varg.ai/v2/jobs/{id}/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "approve"
}
'{
"id": "job_a1b2c3d4e5f6",
"status": "queued",
"stage": "queued",
"attempts": [
{
"n": 1,
"provider": "byteplus",
"model_key": "byteplus:dreamina-seedance-2-5-260628",
"status": "running",
"reason": "real person in the reference images",
"reason_code": "content_privacy",
"references_uploaded": 123,
"resubmitted": true,
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z"
}
],
"tool": "tool_2001a2b3c4d5",
"input": {},
"output": {
"version": "v1",
"outputs": [
{
"url": "<string>",
"file_id": "<string>",
"media_type": "video/mp4",
"size_bytes": 123,
"thumbnail_url": "<string>",
"data": "<unknown>",
"raw": "<unknown>"
}
]
},
"error": "<string>",
"progress_message": "stitching 3/8 (40%)",
"progress": 123,
"progress_metadata": {},
"step_state": {
"current_step": "extend",
"steps": {}
},
"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>",
"completed_by_provider_model_id": "<string>",
"last_attempt_provider_model_id": "<string>",
"workspace_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"warnings": [
"<string>"
],
"urls": {
"self": "<string>",
"status": "<string>",
"refresh": "<string>",
"cancel": "<string>",
"retry": "<string>",
"confirm": "<string>",
"rerun": "<string>"
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key or JWT"
}
}{
"error": {
"code": "insufficient_balance",
"message": "Needs 40 credits; 25 available right now (60 on hold for 2 running jobs)",
"details": {
"needed_cents": 40,
"available_cents": 25,
"reserved_cents": 60,
"total_cents": 85,
"held_jobs": 2,
"job_id": "job_a1b2c3d4e5f6"
}
}
}{
"error": {
"code": "model_not_found",
"message": "Unknown model: flux-shnell",
"details": "<unknown>"
}
}{
"error": {
"code": "conflict",
"message": "Job is not awaiting_confirmation (status: running)"
}
}{
"error": {
"code": "invalid_request",
"message": "Body validation failed (text: Required)"
}
}Authorizations
varg API key (varg_...). Get one at app.varg.ai
or run bunx vargai login. App sessions may alternatively send a
Supabase JWT.
Body
Response
The job after the decision
The status only moves forward: queued → running → completed,
failed or cancelled. Everything a running job goes through —
sending to the provider, uploading references, switching to another
provider — is a stage of running; a job never goes back to
queued. (Older API builds also reported submitting; treat it as
running.)
awaiting_confirmation (multi-step pipelines only): the job finished a
step that asks for review and waits for POST /jobs/{id}/confirm. It
is not terminal.
queued, running, awaiting_confirmation, completed, failed, cancelled What the job is doing right now. null once the job is terminal, and
while the job is awaiting_confirmation.
queued— waiting for a slot; no attempt yetsubmitting— being sent to the provideruploading_references— the provider is taking the reference files into its asset library (progress_messageshowsn/m)rendering— the provider accepted the task and is generatingretrying— an attempt failed (the provider refused, failed or rate limited it); the job waits for its next attempt, usually on another provider. Seeattempts.finalizing— the result is being saved and billed
queued, submitting, uploading_references, rendering, retrying, finalizing, null Was this page helpful?