Architecture

This page describes how StudioAxis executes Axis workloads. WorldAxis does not host APIs or store production data — it documents the engine.

System context

┌──────────────────────────────────────────────────────────────────────────┐
│  Your systems (DAM, CMS, custom orchestrator)                            │
└─────────────────────────────────┬────────────────────────────────────────┘
                                  │ HTTPS
                                  ▼
┌──────────────────────────────────────────────────────────────────────────┐
│  WorldAxis (worldaxis.io)                                                │
│  · Developer docs · Positioning · Enterprise trust                       │
└─────────────────────────────────┬────────────────────────────────────────┘
                                  │ documents only
                                  ▼
┌──────────────────────────────────────────────────────────────────────────┐
│  StudioAxis (studioaxis.io) — source of truth                            │
│  · External API · Auth · Billing · Usage logs · Storage · Events         │
└──────────────────────────────────────────────────────────────────────────┘

Request lifecycle

Client
  │
  ├─► API Gateway (auth, rate limit, idempotency)
  │
  ├─► Organization context (org_id, balance, permissions)
  │
  ├─► Semantic layer
  │     · Resolve category + org visual identity (organization settings)
  │     · Translate prompt into cinematic scene specification
  │     · Apply creative direction (framing, mood, composition)
  │
  ├─► Prompt orchestration
  │     · v1: constrained prompt build → generation spec
  │     · v2: semantic translation → creative direction → render
  │
  ├─► Image generation pipeline
  │     · Primary model pass (e.g. Gemini-class)
  │     · Optional identity refinement (LoRA / I2I)
  │     · Sharp processing, format normalization
  │
  ├─► Persistence
  │     · generation record · public asset URL · structured metadata
  │
  ├─► Usage record (one generation counted for billing)
  │
  └─► Event log (audit, webhooks if configured)

Layers

StudioAxis backend

Next.js App Router on serverless edge, PostgreSQL via Supabase, Mollie for fiscal events, Resend for transactional mail. All external API routes live here — not on WorldAxis.

Semantic layer

Maps API payloads to orchestration context before generation:

InputRole
promptUser intent (interpreted, not passed raw to the model)
categoryScene / use-case template (v2)
Org visual identityBrand look, tone, and constraints (organization settings in StudioAxis - not a public request field)

The semantic layer prevents free-form prompts from breaking brand or compositional consistency.

Prompt orchestration

v1 (/v1/generate-image) — Single-stage build: merge user intent with engine constraints, output one generation spec.

v2 (/v2/cinematic-image) — Multi-stage:

  1. Semantic translation from category + prompt
  2. Creative direction (shot, lighting, mood)
  3. Image generation via provider backend

Orchestration is deterministic in structure; variation is bounded by category and brand parameters.

Image generation pipeline

  1. Primary generative pass
  2. Optional identity pipeline — image-to-image with low strength + control nets to preserve environment while swapping talent
  3. Post-process (resize, format, CDN upload)

Failures upstream are caught, logged, and surfaced as typed API errors — not raw provider stack traces.

Storage and event logging

  • Assets stored with stable CDN URLs per generation
  • Usage records are append-only per generation for billing and audit
  • API access and errors logged for ops and enterprise audit

Idempotency and rate limits

MechanismBehavior
Idempotency-KeySame key + same body → same result within retention window
Rate limitsPer-org token bucket; 429 with Retry-After
Quota402 when generation quota or balance insufficient

Orchestration context (API)

Request (prompt + category + org visual identity)
        │
        ▼
Semantic translation
        │
        ▼
Creative direction (shot, lighting, mood)
        │
        ▼
Image generation engine
        │
        ▼
Structured output + usage record

Data you do not send to WorldAxis

API keys, org balances, productions, and billing state exist only in StudioAxis. Integrate against https://studioaxis.io/api/external/... exclusively.

Related