Templates
BabyChain icon

BabyChain

Canvas studio and durable chain API for image and video model workflows with one final callback.

View site
Loading preview
BabyChain preview

Best for

API-first chains
Image model chains
Video model chains
Output handoffs
Run timelines
Agentic planning
Final callbacks
BYOK execution
Schema discovery

Overview

BabyChain is a self-hosted canvas studio, Agentic Workflow planner, and durable API for image and video model chains. Its built-in chain template supports image generation, optional image refinement, image-to-video, and optional video-to-video modification, while Copilot and Autopilot modes let Amazon Nova propose or apply downstream prompts.

Use it when a visual media workflow needs to become production infrastructure: owners design the chain on a React Flow canvas, product code calls the same POST /api/v1/chains/runs contract, and Aurora stores every run, step, checkpoint, callback, and saved canvas. The starter runs on Next.js with BYOK provider execution, optional BabySea mode, optional AWS S3 or Vercel Blob storage, and optional Amazon Bedrock planning for Agentic Workflow.

What you can build

  • Multi-flow canvas workspaces with autosave, flow duplication, run controls, and a saved results Library.
  • Self Control chains where users choose models, prompts, and schema-valid parameters directly.
  • Agentic Workflow · Copilot runs where Amazon Nova suggests the next prompt and fields for review.
  • Agentic Workflow · Autopilot runs where Amazon Nova plans and BabyChain applies each downstream step automatically.
  • Public API endpoints for listing chains, creating runs, polling runs, continuing Copilot checkpoints, canceling runs, and reading model schemas.
  • Durable run timelines with ordered steps, provider request ids, outputs, errors, checkpoint state, and one final signed callback.
  • BYOK execution across 54 image and video model entries from Alibaba Cloud, Black Forest Labs, BytePlus, Google, OpenAI, and Runway, generating 58,752 valid chain templates.
  • Optional output archival to AWS S3 or Vercel Blob before API responses and downstream handoffs use the media URL.

What you need

  • Next.js for API routes, route handlers, and the server runner.
  • AWS Aurora PostgreSQL for runs, steps, agent checkpoints, saved canvases, API keys, callbacks, webhook deliveries, audit events, and migrations.
  • BabyChain secrets for BABYCHAIN_API_KEY, BABYCHAIN_CRON_SECRET, and BABYCHAIN_CALLBACK_SECRET.
  • Amazon Bedrock if you enable Agentic Workflow Copilot or Autopilot.
  • AWS S3 or Vercel Blob if you enable durable media storage.
  • BabySea when BABYCHAIN_PROVIDER_MODE=babysea.
  • Alibaba Cloud for BYOK Qwen, Wan, and HappyHorse model execution.
  • Black Forest Labs for BYOK FLUX image model execution.
  • BytePlus for BYOK Seedream and Seedance model execution.
  • Google for BYOK Imagen, Nano Banana, and Veo model execution.
  • OpenAI for BYOK image model execution.
  • Runway for BYOK Gen-4 and Aleph model execution.
  • Sentry for optional production observability.
  • For hosting, you can deploy using AWS CloudFormation, AWS EC2, Coolify, Docker, Fly.io, Google Cloud Run, or Vercel.

Description flow

An owner starts in the dashboard by logging in with the configured owner account, composing one or more flows on the canvas, and choosing a chain_runner mode: Self Control, Agentic Copilot, or Agentic Autopilot. An API caller can enter the same workflow by listing models, reading a schema from GET /api/v1/models/{modelId}, or posting a chain payload to POST /api/v1/chains/runs with Authorization: Bearer BABYCHAIN_API_KEY.

The canvas and API both send the same chain contract: selected models, generation_* input objects, execution mode, and optional webhook URL. Self Control submits user-authored prompts directly; Copilot pauses at awaiting_agent checkpoints for approval or edits; Autopilot lets the planner write and apply the next schema-valid step without an approval pause.

The runner validates model roles and fields through Semantic Lady, stores the run and ordered steps in Aurora, then advances at most one provider action per invocation. Polling GET /api/v1/chains/get/{runId} or the recovery cron can resume the run from Aurora; Agentic Workflow suggestions, selected prompts, validation state, token usage, and instruction/schema versions are persisted as chain_agent_checkpoint records.

When the run succeeds, fails, or is canceled, the presenter returns one caller-facing resource with step details, generated media references, agent checkpoints, and timeline events. If webhook_url is supplied, BabyChain sends one signed terminal callback with that same public run resource, while saved canvas cards keep the completed outputs available in the Library.