Data models

The Manager API exposes camelCase JSON. Protocol enums and execution-plan constraints are shared with Workers through @encode-flow/worker-protocol; response views add Manager-owned persistence and live data.

ExecutionPlanTemplate

The template omits version, jobId, attemptId, and fencingToken; the Manager inserts those fields after creating an attempt.

FieldTypeDescription
input.urirequireds3:// URISource object to download.
input.checksumSha25664-char hexOptional source checksum; recovery-enabled execution verifies it after download.
outputsrequiredFileOutput[] | HlsOutput[]One or more output definitions.
transforms.removedSegmentsSegment[]Sorted, non-overlapping time ranges.
transforms.watermarkWatermarkOptional S3 image, anchor, margins, opacity, and timing.
transforms.subtitlesSubtitleTrack[]Burn-in, mux, or sidecar tracks; at most one burn-in.
transforms.audioTracksAudioTrack[]Source selection, language, codec, gain, and default flag.
workspace.rootDirectoryrequiredstringWorker-side workspace root.
manifestUrirequireds3:// URIDestination for the output manifest.

File output

kind is FILE; container is mp4, mkv, or webm. Video requires a codec and may include width, height, bitrate, frame rate, preset, and profile. Audio is optional and may include codec and bitrate.

HLS output

kind is HLS. It requires an S3 destination and at least one rendition. segmentDurationSeconds defaults to 6.

JobSummary

FieldTypeDescription
idrequiredUUIDManager-generated job ID.
organizationIdUUIDOrganization derived from the project.
projectIdrequiredUUIDProject associated with the job.
staterequiredJobStateDurable job lifecycle state.
priorityrequiredintegerScheduling priority from -1000 to 1000.
workerPoolrequiredWorkerPoolPool selected from required capabilities.
requirementsrequiredJobRequirementsRequired capability names.
currentAttemptIdUUID | nullCurrent ownership attempt.
currentAttemptJobAttempt | nullCurrent attempt summary and live progress.
queuedAt / startedAt / completedAttimestamp | nullLifecycle timestamps.
createdAt / updatedAtrequiredtimestampPersistence timestamps.

JobDetail adds the complete executionPlan and an ordered attempts array.

JobAttempt

An attempt includes Worker identity, attempt number, fencing token, attempt state, processing stage, overall progress, event and progress sequences, lifecycle timestamps, failure details, output manifest URI, and optional live progress.

Live progress includes stage progress, processed and total duration, frame, FPS, speed, bitrate, ETA, and timestamp. Nullable metrics mean the Worker or FFmpeg did not report a value.

Recovery-enabled attempts also expose recovery (or null): encodedUnits, totalUnits, uploadedArtifacts, totalArtifacts, encodingComplete, and finalized. Upload counts describe artifacts rather than encoding units. Pause metadata is exposed as nullable timestamps: uploadPausedAt, uploadPauseExpiresAt, and uploadResumeRequestedAt. Local paths, multipart upload identifiers, and storage credentials are internal.

WorkerSummary

FieldTypeDescription
id / instanceIdrequiredstringStable Worker identity and current process instance.
hostname / version / ffmpegVersionrequiredstringRuntime identity and versions.
staterequiredWorkerStateOperational Worker state.
connectivityrequiredWorkerConnectivityHeartbeat freshness classification.
capacityrequiredobjectActive and maximum concurrent jobs.
resourcesrequiredobjectCPU, memory, GPU, and free-disk values.
capabilitiesrequiredWorkerCapability[]Typed FFmpeg and GPU capability records.
connectedAt / lastSeenAtrequiredtimestampConnection observation timestamps.

WorkerDetail adds liveStats, activeAttempts, completedCount, and failedCount.

ValidationError

FieldTypeDescription
statusCoderequired400HTTP status.
errorrequired"Bad Request"HTTP error label.
messagerequired"Validation failed"Stable top-level description.
detailsrequired{ path, message }[]All flattened DTO validation failures.