Automated After Effects video rendering via API

An API that turns After Effects templates plus data into finished videos on a managed render farm.

Domain
Media, video production automation
Our role
Architecture, backend and workflow engineering, After Effects scripting, render farm integration, frontend
Year
2025

We built a cloud API that turns Adobe After Effects templates and structured data into rendered MP4 videos with no motion designer in the loop. It covers the whole path: template registration, asset upload, AI-generated footage, rendering on remote Windows render nodes and delivery through S3-compatible storage. Every step is tracked, reports its progress and can be retried.

Challenge

  • Short videos with an AI presenter, B-roll, music and transitions were made by hand: a designer opened the project, swapped footage, fixed timing and exported each video.
  • Rendering runs only on licensed Windows machines that have to be reached over the public internet, sometimes through proxies.
  • Designers keep editing compositions, so the backend cannot hard-code layer structures.
  • Renders take minutes and can fail during download, render or upload, and a failure must not leave a machine locked or a job stuck.
  • Some inputs come from external AI services that are asynchronous and slow.

Solution

A template is a typed contract: an .aep project, an ExtendScript file and a list of layers (video, photo, audio or data), each marked required or optional. A job fills that contract with footage and per-layer settings, and the API refuses to render until every required layer is filled. The render itself is a durable Inngest workflow made of checkpointed steps: allocate a node, stage the assets, render, upload, release the node. Inside After Effects, the template script reads the job parameters and builds the compositions, so one project file produces many different videos. Optionally, one request makes a whole video: an LLM writes the content plan and B-roll ideas, an avatar service records the narration and a text-to-video model generates clips in parallel.

Architecture

Architecture: a cloud API and workflow engine drive Windows render nodes over SSH, while media moves directly through S3
Architecture: a cloud API and workflow engine drive Windows render nodes over SSH, while media moves directly through S3

What the system does

Templates and jobs API
Create and edit templates and layers, upload files straight to storage through presigned URLs, and set per-layer timing, transform, opacity, audio levels and transitions on each job.
One-call rendering
POST /render/{job_id} queues the job, and the result comes back as a download link that stays valid for 7 days.
Three-phase progress
Asset download, render and result upload each report their own percentage, taken live from the node.
Render node management
Register and remove nodes through the API or an admin CLI. SSH access is checked when a node is added, and a monitor probes every node once a minute.
End-to-end video generation
Content plan, avatar video, B-roll ideas, parallel B-roll generation, layer assembly, render and upload run as one workflow.
Web app
A React app that also runs as a Telegram Mini App: templates, jobs, avatar and B-roll generation, a timeline-style compose view, rendering and playback.

Engineering decisions

  • Every render stage is a separate checkpointed Inngest step. A failed step is retried on its own and completed steps are not re-run. Errors that a retry cannot fix, such as a missing project file, are marked non-retriable.
  • If any step fails, a compensating step releases the node and marks the job as failed, so a crashed render never keeps a machine reserved.
  • The backend controls Windows hosts over async SSH: it creates a per-job folder, writes the nexrender manifest, starts the CLI and parses its output line by line to show live progress. Every remote call has a timeout.
  • Heavy media never passes through the API: nodes download inputs and upload the MP4 straight to S3-compatible storage through short-lived presigned URLs.
  • Slow AI services are polled on a fixed interval with a hard timeout, and B-roll clips are generated in parallel, at most four per video, to keep costs under control.

Interface

Diagrams

Render job lifecycle: from filling the layers to a finished MP4, including node release on failure
Render job lifecycle: from filling the layers to a finished MP4, including node release on failure
Three generations of the platform: from a Node.js prototype to a render API with content generation
Three generations of the platform: from a Node.js prototype to a render API with content generation

Stack

  • Python
  • FastAPI
  • PostgreSQL
  • SQLAlchemy
  • Inngest
  • asyncssh
  • Adobe After Effects
  • ExtendScript
  • nexrender
  • FFmpeg
  • S3-compatible storage
  • React
  • TypeScript
  • Docker

What this shows

  • A desktop tool, After Effects, turned into a headless API service that produces videos without manual design work.
  • Designers change templates without backend changes, because the layer contract and in-app scripts separate creative work from code.
  • A cloud control plane reliably drives a remote Windows render farm with retries, compensating actions and progress reporting.
  • Several AI services (LLM, avatar and text-to-video) combined into one pipeline with cost limits.

Questions about this case

Do we need backend changes when a designer edits a template?

No. The backend passes only layer parameters to After Effects, and an ExtendScript library inside the project builds the compositions and layers. Designers can change a template without any code change.

What happens if a render fails halfway?

The failed step is retried on its own and completed steps are not re-run. If a retry cannot fix the error, a compensating step releases the node, the job is marked as failed and the full render log is kept.

Can the renders run on our own machines?

Yes. The render farm is a pool of Windows machines with After Effects and the nexrender CLI, registered through the API or the CLI. The platform reaches them only over SSH, supports proxies and sends jobs only to healthy nodes.