Prerequisites
- Node.js 18+
- PostgreSQL 15+
- A fal.ai API key (for asset generation)
- AWS credentials with S3 + Lambda access (for cloud rendering)
- A Stripe account (for billing, optional)
- A Clerk application (for authentication)
Quick start with Docker
git clone https://github.com/jacobcwright/open-animate.git
cd open-animate/packages/api
docker-compose up -d
# Database
DATABASE_URL=postgres://oanim:oanim@localhost:5432/oanim
# Authentication (Clerk)
CLERK_DOMAIN=your-app.clerk.accounts.dev
CLERK_PUBLISHABLE_KEY=pk_test_...
# Media Gateway (fal.ai)
FAL_KEY=your-fal-ai-key
# Storage (S3-compatible)
AWS_ACCESS_KEY_ID=your-key
AWS_SECRET_ACCESS_KEY=your-secret
AWS_REGION=us-east-1
S3_BUCKET=oanim-renders
# Cloud rendering (Remotion Lambda)
REMOTION_FUNCTION_NAME=remotion-render-xxx
# Billing (Stripe) — optional
STRIPE_SECRET_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...
# Server
PORT=8000
# Via environment variable
export ANIMATE_API_URL=http://localhost:8000
# Or via config file
# ~/.oanim/config.yaml
# api_url: http://localhost:8000
Environment variables
| Variable | Required | Description |
|---|---|---|
DATABASE_URL | Yes | PostgreSQL connection string |
CLERK_DOMAIN | Yes | Clerk OAuth domain |
CLERK_PUBLISHABLE_KEY | Yes | Clerk publishable key for browser auth |
FAL_KEY | Yes | fal.ai API key for media gateway |
AWS_ACCESS_KEY_ID | For cloud render | AWS access key |
AWS_SECRET_ACCESS_KEY | For cloud render | AWS secret key |
AWS_REGION | For cloud render | AWS region (default: us-east-1) |
S3_BUCKET | For cloud render | S3 bucket for render bundles and outputs |
REMOTION_FUNCTION_NAME | For cloud render | Remotion Lambda function name |
STRIPE_SECRET_KEY | For billing | Stripe secret key |
STRIPE_WEBHOOK_SECRET | For billing | Stripe webhook signing secret |
PORT | No | Server port (default: 8000) |
New users receive a $5.00 credit balance on signup. Without Stripe configured, users won’t be able to purchase additional credits, but existing balances still work.
Direct provider keys
For asset generation without running the platform API, users can setANIMATE_FAL_KEY to go directly to fal.ai:
docker-compose.yml
The includeddocker-compose.yml runs PostgreSQL:
Production considerations
For production deployments:- Database: Use strong passwords, enable SSL, and set up regular backups
- Stripe webhooks: Configure the webhook endpoint at
https://your-domain/api/v1/billing/webhook - Rate limiting: The API includes in-memory rate limiting (60 req/min for media, 10 req/min for auth). For multi-instance deployments, consider adding a Redis-backed rate limiter
- HTTPS: Place the API behind a reverse proxy (nginx, Caddy) with TLS