Quickstart

Change two things — your base_url and api_key — and your existing chat-completions client keeps working. Here's the raw request:

curl https://api.routecut.com/v1/chat/completions \
  -H "Authorization: Bearer sk-route-…" \
  -H "Content-Type: application/json" \
  -d '{"model":"auto","messages":[{"role":"user","content":"Hello"}]}'

The response is the standard chat-completions shape, so anything that already parses that format parses Routecut.

Authentication

Authenticate with your Routecut key as a bearer token:

Authorization: Bearer sk-route-…
  • Your key is shown once at creation — store it then.
  • We keep only a SHA-256 hash of it server-side; the raw key is never stored, so it can't leak from us.
  • Keys are revocable instantly. You never share your downstream provider keys — Routecut manages those server-side.

Streaming

Set "stream": true — you get Server-Sent Events in the standard streaming format, terminated by data: [DONE]:

curl https://api.routecut.com/v1/chat/completions \
  -H "Authorization: Bearer sk-route-…" \
  -H "Content-Type: application/json" \
  -d '{"stream":true,"messages":[{"role":"user","content":"Hi"}]}'

Usage & savings analytics

Pull your spend and savings for any window:

curl "https://api.routecut.com/v1/analytics/usage?from=2026-05-01&to=2026-06-01" \
  -H "Authorization: Bearer sk-route-…"

You get total_cost_usd, baseline_cost_usd, savings_usd / savings_pct, plus breakdowns by_model and by_category. Prompt-level rows are keyed by hash only — never content.