How it works

One endpoint between your app and every model.

VaultAPI sits in the middle of a call you already make. Here is exactly what happens to a request, from your SDK to the provider and back.

Your app calls /v1/chat/completionsAuth · paywall · rate limitRouting picks the modelYour key, decrypted just-in-timeResponse + log + cost

01 · Connect

Bring your own provider keys

Add your OpenAI, Anthropic, Gemini, Groq, Mistral or OpenRouter key once. It is envelope-encrypted with AES-GCM the moment it lands — a unique data key per secret, wrapped by a versioned master key — and decrypted only for the instant a request needs it. After saving, nobody can read it back: the UI shows a hint and the last four characters, and the plaintext never touches a log, a response or a disk.

  • You keep your own provider accounts and rates — we never resell inference.
  • Revoke or rotate a key and running traffic picks up the change immediately.

02 · Point

Change one line, keep your SDK

VaultAPI speaks the OpenAI-compatible API you already use. Swap base_url to your gateway and use a vk_ key instead of the provider key. That is the whole migration — streaming, tool calls, retries and every provider come along for free.

  • One endpoint: POST /v1/chat/completions for every provider.
  • vk_ keys are scoped to your workspace and revocable instantly.

03 · Route

Send cheap-enough prompts to cheaper models

Routing rules run top-down, first match wins. A rule pairs a condition — prompt under N tokens, model matches a pattern — with the model to use instead. Most traffic does not need your most capable model, and the advisor mines your real logs to suggest rules with the savings it projects.

  • Every decision is auditable: logs record both requested and served model.
  • Send x-vaultapi-no-route: true to bypass routing for a single request.

04 · Watch

See what every request cost

Each call is logged with tokens, latency, retries, fallbacks and a cost computed from the model catalog. Analytics charts spend and volume over time and splits traffic by provider. Budgets alert at 50/80/100% of a monthly cap — or hard-stop gateway traffic the moment it is exhausted.

  • Token counter and cost estimator price a prompt before you send it.
  • A runaway loop becomes a 429 you notice, not an invoice you discover.

The whole migration

Two lines. Your existing SDK, prompts and response handling stay exactly as they are.

client = OpenAI(

- base_url="https://api.openai.com/v1",

+ base_url="https://<your-vaultapi>/v1",

- api_key=os.environ["OPENAI_API_KEY"],

+ api_key="vk_live_…", # your gateway key

)

Three days free. No card up front.

Add a provider key, send one request, and watch the first log line appear.