Skip to content
Junctor
Interactive demo, simulated data

Keep AI features up, fast and on budget.

Junctor sits between your apps and model providers. Apps change one base URL; the gateway routes, retries, fails over, caches and enforces budgets.

Designed around
PythonFastAPIRedisPostgreSQLKubernetesOpenTelemetryPrometheusServer-sent eventsNext.jsTypeScriptTailwind CSSPythonFastAPIRedisPostgreSQLKubernetesOpenTelemetryPrometheusServer-sent eventsNext.jsTypeScriptTailwind CSS
How it works

One request, four steps.

The app keeps using the OpenAI SDK. Everything else happens in the gateway.

Change one line

Point the OpenAI SDK at the gateway's base URL and use a gateway key. The request shape does not change.

The key is checked

Rate limits, the monthly budget and guardrail hooks run before any model is called. A refusal costs nothing.

The alias is routed

The cache answers if it can. Otherwise the route policy picks a target, with retries, circuit breakers and fallback.

Everything is recorded

Each request gets a cost, a trace with time to first token, and counts toward its key's spend.

What it does

The parts every team ends up building.

Keys, routing, resilience, caching, guardrails and cost tracking, in one place instead of in every app.

Keys

Virtual keys

One key per app, with allowed aliases, requests and tokens per minute, and a monthly budget in dollars.

Routing

Routing by alias

Apps ask for smart, fast or local. Priority, weighted A/B, cheapest healthy or lowest p95 decides who serves it.

Resilience

Retries and fallback

Jittered backoff, per-target circuit breakers and failover to the next target before the first token is streamed.

Cache

Exact and semantic cache

Repeated and reworded questions are answered from a per-key cache, with a similarity threshold you can tune.

Safety

Guardrail hooks

Model allow-lists, max token caps, PII redaction and an HTTP hook to your own policy service.

Observability

Cost and traces

Cost per request, key, model and day, and a waterfall trace for every request in the log.

Under the hood

How the full system is designed.

The demo on this page runs on simulated data in your browser. This is the design it represents.

Architecture of the full Junctor designApps call the gateway with an OpenAI-compatible request. The FastAPI data plane checks the key and limits, runs guardrail hooks, looks up the cache, routes the alias and calls Anthropic, OpenAI or a self-hosted vLLM cluster. Redis holds rate limits, cache entries and breaker state; Postgres holds keys, routes and usage; OpenTelemetry exports traces and metrics.Your appsOpenAI SDK, new base_urlGateway data planeFastAPI on KubernetesAuth, limits, budgetGuardrail hooksExact and semantic cacheRouter, retries, breakersAnthropicOpenAIvLLMRedisPostgresOTel
How the full system is designed. The public demo on this site runs none of it: every screen is driven by simulated data in the browser.

Fail over only before the first token

If a provider fails before streaming starts, the gateway retries and moves to the next target. Once tokens are flowing it ends the stream with an error event instead of splicing two models' answers.

Breaker state is shared

Circuit breakers live in Redis, so every gateway replica skips a failing provider at the same moment, and probes are not repeated by each pod.

Budgets are checked twice

Before the call the gateway reserves the worst-case cost from max_tokens; after the call it settles the real cost. A key cannot overspend by racing requests.

The cache is per key

Cache entries are scoped to the key that created them, so one app never receives an answer written for another.

FAQ

Plain answers.

Is this a real product?

It is a portfolio project. The gateway is designed in full, but this site is a static front end with an animated walkthrough and a read-only workspace. All numbers, keys and requests are simulated.

Can I sign up or use it with my own keys?

No. Sign-ups and sign-ins are closed and there is no backend. Nothing you do in the workspace is sent anywhere or saved; reloading the page resets it.

What does it cost to run?

Nothing. The site is a set of static files on free hosting. It makes no model calls and has no servers, databases or analytics.

Are the charts and savings real measurements?

No. They come from seeded fixtures that are kept consistent with each other (the request log, totals and breaker history agree), and anything that looks like a result is labelled Simulated.

Where is the code?

The code for this demo, including the fixtures and their tests, is public at github.com/tiju07/junctor.

Who built it?

Tiju Lukose. The About me link has more projects and contact details.

Built by Tiju Lukose

I design and build infrastructure for AI products. See my other projects and how to reach me.