One endpoint.
Three shapes.
RelayTokens exposes an OpenAI-compatible base URL and an Anthropic-compatible messages route. Use the key from your dashboard and keep the request shapes you already know.
Base URL
https://relaytokens.xyz/v1Overview
Requests are proxied to the model gateway with your account's routing key. Your branded key is checked at RelayTokens, then the request is forwarded with a server-side credential. The routing key is never returned to a browser or embedded in a response.
Auth
Bearer or x-api-key
Billing
prepaid balance
Streaming
SSE pass-through
Quickstart
- 1. Choose a package and create a deposit address.
- 2. Send SOL from any wallet with the shown memo.
- 3. RelayTokens verifies the transfer and shows your access code.
- 4. Open the dashboard, create an API key, and point your SDK at the base URL.
curl https://relaytokens.xyz/v1/chat/completions \
-H "Authorization: Bearer $RELAYTOKENS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6.1-sol",
"messages": [{"role": "user", "content": "Hello"}]
}'from openai import OpenAI
client = OpenAI(
base_url="https://relaytokens.xyz/v1",
api_key="rt_live_your_key",
)
response = client.chat.completions.create(
model="gpt-6.1-sol",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)curl https://relaytokens.xyz/v1/messages \
-H "x-api-key: $RELAYTOKENS_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-opus-5-5",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello"}]
}'Authentication
Send a branded key as an Authorization: Bearer header, or as x-api-key for Anthropic-shaped clients. Keys start with rt_live_ and are shown once.
Authorization: Bearer rt_live_your_key
x-api-key: rt_live_your_keyModels
The plan allows exactly these three model identifiers. Other identifiers return a clear error instead of being forwarded.
GPT-6.1 Sol
OpenAI · 1.05M context
gpt-6.1-solClaude Opus 5.5
Anthropic · 1M context
claude-opus-5-5Grok 4.7
xAI · 500K context
grok-4.7curl https://relaytokens.xyz/v1/models \
-H "Authorization: Bearer $RELAYTOKENS_API_KEY"Compatibility
The proxy forwards the supported routes and headers without rewriting the body. Streaming, tool calls, and response formats remain the provider contract. Compatibility is not an endorsement by the model vendors or client tools.
Streaming
Set stream: true. RelayTokens passes the provider server-sent events through and records usage from the final usage block when one is present.
curl -N https://relaytokens.xyz/v1/chat/completions \
-H "Authorization: Bearer $RELAYTOKENS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.7",
"stream": true,
"messages": [{"role": "user", "content": "Count to five."}]
}'Errors
Proxy-level errors use an OpenAI-shaped envelope. Provider errors are passed through with their original status and body. Branch on the machine code, not the message.
{
"error": {
"message": "The model \"gpt-5.5\" is not available on this plan.",
"type": "invalid_request_error",
"code": "model_not_available"
}
}401 invalid_api_keyMissing, revoked, or malformed RelayTokens key.403 account_suspendedThe account is paused.400 model_not_availableThe requested model is outside the plan.429 rate_limitedKey or IP rate limit. Respect Retry-After.503 account_not_readyThe account is not provisioned yet.Billing
Balance is prepaid. A model request reserves and then settles against the reported token count. The provider reserves for the maximum possible output when no limit is supplied, so set a sensible max_tokens in small-balance accounts.
Direct SOL
A one-time treasury transfer with a payment memo. The server verifies the memo, sender, destination, amount, and signature before adding balance.
NEAR Intents
Optional cross-chain quote into SOL. Mainnet only. The rail stays hidden when the operator has not enabled a mainnet treasury.
Read the pricing page for live rows.
Limits
Security
- Session cookies are HTTP-only and signed. Access codes are stored as SHA-256 hashes and rotated from settings.
- Branded keys are stored as SHA-256 hashes. Routing keys are encrypted at rest with AES-256-GCM.
- Payment signatures are accepted once. Memo, sender, treasury, and amount are checked before adding balance.
- Webhook payloads are verified with the Standard Webhooks HMAC before any state change.