Prepay compute in USDC at today's per-token price. Point any OpenAI-compatible client at Relai. No cards, no contracts.
Prepay at today's price. If spot moves up, you're already hedged.
Sign a message with your Base wallet — no gas, no transaction.
Prepay USDC and receive a tokenized compute balance.
Mint a relai_sk_ key scoped to your wallet.
Swap the base URL in any OpenAI client. Tokens meter down.
# works with the OpenAI SDK, LangChain, Cursor — anything with a baseURL curl https://api.tryrelai.xyz/api/v1/gateway/v1/chat/completions \ -H "Authorization: Bearer relai_sk_..." \ -H "Content-Type: application/json" \ -d '{"model":"deepseek/deepseek-chat","messages":[{"role":"user","content":"hi"}]}'
The short version of how Relai works.
relai_sk_ key. Everything else stays the same.Prepay compute in USDC at today's price and point any OpenAI-compatible client at Relai. No cards, no contracts.
Each contract is a prepaid balance at a fixed per-token price. Spend it through the gateway whenever you want — no matter where the market moves.
Buy contracts at locked rates. Spend them at the gateway anytime before expiry.
Settles in USDC on Base. No cards, no KYC.
No open positions. Buy credits above to get started.
Seven model families. One gateway.
State-of-the-art mixture-of-experts model with 671B total parameters. Best open-source performance at a fraction of closed-model cost.
Meta's latest open-weight instruction model. Strong coding and reasoning with a fully open license.
Alibaba's flagship 72B instruction model. Top-tier multilingual performance across 29 languages.
Mistral's flagship commercial model. Excellent at instruction following, code, and structured output.
OpenAI's omni model. Frontier reasoning, vision, and tool use in a single endpoint.
Google DeepMind's most capable model. Native multimodal with the longest context on the market.
Anthropic's frontier model. Best-in-class instruction following, safety, and document analysis.
Forward rates for each model family, updated in real-time. The curve reflects market consensus on where inference prices will be — lock in early to hedge against moves.
Connect your Base wallet to view your balance, open positions, and API keys.
Lock the inference price early. Spend credits at the gateway.
What's a locked rate? A futures-style contract lets you pay today's price now and use it later. You lock a fixed rate per million tokens, pay USDC up front, and spend those credits anytime before the contract expires — no matter where the market price moves.
Relai is the rate desk for AI inference. Lock today's per-token price in USDC, then route through an OpenAI-compatible gateway — settled through your Base wallet.
Instead of paying volatile spot rates and juggling cards and revocable keys, you prepay compute at a fixed rate and spend it whenever you want.
Spot inference pricing moves, keys get revoked, and billing hides behind cards and contracts. Relai fixes the price up front and settles in stablecoin.
Model prices drift. If you're building on inference, your unit economics drift with them. A locked rate turns a moving cost into a fixed one you can plan around.
Fund a balance with USDC from any Base wallet — no card, no invoice, no regional gate. The same rails work for a solo builder and an autonomous agent.
Your account is a wallet you already own. Sign in is a message signature; there's no password to leak and no account a provider can quietly shut off mid-project.
From zero to your first metered request in four steps.
Click Connect wallet. Sign the auth message with MetaMask or Coinbase Wallet — no gas, no on-chain transaction.
Choose a model from the marketplace and prepay USDC at the locked futures rate.
From your account, mint a relai_sk_ key scoped to your wallet. Save it — shown once.
curl https://api.tryrelai.xyz/api/v1/gateway/v1/chat/completions \ -H "Authorization: Bearer relai_sk_..." \ -H "Content-Type: application/json" \ -d '{"model":"deepseek/deepseek-chat","messages":[{"role":"user","content":"hi"}]}'
The OpenAI-compatible endpoint and the routable model list.
https://api.tryrelai.xyz/api/v1/gateway/v1Drop-in SDK setup, streaming, and handling 402s.
Any framework that accepts a custom baseURL works with Relai.
Set "stream": true in your request body. The gateway returns SSE chunks exactly as the OpenAI API does.
When your prepaid balance runs out, the gateway returns 402 Payment Required. Catch this and prompt the user to top up via their Base wallet.
Every REST endpoint for auth, dashboard, and top-ups.
All requests require a relai_sk_ key in the Authorization: Bearer header.
relai_sk_ key