Use your own model
Run Hermes on Pusk with your own OpenRouter key: a forkable kit with an LLM proxy you host, a revocable token per instance, per-instance spend caps, and real per-instance cost tracking.
Every instance boots with a managed model: zero setup, and Pusk meters the spend from your wallet against each instance's budget. When you'd rather own the model layer (your OPENROUTER_API_KEY, your choice of models, your own per-user metering and limits), the hermes-byo-model kit is the supported path. It's a complete forkable app in which every Hermes turn runs on your OpenRouter account, through a proxy hosted in your own app.
pusk-platform/hermes-byo-model
The full app, ready to fork: auth, workspaces, chat, files, a per-agent model budget with real spend, and the money proxy that enforces it. Next.js and Supabase, deploys to Vercel. MIT.
Managed model or your own?
| Managed (default) | Your own (this kit) | |
|---|---|---|
| Setup | None, built into every instance | Fork the kit, add your OPENROUTER_API_KEY |
| Model choice | Pusk's managed catalog | Anything your OpenRouter key can reach, 300+ models |
| Turn path | Instance → Pusk's starter credentials | Instance → an LLM proxy in your app → OpenRouter |
| Spend | Billed from your wallet, capped by the instance budget | Billed by OpenRouter to you; free on Pusk's side apart from compute |
| Limits | The instance budget returns 402 mid-chat | Your proxy decides; the kit caps each agent per month |
| Cost data | Usage endpoint, per instance | Your own table: per agent, per model, per day |
Compute is billed the same either way: an instance is a computer, whoever's model it calls.
How it works
agent instance (Hermes on Pusk Cloud)
└─ ~/.hermes/config.yaml → custom provider: https://your-app.com/api/llm/v1
api_key: orp_… (a per-agent token, worthless anywhere else)
└─ your app: token → agent → month-to-date spend vs that agent's cap
402 when the agent is over budget; the agent says so in chat
forward to OpenRouter with your key, usage accounting on
read the real cost off the reply (SSE included) → Postgres
└─ OpenRouter → Claude / GPT / Kimi / Gemini / …
- Your key stays home. The instance holds only a revocable per-agent token; the OpenRouter key lives in your app's environment and never reaches an instance or the browser. Rotating a token is a button in the kit's Settings tab.
- Per-agent budgets, enforced before the call. Each agent carries a monthly cap. The proxy checks month-to-date spend first and refuses with
402when it's reached, and the agent surfaces that as a plain message in chat rather than failing silently. - Real cost, not estimates. The proxy asks OpenRouter to include usage accounting and records the dollars it reports, per agent, per model, per day. That table is what you'd invoice your own users from.
- The clean base image. The kit registers a workspace template on Pusk's
hermes-baseimage, which boots with no model provider at all, so the config the app writes is the only one the agent has. The stockpusk-hermestemplate re-wires the managed model at every boot, which would leave a second, Pusk-billed model sitting in the picker.
Note
Nothing here is OpenRouter-specific on the Pusk side. Hermes needs an OpenAI-compatible endpoint serving GET /v1/models and POST /v1/chat/completions, so you can point the kit's proxy at any provider, or at your own inference, by changing one constant. OpenRouter is the default because one key reaches every major model.
Get started
Get your keys
Three secrets, each behind a login: an
sk_live_API key from a funded workspace (see Billing), anOPENROUTER_API_KEYfrom openrouter.ai/settings/keys with credit on it, and a Supabase access token; the kit provisions a free Supabase project for you.Clone it
git clone https://github.com/pusk-platform/hermes-byo-model cd hermes-byo-modelRun setup
The fastest path is agent-driven: open the folder in Claude Code or Codex and paste the setup prompt from the README. It asks for your three keys, provisions Supabase, and registers the agent template in your workspace.
By hand:
npm install, thennpm run setuptwice. The first run creates.env.localand exits asking for the keys; paste them in and run it again, then runnpm run templates:publish.Run it
npm run devOpen
http://localhost:3000, sign up, and create an agent. Agents run on Pusk Cloud and call your app for every turn, so the app needs a public URL:npm run devopens a free cloudflared quick tunnel automatically (it needs thecloudflaredbinary,brew install cloudflared, but no Cloudflare account), and in production it's just your deployed URL. Creating an agent without one is refused, rather than producing an agent with no way to think.
The first turn takes a minute: a new agent is configured over exec and restarted before it answers. After that, the agent's Settings tab shows what each conversation cost you within seconds of the reply.
What you get
The kit is the Pusk white-label dashboard with the model layer swapped: the same multi-tenant app (email sign-in, workspaces, instance management, native Chat and Files tabs) plus a per-agent model budget, live spend on your OpenRouter account, and a token you can rotate. The chat model picker lists every model your key can reach; a one-line allow-list in src/config/models.ts narrows that to the models you approve, enforced in the proxy rather than trusted in the UI. Fork it, rebrand it (src/config/branding.ts), and ship it.
Note
Happy with the managed model and just want the app? Use the white-label dashboard: same experience on Pusk's built-in credentials, one key fewer. Want your own integrations instead of your own model? That's Use your own Composio.