Skip to content
Allay

WikiAllay Server

Who pays for the model

Every answer costs money at the model's provider. A Minecraft server picks who pays with provider.mode in the plugin's config. A backend you run yourself changes the picture: see the last section.

#Your own key (BYOK)

The plugin sends a key for OpenRouter or any OpenAI-compatible API in X-Provider-Key, plus the base URL, the model, and a search model. On a hosted backend it also sends a license as the server's identity: free, made by the plugin itself on its first question, and paying for nothing.

  • The backend uses the key for that one run. It never stores or logs it.
  • The model must call tools. Before a run the backend checks the key and the model, and answers with a clear code (PROVIDER_AUTH_FAILED, MODEL_NOT_FOUND, MODEL_NO_TOOLS) that the plugin explains to operators.
  • Without a search model, the run has no web search.

On a backend with billing on, BYOK is free but limited per license: 20 questions a minute, 2000 a day, and 4 at once, and all such servers together take at most 100 questions at once. A blocked license can't ask with its own key either. Its base URL must be https:// and public, and every request to it is checked again and may not redirect, so nobody reaches the backend's own network through it.

The old X-OpenRouter-Token header still works, as BYOK on OpenRouter with the backend's models.

#A subscription

The server runs on the backend's own key and models, which the plugin can't change.

  1. An operator runs /allay link.
  2. The backend makes a license, which the plugin keeps in license.key, and a one-time link to the backend's Telegram bot.
  3. In the bot, the admin pays in Telegram Stars.
Plan Stars Period Limit
Week 150 7 days $0.75 of model costs
Month 500 30 days, renews by itself $3.00
Year 10 000 365 days $6.00 a month, refilled every 30 days

The limit counts what the server's questions really cost: the model, web search, and session summaries. A payment while a period runs adds its limit at once and moves the end date. The plugin shows operators the limit as a percentage, never in dollars. There's no free trial: a server pays before its first hosted question.

#A self-hosted backend

Set SELFHOSTED=1 and PLUGIN_TOKEN, and billing is off:

  • The backend serves every plugin that sends the token on its own key. Nobody needs a license or /allay link.
  • BYOK still works, without limits.
  • The backend takes the plugin's provider.model without a key, so a server can give each player tier its own model on the backend's key.

Without the variable, billing is on. A server that runs its own backend should set it.

Next: What Allay can do