OpenRouter and other routers

Using OpenRouter to reach Claude, Gemini, GPT or an open model with one key: the settings, picking a model with tool calling, what the server sends to a router, and cost and privacy notes.

Desktop appAndroid appServer

OpenRouter is one key and one endpoint in front of many providers. It is the way to run a Claude or Gemini model as the Dungeon Master, since the app has no native Anthropic or Google backend, and the cheapest way to try several models on one campaign.

Settings

  1. Create a key at .ai and add credit.
  2. Pick a model on openrouter.ai/models whose card lists tools among its supported parameters. Copy its id, for example anthropic/claude-sonnet-4.5 or google/gemini-3.5-flash.
  3. Enter it as an backend:
FieldValue
ProviderCustom backend
https://openrouter.ai/api/v1
ModelThe model id from the model page
Your OpenRouter key

On a self-hosted server that is Admin, Server settings, , or OPENAI_COMPAT_* in .env.server; a campaign's can hold its own. On a world hosted from the desktop or Android app, the same fields are in the world's (account menu, Admin), since the Story AI screen's key door is OpenAI-specific. The server also reads OPENROUTER_API_KEY and OPENROUTER_MODEL as a dedicated route with a sensible default model. The OpenRouter key is sent only to OpenRouter's own host, over .

What the server sends to a router

is recognised by host. The server sends the sampling parameters it accepts, requests thinking on tool-decision calls through the chat template hint, and caps output with max_tokens. The is the 16K stand-in unless you set OPENAI_COMPAT_CONTEXT to the model's real size, which you should: a Claude or Gemini model has far more room than that.

Choosing a model

  • is the hard requirement. A model that lists tools but calls them rarely under a long prompt still narrates past its dice; run Test backend and try a or two.
  • Speed matters more than at a chat box: a turn makes two or three calls. Flash and mini class models keep turns under a minute.
  • Length: set the context override to the model's window so the story is not compacted early.
  • Use a cheap model as the and a strong one for the story.

Cost and privacy

You pay 's per-token price for the model chosen; the dashboard shows usage per key. The prompt (story, sheets, scene, arc) goes to OpenRouter and on to the model's provider. Pictures are not routed: pair the router with , an OpenAI image key, or no pictures.

Checked against desktop and Android app 0.17.2 and server 0.26.2 on 2026-10-11. Something wrong or missing? Open an issue.

Download · v0.17.2
Server app · v0.26.2

Optional. Runs the table for a whole group on one machine that stays on. Everyone else just installs the app.

Free & open source · MIT licensed · served from GitHub releases