Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.raziel.fun/llms.txt

Use this file to discover all available pages before exploring further.

Raziel Router is a thin proxy over OpenRouter. You authenticate with one rz_live_… key; the gateway handles provisioning an OpenRouter sub-key behind the scenes, routes each request to the cheapest healthy listing, streams the response back, and deducts from your USDC balance after each request.

How deposits work

All balance is held in USDC. When you deposit, Raziel takes a 15% protocol margin at deposit time and credits the remainder to your account at OpenRouter rates. There are no per-request fees beyond that margin.

Gateway endpoints

The gateway exposes two API surfaces:
EndpointProtocol
POST https://raziel.fun/gateway/v1/messagesAnthropic Messages API (drop-in)
https://raziel.fun/gateway/openai/v1OpenAI-compatible chat completions
Both endpoints require Authorization: Bearer rz_live_… and support streaming.

How routing works

Every request hits the gateway, which selects the cheapest healthy provider listing for the requested model, forwards the request, and streams the response back. If a provider fails mid-stream, the gateway returns a 502 upstream_error. Usage is metered per token — your balance updates after each completed request.

Error codes

StatusTypeMeaning
401auth_errorInvalid or revoked Raziel key
402auth_errorInsufficient balance — deposit more USDC
503no_listingNo live providers for this model — try again shortly
502upstream_errorAll candidate providers failed — retry with backoff

Where to go next

API Keys

Issue and manage your rz_live_… keys.

Deposit

Top up your USDC balance on Solana.

Claude Code

Run Claude Code through the Raziel gateway CLI.

OpenAI-compatible endpoint

Use Raziel with any OpenAI-compatible client.