HERO RUN
Agent gateway

Mint an API key.

Deposit $HERO once and get a key with prepaid credits. Your agent runs 338+ models through one gateway with the key, no private key, no gas per call. Each run debits credits at the model's $HERO price.

Deposit $HERO → get a key
Same price per run, prepaid.
Credits are 1:1 with your deposit and debit at each model's live $HERO price, no markup or discount. A key is one deposit instead of a transaction and gas on every call. Best when an agent runs often.
Network · pay $HERO on
Credits = the $HERO you deposit.Connect a wallet (top right).
Need $HERO? Buy on Uniswap ↗
Official SDK — npm install hero-run-ai

Zero-dependency JS/TS client: chat, streaming, image/video/audio generation, a Vercel AI SDK provider, and a drop-in <HeroRunChat/> React widget — paid from your key.

npm install hero-run-ai

import { createHeroRun } from "hero-run-ai";
const hero = createHeroRun({ apiKey: "hr_live_..." });
const { text } = await hero.chat([{ role: "user", content: "hi" }]);

Docs on the npm page · full API reference in /docs.

Use it with any OpenAI SDK

Hero Run speaks the OpenAI API. Point any OpenAI SDK or agent framework at our base URL, use model auto for the multi-gateway router, and it pays from your key.

from openai import OpenAI
client = OpenAI(base_url="https://hero-run.vercel.app/v1", api_key="hr_live_...")
r = client.chat.completions.create(
    model="auto",  # multi-gateway router: right-sized model, one flat price
    messages=[{"role": "user", "content": "hello"}],
)
print(r.choices[0].message.content)

Base URL https://hero-run.vercel.app/v1 · works with the OpenAI SDK, Vercel AI SDK, LangChain, CrewAI, and more. Streaming supported.

Set it up in your agent (one paste)

Paste this into Claude Code, Codex, opencode, Cursor, or any coding agent with a terminal, and it installs the Hero Run MCP server for you.

Set up the Hero Run MCP server for me. Download https://hero-run.vercel.app/hero-run-mcp.mjs, run `npm install viem` next to it, then ask me for my Hero Run API key (I can mint one at https://hero-run.vercel.app/keys). Register it as a stdio MCP server named "hero-run" that runs `node <abs path>/hero-run-mcp.mjs` with env HERO_RUN_KEY=<key>, using whatever method my agent uses: for Claude Code run `claude mcp add hero-run -e HERO_RUN_KEY=<key> -- node <abs path>/hero-run-mcp.mjs`; for opencode, merge this into ~/.config/opencode/opencode.json (create it if missing): {"mcp":{"hero-run":{"type":"local","command":["node","<abs path>/hero-run-mcp.mjs"],"enabled":true,"environment":{"HERO_RUN_KEY":"<key>"}}}}; for Codex, Cursor, or others add the equivalent stdio server entry to my MCP config. Then list the hero-run tools to confirm it works. Reference: https://hero-run.vercel.app/llms.txt

Machine-readable setup: /llms.txt · server: /hero-run-mcp.mjs

Run your own Telegram bot

Run 375+ models from a Telegram chat, paid from your own $HERO key. Your token and key stay on your machine, and you pay only for your own usage.

  1. Create a bot with @BotFather and copy its token.
  2. Mint a HERO_RUN_KEY above (your prepaid $HERO credits).
  3. Deploy the bot (Docker shown; Fly.io and Railway also work):
docker build -f examples/telegram-bot/Dockerfile -t hero-run-bot . && docker run -d --restart=always -e TELEGRAM_BOT_TOKEN=<your-botfather-token> -e HERO_RUN_KEY=<your hr_live key> --name hero-run-bot hero-run-bot

Commands: /models, /ask, /image, /treasury, /balance. Full guide and one-command Fly/Railway deploy in the telegram-bot example.

Check or top up a key
Add credits to this key
Connect a wallet to top up.

Same 1:1 credits as minting — the deposit lands on the key you pasted above.