Skip to content
Console

Job structure

A Job is the unit of work you submit to AVFlow.

{
"name": "room-recording-001",
"metadata": { "customerId": "acme-42" },
"sources": [],
"nodes": [],
"sinks": [],
"policies": { "maxDurationSec": 7200, "idleTimeoutSec": 60 }
}
FieldTypeRequiredDescription
namestringYesHuman-readable name, max 128 characters. Used in API paths (/v1/jobs/:name). Must not contain whitespace or /, ?, #.
metadatamapNoOpaque key/value pairs for your own bookkeeping (not interpreted by AVFlow).
sourcesarrayYes1–5 sources.
nodesarrayNoProcessing nodes (mixers, ASR, etc.). May be empty.
sinksarrayYes1–3 sinks.
policiesobjectNoRuntime limits. See Policies.

Resubmit the full job with the same name via POST /v1/jobs (upsert). AVFlow applies changes without restarting the pipeline when possible.

FieldHot-update
metadataImmutable — rejected on update (400 INVALID_JOB).
sources / nodes / sinksAdd or remove components freely.
Node / sink inputsSupported — node inputs reconnect; sink inputs use make-before-break switching (brief overlap while new upstream tracks appear). Changing an input’s select rewires that edge the same way.
Node / sink configPartial support — depends on component type; encoding params are fixed after sink start.

Typical pattern when adding a source: submit an update that adds the source and extends downstream inputs (e.g. append the new source name to a mixer’s inputs array) in the same request.

The server adds read-only fields:

FieldDescription
idServer-generated job ID (job_…)
statusJob lifecycle state — see Job status
createdAt / updatedAtRFC 3339 timestamps
errorJob-level error, if any
componentStatusPer-component status and error
usagePresent on running jobs only — cumulative per-component metrics (see Manage jobs)

The same status vocabulary is used by the control plane (D1) and the avflow runtime (GET /v1/jobs/:name when the job is reachable):

StatusMeaning
submittedAccepted by the control plane; runtime not started yet
startingPipeline bootstrapping (Chrome, bridges, component attach)
runningPipeline active (job.started recorded)
stoppingDELETE /v1/jobs/:name accepted (202); teardown in progress
completedFinished normally (including user DELETE)
failedTerminal failure

Typical progression: submittedstartingrunningcompleted or failed. On user DELETE, the runtime returns 202 with stopping; the control plane records stopping after that accept; job.completed or job.failed seals the row when teardown finishes.

Job-level details live in the error field when present. Per-component problems use componentStatus.<name>.status — commonly running, starting, or error (a component fault does not change the job’s top-level status until the job terminates).

GET /v1/jobs (list) returns summary rows from the control-plane store with the same status values.

Sources, nodes, and sinks share:

{ "name": "my_src", "type": "livekit", "config": { } }

Nodes and sinks also require inputs — an array of upstream component names. See Wiring & DAG.

ResourceLimit
Sources per job5
Sinks per job3
video_mixer inputs16