Sign in
Menu

Get started

What is Cran?

Cran is a codebase-aware AI gateway and control plane. It discovers every place your product calls an LLM, benchmarks the right model on your real prompts, optimizes the prompt to cut cost, and routes every call through one OpenAI-compatible endpoint.

The short version

Most AI gateways sit in front of your traffic and route whatever you hand them. Cran goes a layer further: it reads your codebase, turns each LLM call site into a tracked workflow, and gives you evidence - not vibes - about which model to use and how much you can save. Then it routes that traffic for you through a drop-in OpenAI-compatible API.

You change one line - the base URL - and keep using the OpenAI SDK you already have.

The loop

Cran is built around a single loop you can run continuously:

  • Scan - an IDE/MCP agent or the CLI scans your repo and registers every LLM call site (file, line, model, system prompt, tools, response shape) as a workflow.
  • Audit- each workflow’s prompts are run against candidate models and scored by an LLM judge, producing a quality/cost/latency comparison and a routing recommendation.
  • Optimize - Cran proposes a tighter system prompt and proves the token savings hold quality within a non-inferiority threshold before recommending it.
  • Route - you publish an architecture; the gateway serves it with a primary model, fallback chain, optional cost route, and per-class conditions.

One endpoint, every model

The gateway exposes an OpenAI-compatible surface: /v1/chat/completions, /v1/embeddings, and /v1/images/generations. Cran maintains a curated catalog of 85+ models across OpenAI, Anthropic, and Google (IDs look like provider/short-name, e.g. openai/gpt-5.5). Set model to:

  • "auto"- resolves to your project’s latest published architecture.
  • a workflow slug- resolves to that workflow’s published architecture.
  • a catalog id (e.g. anthropic/claude-sonnet-4-6) - routed directly, unmanaged.
curl https://your-cran-host/api/v1/chat/completions \
  -H "Authorization: Bearer $CRAN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "messages": [{ "role": "user", "content": "Hello from Cran" }]
  }'

How Cran fits

Cran is a single service: your browser dashboard and your IDE/MCP agent both talk to the Next.js app, which talks to Supabase and the model providers. Provider keys are server-side - they never leave the gateway. Calls flow your app → Cran → provider, with reliability (retries, fallback, circuit breaking) and governance (budgets, guardrails, audit log) applied in between.

When to use Cran

  • You have LLM calls scattered across a codebase and want a single inventory of where AI runs.
  • You want to pick models with evidence on your own prompts, not benchmarks on someone else’s.
  • You want one reliable, governed endpoint with fallback, budgets, and an audit trail.
  • You want to cut prompt cost without quality regressions, and prove it.

Next steps