Open source

One API for every AI image & video model

LiteGen is the universal proxy for AI image and video generation. Like LiteLLM, but for multimedia — route across every major provider with automatic fallback, load balancing, caching, and cost tracking.

$ curl litegen/v1/images/generations \
  -d '{"model":"openai/dall-e-3",
        "prompt":"a red panda coding"}'

{
  "provider": "openai",
  "cost_usd": 0.04,
  "data": [{ "url": "https://…" }]
}
OpenAI-compatible — point your existing client at LiteGen.

One prompt. Every image & video model.

Send a single OpenAI-style request. LiteGen fans it out to whichever model you want — DALL·E, SDXL, FLUX, Gen-3, Dream Machine — falls back when one is down, and streams the finished image or video straight back. Hover a model to light up its route.

Your prompt
LiteGen
  • Smart routing
  • Fallback
  • Cost tracking
  • Per-model schemas
  • Key management
  • Webhooks
  • OpenAIImageDALL·E 3
  • StabilityImageSDXL
  • ReplicateImageFLUX
  • RunwayVideoGen-3
  • LumaVideoDream Machine

Hover a model to light up its route

Diagram: one OpenAI-style prompt enters the LiteGen gateway, which applies routing, fallback, caching, per-model schemas, key management, and webhooks, then dispatches to image models (OpenAI DALL·E 3, Stability SDXL, Replicate FLUX) and video models (Runway Gen-3, Luma Dream Machine) and streams the generated media back.

Everything you need to ship generation at scale

A single, self-hosted gateway in front of every provider.

  • Unified API

    OpenAI-compatible REST endpoints for image & video across every provider.

  • Smart routing

    Fallback chains, weighted round-robin, lowest-cost and lowest-latency strategies.

  • Caching

    In-memory cache with configurable TTL to skip duplicate generations.

  • Cost tracking

    Per-request cost estimation and aggregate spend analytics.

  • API key management

    Create and revoke keys, with weighted key pools and per-key quotas.

  • Observability

    Request logging, Prometheus metrics, and structured tracing built in.

  • Real-time dashboard

    Monitor providers, requests, and spend from a React dashboard.

  • Self-hosted

    A single binary or Docker, backed by SQLite or Postgres.

Works with the providers you already use

10+ providers and growing — swap or combine them without touching your code.

  • OpenAI
  • Stability AI
  • Replicate
  • Google
  • Fal
  • Runway
  • Luma
  • and more

Up and running in minutes

Point your existing OpenAI-style client at LiteGen and start generating.

curl https://your-litegen-host/v1/images/generations \
  -H "Authorization: Bearer $LITEGEN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/dall-e-3",
    "prompt": "a red panda coding at a desk, cinematic lighting",
    "size": "1024x1024"
  }'