AI gateway

An open-source LLM gateway that speaks OpenAI to every provider.

Point your existing OpenAI client at the gateway and keep your code. AcruxCore resolves the model to a provider — OpenAI, Anthropic, Gemini, or any OpenAI-compatible endpoint you register — calls it with your key, prices the result and records the request. Streaming included.

gateway.sh
# ACRUX=https://api.acruxcore.com/api/v1
# OpenAI-compatible — point any client here
curl $ACRUX/gateway/chat/completions \
  -H "Authorization: Bearer $GATEWAY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role":"user","content":"Hi"}]
  }'

# response headers carry the accounting:
# request-id · provider · cost · cache hit

What you get

Compatibility, your own keys, guardrails and cost.

Drop-in compatible

POST /gateway/chat/completions speaks the OpenAI wire format, streaming included. Swap the base URL and your current client, retries, and code paths all stay put.

Bring your own keys

Store an OpenAI, Anthropic, Gemini or OpenAI-compatible credential — base URL included — encrypted at rest. We sit in front of your provider account and never take it over.

Virtual keys with guardrails

Issue scoped keys that never expose a provider credential. Restrict one to named models or providers, cap its requests and tokens per minute, and cap spend by day, week, month or total.

Cost on every response

x-gateway-* headers return the request id, the provider that served it, the priced cost, and whether it was a cache hit. Accounting is not a batch job you run later.

Reliability

Automatic model fallbacks.

Each model you register carries an ordered list of backups. When a call cannot be served, the gateway walks that chain and answers from the first model that can — the request shape your app sends never changes.

What went wrongWhat the gateway does
Rate limit, 5xx or network timeoutRetries the same model first, then works down your chain until one answers.
Bad or revoked credential (401, 403)Skips the retry — a wrong key will stay wrong — and moves straight to the next model in the chain.
Malformed request (400)Comes back to you immediately. A request the provider rejected as invalid is not worth sending anywhere else.

A fallback answer is priced, traced and reported like any other, with the provider that actually served it on the response headers. Sending a fallback list replaces the whole ordered chain, so send it as one set.

Guide: automatic model fallbacks

Cost control

Cache repeated requests.

Caching is opt-in per virtual key: give a key a TTL and identical requests inside that window are answered from your own team cache instead of the provider.

What counts as identical

A hash of the request parameters — same model, same messages, same settings. Only non-streaming calls that ask for temperature 0 are eligible, because anything else is a request to vary.

What you see

x-gateway-cache: hit or miss on every response, and $0 for a hit. The call is still traced and still written to the usage ledger, so a cached answer is never an invisible one.

What it measured

On one published run — 15 prompts, four repeats each, gpt-4o-mini, a five-minute window — the repeats came back from cache. Your own hit rate depends on how repetitive your traffic really is.

Caching is per team and per key, never shared between teams. It is a setting you turn on deliberately, not a default that quietly answers for a model.

Benchmark: exact-match gateway cachingGuide: scope access with virtual keysGuide: budgets and rate limits

In the dashboard

Everything without writing a line of code.

The API and SDKs cover the automated path. For the day-to-day, the dashboard does the same work in the browser.

  • Register a public model name that maps to a credential and an upstream model.
  • Test a registered model in one click before your app depends on it.
  • Try any model in the Playground — ad-hoc messages, or a stored prompt by name.
  • Read request logs with the exact prompt version that produced each call.
  • Watch spend against a budget, per key or across the whole team.
  • Rotate a provider credential without touching a line of application code.
The AcruxCore Playground sending a streaming completion, with a gateway telemetry strip showing provider, model, cost, cache status and latency below the request form.
The Playground sends a real gateway call and shows the telemetry it returns — provider, cost, cache, latency.

Go deeper

Documentation for this piece.

Guide: route calls through the gatewayGuide: automatic model fallbacksGuide: scope access with virtual keysGuide: budgets and rate limitsAPI: gateway chat completionsAPI: connections, keys & budgets

The rest of the platform

It composes with the other five.

Each piece works on its own, and they get better together — a trace links back to a prompt version, a dataset is built from feedback.

PromptsA prompt management platform for versioned, templated message sets. Move a production alias between versions without redeploying your app.TracingLLM observability for every call — spans for model, tokens, latency and cost. Or export your own spans over OpenTelemetry.ToolsLLM tool calling from a versioned catalog: functions bound to a prompt alias and handed to the model.EvaluationAn LLM evaluation platform: score prompt versions and models on a dataset, judge live traffic on a standing rule, and optimize the next version.AuditAn audit log of every recorded action — keys, members, gateway, secrets, prompts and tools — filtered by area, event or actor.

Connect your first model.

Store a provider credential, map a public model name to it, and route one call through the gateway. Your keys stay yours, and no credit card is required.