Buy AI inference at locked rates.

Prepay compute in USDC at today's per-token price. Point any OpenAI-compatible client at Relai. No cards, no contracts.

Locked futures rates.

Prepay at today's price. If spot moves up, you're already hedged.

Wallet to inference in four steps.

01

Connect

Sign a message with your Base wallet — no gas, no transaction.

02

Lock a rate

Prepay USDC and receive a tokenized compute balance.

03

Create a key

Mint a relai_sk_ key scoped to your wallet.

04

Route

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"}]}'

Questions, answered.

The short version of how Relai works.

How does locking a rate actually save money?+
You prepay at today's per-token price, so if spot moves up you're already hedged. Locked rates also sit well below market — up to ~83% on some models.
Do I have to change my code?+
No. Point any OpenAI-compatible client — SDKs, LangChain, Cursor — at the Relai base URL with your relai_sk_ key. Everything else stays the same.
What do I pay with?+
USDC on Base. No cards, no bank, no KYC. Sign in with your Base wallet and top up — your balance meters down per token as you route.
Who controls my keys and balance?+
You do. Auth is a wallet signature, API keys are scoped to your wallet and shown once, and your balance is a prepaid USDC credit no intermediary can reprice or revoke.

Lock your rate. Start routing.

Prepay compute in USDC at today's price and point any OpenAI-compatible client at Relai. No cards, no contracts.

Lock a rate. Use it anytime before expiry.

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.

🐋
DeepSeek V3
Futures contract · settles in USDC on Base
-83% vs $0.84/M market expires Sep 2026
Locked rate
$0.14/M tokens
Market rate
$0.84/M tokens
Order book USDC / million tokens
SIZE (USDC) LOCKED RATE TOKENS VS MARKET
Lock a rate
Amount (USDC)
USDC
Locked rate
Tokens you get
Expiry
Total

Settles in USDC on Base. No cards, no KYC.

Open positions
MODEL SIZE LOCKED RATE TOKENS EXPIRY STATUS

No open positions. Buy credits above to get started.

🐋
DeepSeek
DeepSeek-V3 family
deepseek/deepseek-chat ON RELAI

State-of-the-art mixture-of-experts model with 671B total parameters. Best open-source performance at a fraction of closed-model cost.

TEXT CTX 128K
Input
$0.14/M
Output
$0.28/M
🦙
Llama
Llama 3.3 70B
meta-llama/llama-3.3-70b-instruct ON RELAI

Meta's latest open-weight instruction model. Strong coding and reasoning with a fully open license.

TEXT CTX 128K OPEN
Input
$0.18/M
Output
$0.18/M
🔵
Qwen
Qwen2.5 72B
qwen/qwen2.5-72b-instruct ON RELAI

Alibaba's flagship 72B instruction model. Top-tier multilingual performance across 29 languages.

TEXT CTX 128K MULTILINGUAL
Input
$0.16/M
Output
$0.32/M
🔶
Mistral
Mistral Large
mistralai/mistral-large-latest ON RELAI

Mistral's flagship commercial model. Excellent at instruction following, code, and structured output.

TEXT CTX 128K
Input
$0.22/M
Output
$0.66/M
⚙️
GPT-4o
OpenAI GPT-4o
openai/gpt-4o ON RELAI

OpenAI's omni model. Frontier reasoning, vision, and tool use in a single endpoint.

TEXT VISION CTX 128K
Input
$3.50/M
Output
$14.00/M
Gemini
Gemini 2.5 Pro
google/gemini-2.5-pro ON RELAI

Google DeepMind's most capable model. Native multimodal with the longest context on the market.

TEXT VISION CTX 1M
Input
$2.50/M
Output
$10.00/M
❄️
Claude
Claude Sonnet 4.6
anthropic/claude-sonnet-4-6 ON RELAI

Anthropic's frontier model. Best-in-class instruction following, safety, and document analysis.

TEXT VISION CTX 200K
Input
$1.80/M
Output
$9.00/M
DeepSeek — forward rate curve
Locked rate per million tokens at each expiry
contango
1M Rate
$0.14/M
6M Rate
$0.21/M
1M → 6M
+50%
vs Live Spot
-83%
Markets price future compute higher than spot — the curve is in contango. Locking early lets you buy below the forward curve today. As expiry approaches, the locked rate converges toward spot — giving you a built-in cost advantage.

Your account

Connect your Base wallet to view your balance, open positions, and API keys.

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.

Architecture

Wallet
Base
Futures
UI
Backend
ledger
Gateway
OpenRouter
Models
DS · Llama · +5
Base
USDC
Ledger
credits
01
Connect
Base wallet — no gas, no transaction required.
02
Buy
Lock $/M · pay USDC · balance credited instantly.
03
Key
API key on your account — scoped to your wallet.
04
Infer
Gateway → models. Tokens meter down from your balance.
Note: you can browse every model routable through OpenRouter, but only models in a Relai tier can be locked at a futures rate. We add tiers over time — more models become lockable as we do.
Introduction
📄 What is Relai?
💡 Why Relai
Guides
⚡ Quickstart
🔀 Gateway
🤖 For agents
Reference
📡 API reference
Introduction

What is Relai?

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.

The short version

  • Lock a rate. Buy a prepaid compute balance at a fixed $/M-token price on the marketplace.
  • Pay in USDC. Top-ups settle on-chain to the Relai treasury and credit your balance.
  • Route anything. The gateway speaks the OpenAI API — SDKs, LangChain, Cursor, all work by swapping the base URL.
  • Own your access. Auth is a wallet signature. No intermediary sets your price or revokes your key.
Plainly: Relai is prepaid, locked-rate access to LLM inference, paid in USDC on Base and metered per token. It is infrastructure, not a financial product.
Quickstart →From zero to your first metered request in four steps.
Gateway →The OpenAI-compatible endpoint and the routable model list.
For agents →Drop-in SDK setup, streaming, and handling 402s.
API reference →Every REST endpoint for auth, dashboard, and top-ups.
Introduction

Why Relai

Spot inference pricing moves, keys get revoked, and billing hides behind cards and contracts. Relai fixes the price up front and settles in stablecoin.

Lock the rate

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.

Stablecoin-native

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.

Keys you control

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.

Prev
← What is Relai?
Guides

Quickstart

From zero to your first metered request in four steps.

1. Connect your wallet

Click Connect wallet. Sign the auth message with MetaMask or Coinbase Wallet — no gas, no on-chain transaction.

2. Lock a rate

Choose a model from the marketplace and prepay USDC at the locked futures rate.

3. Create an API key

From your account, mint a relai_sk_ key scoped to your wallet. Save it — shown once.

4. Route a request

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"}]}'
Prev
← Why Relai
Guides

Gateway

The OpenAI-compatible endpoint and the routable model list.

Base URL

https://api.tryrelai.xyz/api/v1/gateway/v1

Supported models

  • deepseek/deepseek-chat — DeepSeek V3 family
  • meta-llama/llama-3.3-70b-instruct — Llama 3.3 70B
  • qwen/qwen2.5-72b-instruct — Qwen2.5 72B
  • mistralai/mistral-large-latest — Mistral Large
  • openai/gpt-4o — OpenAI GPT-4o
  • google/gemini-2.5-pro — Gemini 2.5 Pro
  • anthropic/claude-sonnet-4-6 — Claude Sonnet 4.6
Prev
← Quickstart
Guides

For agents

Drop-in SDK setup, streaming, and handling 402s.

Drop-in setup

Any framework that accepts a custom baseURL works with Relai.

Streaming

Set "stream": true in your request body. The gateway returns SSE chunks exactly as the OpenAI API does.

Handling 402s

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.

Prev
← Gateway
Reference

API reference

Every REST endpoint for auth, dashboard, and top-ups.

Authentication

All requests require a relai_sk_ key in the Authorization: Bearer header.

Endpoints

  • POST /auth/connect — Authenticate with Base wallet signature
  • GET /dashboard/balance — Fetch current USDC balance
  • POST /dashboard/topup — Initiate a USDC top-up on Base
  • GET /keys — List API keys scoped to your wallet
  • POST /keys — Create a new relai_sk_ key
  • DELETE /keys/:id — Revoke an API key
  • GET /v1/gateway/v1/models — List routable models
Prev
← For agents