Build with the crypto-native AI gateway for apps and agents.

EshuRouter gives you one OpenAI-compatible endpoint for leading AI models, plus a crypto-native billing path for both developer apps and agent traffic. New accounts receive $0.50 in starter credits, you can fund with crypto, create an API key, and keep the same request shape across OpenAI, Anthropic, Google, Meta Llama, Qwen, xAI, and DeepSeek models.

If you are...Fastest pathBest next step
Building with API keysUse starter credits or fund with crypto, create a key, then send a normal bearer-auth request.Fund with crypto and then open API Keys.
Running an agent clientUse the MPP challenge flow instead of pre-funded balance.Start with the 402 Payment Required flow and the MPP testing guide.
Trying the API for the first timeUse the shell example below with auto or any live model.Send one request, then verify the result in Logs.
The fastest real path today is: sign in, claim starter credits, create an API key, send one request, and inspect the resolved model in dashboard logs.

The 3-Minute Quickstart

  1. Sign in and claim the automatic $0.50 starter credits in your workspace.
  2. If you need more balance, fund your workspace with crypto. The current live funding path is USDT on Polygon, verified by transaction hash.
  3. Create an API key in /dashboard/keys.
  4. Send a request to /api/v1/chat/completions using auto or a supported model like google/gemini-2.5-flash.
  5. Open /dashboard/logs to confirm the request, latency, cost, and fallback behavior.
1 2 3 4Use the $0.50 starter credits Fund with crypto if needed Create API key Call /api/v1/chat/completions Inspect Logs + Usage in dashboard
1 2 3 4 5Send unauthenticated request Receive 402 Payment Required Settle challenge with MPP Continue request with payment receipt
Need the live model list or the current billing path? See Models and Payments.

EshuRouter-specific headers like HTTP-Referer and X-Title are optional. If you send them, they help with attribution and make dashboard analytics easier to read.

Funding with Crypto

EshuRouter supports two payment paths today: pre-funded workspace balance for developer accounts, and MPP direct payments for agent clients. If you are using API keys, the simplest path is to fund credits first and then send standard bearer-authenticated requests.

New workspaces receive $0.50 in starter credits. Chat web search also adds a $0.005 fixed fee per search request.
Card payments are not required. The current live funding flow uses USDT on Polygon, with broader crypto support planned next.
  1. Open /dashboard/credits after signing in.
  2. Copy the recipient wallet shown on the page.
  3. Send USDT on the Polygon network only for the current live flow.
  4. Wait for confirmations, then paste the txHash into Verify Deposit.
  5. After on-chain verification succeeds, your credits balance updates automatically based on the net amount after the funding fee.
1 2 3 4 5 6Network: Polygon Asset: USDT Minimum: $5 Proof: transaction hash (0x...) Funding fee: 5% Result: net credits added to your EshuRouter balance

For AI agents and machine-to-machine traffic, EshuRouter also supports MPP payment challenges. In that path, the client does not need a pre-funded dashboard balance and can settle directly after receiving a 402 Payment Required challenge.

Live Models

The current catalog is intentionally small and production-focused. These are the live models you can route through the crypto-funded gateway today.

ProviderLive modelsNotes
EshuRouterautoVirtual routing model that selects the best live candidate for cost, latency, and reliability.
Anthropicanthropic/claude-opus-4, anthropic/claude-sonnet-4-5, anthropic/claude-haiku-3-5Full Claude lineup with vision and tool calling support.
OpenAIopenai/o3-miniReasoning-focused default path for many API examples.
Googlegoogle/gemini-2.5-flash, google/gemini-2.5-proLarge context and strong multimodal support.
Metameta-llama/llama-3.3-70b-instruct, meta-llama/llama-3.1-8b-instructOpen-source Llama models for low-cost chat and strong general-purpose fallback coverage.
Qwenqwen/qwen-2.5-72b-instruct, qwen/qwen-2.5-7b-instruct, qwen/qwq-32bOpen Qwen lineup spanning multilingual chat, low-cost throughput, and reasoning-heavy tasks.
DeepSeekdeepseek/deepseek-r1, deepseek/deepseek-v3Low-cost reasoning and coding paths now enabled end-to-end.
xAIxai/grok-3Available through the same OpenAI-compatible interface.

Auto Routing

Use model: "auto" when you want EshuRouter to choose the best live model for the job instead of locking to a single provider ahead of time. This is the transparent version of smart routing: you ask for auto, and EshuRouter returns the resolved model in the response headers.

InputWhat EshuRouter does
model: "auto"Selects the highest ranked live model using cost, latency, and reliability data.
x-routing-strategy: cheapestBiases selection toward the lowest-cost healthy model.
x-routing-strategy: fastestBiases selection toward the lowest-latency healthy model.
x-routing-strategy: most_reliableBiases selection toward the model with the strongest recent success rate.
When you call auto, inspect the x-eshu-resolved-model response header to see which live model actually served the request.

Chat Workspace

The hosted chat UI at /chat is not just a demo. It is the fastest place to test models, compare outputs, and understand costs before wiring EshuRouter into your own app or agent.

FeatureCurrent behavior
Streaming responsesAssistant output streams into the conversation in real time.
Web searchOptional per-message toggle in chat. Each search request adds a $0.005 surcharge.
Image attachmentsYou can upload image attachments in chat. They are sent as multimodal request content.
Voice inputThe composer supports browser speech-to-text input for drafting prompts.
Conversation historyConversations, attachment flags, and source flags are stored and shown in the chat sidebar.

Dashboard

The dashboard is where you manage crypto funding, API keys, routing visibility, and usage controls. If you are integrating the API for real, this becomes your operational control plane.

AreaWhat it does
FundingShows starter bonus, current balance, deposit verification, and funding history.
API KeysCreate and revoke bearer keys for server-side usage.
LogsInspect requests, latency, model served, and usage outcomes after each call.
GuardrailsConfigure allowlists, provider restrictions, rate limits, and spend caps.

Using the EshuRouter API directly

EshuRouter exposes an OpenAI-compatible endpoint at https://eshu-five.vercel.app/api/v1/chat/completions. If you self-host later, replace that domain and keep the same request shape.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18import requests import json response = requests.post( url="https://eshu-five.vercel.app/api/v1/chat/completions", headers={ "Authorization": "Bearer <ESHU_API_KEY>", "HTTP-Referer": "<YOUR_SITE_URL>", "X-Title": "<YOUR_SITE_NAME>", "Content-Type": "application/json", }, data=json.dumps({ "model": "auto", "messages": [ { "role": "user", "content": "Reply with READY only." } ] }) )
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21const response = await fetch('https://eshu-five.vercel.app/api/v1/chat/completions', { method: 'POST', headers: { 'Authorization': 'Bearer <ESHU_API_KEY>', 'x-routing-strategy': 'cheapest', 'HTTP-Referer': '<YOUR_SITE_URL>', 'X-Title': '<YOUR_SITE_NAME>', 'Content-Type': 'application/json', }, body: JSON.stringify({ model: 'auto', messages: [ { role: 'user', content: 'Reply with READY only.', }, ], }), }); const data = await response.json(); console.log(data.choices[0].message.content);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16curl https://eshu-five.vercel.app/api/v1/chat/completions \ -H "Authorization: Bearer <ESHU_API_KEY>" \ -H "x-routing-strategy: cheapest" \ -H "HTTP-Referer: <YOUR_SITE_URL>" \ -H "X-Title: <YOUR_SITE_NAME>" \ -H "Content-Type: application/json" \ -d '{ "model": "auto", "messages": [ { "role": "user", "content": "Reply with READY only." } ] }'
If your preferred model is temporarily unavailable, EshuRouter can fall back to a configured backup on the balance-billed path. Check /dashboard/logs to see requested vs served model and how the route resolved.

Using the OpenAI SDK

If your app already uses the official OpenAI SDK, the easiest migration path is to keep the SDK and only swap baseURL plus the model ID.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25import OpenAI from 'openai'; const openai = new OpenAI({ baseURL: 'https://eshu-five.vercel.app/api/v1', apiKey: '<ESHU_API_KEY>', defaultHeaders: { 'HTTP-Referer': '<YOUR_SITE_URL>', 'X-Title': '<YOUR_SITE_NAME>', }, }); async function main() { const completion = await openai.chat.completions.create({ model: 'xai/grok-3', messages: [ { role: 'user', content: 'Reply with a short deployment checklist.', }, ], }); console.log(completion.choices[0].message); } main();
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22from openai import OpenAI client = OpenAI( base_url="https://eshu-five.vercel.app/api/v1", api_key="<ESHU_API_KEY>", default_headers={ "HTTP-Referer": "<YOUR_SITE_URL>", "X-Title": "<YOUR_SITE_NAME>", } ) completion = client.chat.completions.create( model="xai/grok-3", messages=[ { "role": "user", "content": "Reply with a short deployment checklist." } ] ) print(completion.choices[0].message.content)

Guardrails Error Codes

When a request is blocked by workspace guardrails, the API returns type: "guardrail_violation" with a machine-readable code, plus suggested_action and help_url.

CodeMeaningTypical Fix
model_not_allowedRequested model is not in your allowlist.Add the model to allowlist or remove model restriction.
provider_not_allowedRequested provider is blocked by provider restrictions.Enable the provider in Guardrails settings.
per_request_cost_limit_exceededEstimated request cost exceeds per-request cap.Raise cap, choose cheaper model, or lower max_tokens.
daily_budget_exceededDaily spend would exceed configured daily budget.Increase daily budget or wait until next day window.
monthly_budget_exceededMonthly spend would exceed configured monthly budget.Increase monthly budget or wait until next month window.
requests_per_minute_exceededRequest count in the current minute has reached limit.Reduce burst traffic or raise RPM limit.
requests_per_day_exceededRequest count for today has reached limit.Raise requests/day limit.
tokens_per_minute_exceededEstimated token usage in current minute exceeds limit.Raise TPM limit, shorten prompts, or lower output size.
1 2 3 4 5 6 7 8 9 10 11{ "error": { "type": "guardrail_violation", "code": "tokens_per_minute_exceeded", "message": "Guardrail exceeded: tokens per minute limit (100000).", "suggested_action": "Increase tokens per minute limit, lower max_tokens, or shorten prompts.", "help_url": "/docs#guardrails", "details": { "used": 92340, "estimated_request_tokens": 12000, "limit": 100000 } } }