OpenAI-compatible
est. 2026
nara@api ~ %
Point your SDKat every model.
An OpenAI-compatible gateway for chat and image generation. One Bearer key, one credit meter, 20+ models — change the base URL, keep your code.
/manifesto
/lifecycle
Every request, four moves.
01reserve
A hold lands before a single token streams.
The gateway reserves credits at the model's catalog ceiling the instant your request arrives. Concurrent calls can't overdraw the balance — the meter is race-safe by construction, not by retry.
nara chat --reserve --model claude-3.5-sonnet
→ safety hold: 12 credits
→ balance verified · concurrent-safe
balance 10,000.00 cr
hold − 12.00 cr ← catalog ceiling
available 9,988.00 cr
02route
One key fans out to every provider.
The catalog resolves your model string to a provider, checks kill-switches, and arms the fallback chain. BYOK keys pass straight through at zero markup — your credits stop counting entirely.
route --provider auto
→ one key, every provider
→ fallback chain armed
anthropic ● selected byok: off
openai ○ fallback-1 armed
google ○ fallback-2 kill-switch: clear
03generate
Deltas stream back OpenAI-shaped.
Server-sent events arrive in the exact shape your SDK already parses — content deltas, tool calls, usage. Token counts accumulate live against the hold, never past it.
stream
→ 842 tokens · tool calls rendered
→ memory injected · web search off
tokens 842 cost-so-far 7.9 cr
04commit
The ledger keeps only what you used.
On completion the actual token cost commits, the rest of the hold releases back to your balance, and an idempotent ledger row is written. Retries can't double-charge. Ever.
commit --actual 8
→ 8 credits committed
→ 4 refunded · usage logged
hold 12.00 cr
commit − 8.00 cr
release + 4.00 cr refunded
balance 9,992.00 cr ✓ idempotent
/endpoints
The surface you call
Models routed
AI products
Credit meter
/trust
Built so you can leave. You won't.
OpenAI-compatible
The official OpenAI SDKs work by changing base_url — nothing else. No proprietary client, no lock-in, leave any time with zero rewrites.
BYOK passthrough
Bring your own provider keys and requests route through them at cost. Credits stop counting; your keys live in an encrypted vault and never leave the gateway.
Idempotent billing
Reserve → commit → release. Failed calls release the full hold, retries can't double-charge, and every credit movement lands in an auditable ledger.
/start
First token in under a minute.
100 free credits, no card. One curl away from every model.