Real apps don’t call one model.
Production-grade outputs come from chains: enhance the prompt, generate, upscale, compose, narrate. Workflows let you build this as a typed graph, versioned, diffed, rolled back, and ship the whole thing through one API call.
- WHATA typed graph that chains models, defined once, executed as one call.
- WHYVersioned, branched in parallel, traced end to end. No glue code.
- HOWDefine the graph; call
each({ workflow }); pin a version when you're ready.
A typed graph, shipped through one call.
Workflows are first-class infrastructure. Each node is a model call or a utility (enhance, moderate, compose). Edges are typed. Versions are pinned. Every run is traced end-to-end.
Versioned + diffed
v3.2 in prod, v3.3 in staging, v2.4 archived. Pin a version per call, diff two versions side by side, and roll back in one click, no rebuild, no redeploy.
Multi-model parallelism
Branches run concurrently. Image and video generated in parallel and merged at the next node, total latency = the slowest branch, not the sum of branches.
Single endpoint
Your client calls each({ workflow: "X" }). The graph executes server-side; you don't orchestrate steps from the client. One trace_id covers the whole run.
Turning a one-line prompt into a shippable product video.
A real workflow, four steps: enhance the prompt, generate the video, add the voiceover, compose the cut, all shipped through one API call.
A graph. An execution. A version.
Workflows aren’t scripts. They’re typed graphs with versioned execution. The runtime handles parallelism, retries, and traces; you describe what chains together.
Typed nodes. Wired by reference.
Every node has typed inputs and outputs. Edges are references like 'enhance.out', typo-checked at define time.
Sequential + parallel. Traced as one.
Independent branches run concurrently. Dependents wait. Every step lands in one trace with cost and latency per node.
Pin a version. Roll back in one string.
v3.2 in prod, v3.3 in staging, v2.4 archived. Promote, rollback, A/B, change one string, no redeploy.
Reach for workflows when…
A consumer feature needs 4 model calls
Image + voice + music + compose, orchestrate that from your client and you'll be debugging glue code on weekends. Workflows make it one server-side call, one trace, one rollback unit.
4 calls → 1 API callQA wants the new version on 10% of traffic
Without versioning that's a redeploy with feature flags. With workflows, ship v3.3 to 10% sticky-by-user and watch the trace before promoting, or roll back in one click if quality drops.
version("v3.3") · 10% rolloutStep 3 of 4 just failed in production
Without resumable steps you re-run from scratch and double bill the user. Workflows cache step outputs, retry from the failure point, and bill the user once, no half finished outputs reaching customers.
retry from step 3 · cached 1-2Marketing wants to A/B the whole pipeline
A/B isn't just for individual models, sometimes the whole pipeline (enhance + gen + voice) is what's changing. Workflows are A/B-able as a unit, with sticky cohorts and a single significance test.
experiment: pipeline-v3 vs v4Other products you’ll use alongside this.
FAQ
What is an each::labs workflow?
Build the pipeline once. Ship it from anywhere.
Workflows are free on every plan. Versioning, rollback, and visual editor are unlimited.