Skip to content
LibreChat logo

LibreChat via Tokonomix

Add Tokonomix as a custom endpoint in librechat.yaml — give your self-hosted chat UI 130+ models and a consensus option on one key.

Custom endpoint (OpenAI-compatible)Self-hosted chat platformMIT · open sourceDocker · self-hosted
LibreChat — open-source multi-model chat UI, via Tokonomix

What is LibreChat?

LibreChat is an open-source, self-hostable chat platform — a ChatGPT-style UI that talks to many providers at once. Through its librechat.yaml custom-endpoints feature it can add any OpenAI-compatible API as a selectable endpoint for your whole team.

  • A polished multi-user chat UI you host yourself (Docker).
  • Adds OpenAI-compatible APIs as custom endpoints in librechat.yaml.
  • Each endpoint can expose a curated model list or fetch it from the API.
  • Per-user keys (user_provided) or a shared server key via an env reference.

Why add Tokonomix as an endpoint?

One Tokonomix endpoint gives every LibreChat user 130+ models — and a tokonomix-consensus entry for the answers your team can’t afford to get wrong — without standing up a separate provider per family.

  • Expose tokonomix-consensus and direct slugs side by side in the model selector.
  • Centralise billing on one key with per-call spend caps.
  • Route by hosting_region / origin_country for compliance across the whole team.
  • Swap or extend the model list by editing one YAML block — no redeploy of providers.

Connect Tokonomix in librechat.yaml

Add a custom endpoint under endpoints.custom with the Tokonomix baseURL, an apiKey env reference, and the models you want listed.

endpoints:
  custom:
    - name: "Tokonomix"
      apiKey: "${TOKONOMIX_API_KEY}"
      baseURL: "https://tokonomix.ai/api/v1"
      models:
        default:
          - "tokonomix-consensus"
          - "anthropic/claude-sonnet-4-6"
        fetch: true
      titleConvo: true
Per-user keys

Set apiKey: "user_provided" instead of an env reference to let each user paste their own Tokonomix key in the UI — useful for billing usage back to individuals.

Verify it works

  • Add the block to librechat.yaml and restart LibreChat (or its Docker stack).
  • Pick the Tokonomix endpoint and a model in the selector, then send a message.
  • Confirm the call and token usage appear in your Tokonomix dashboard.

Model selection

Which model and endpoint should my agent use?

Pick by what your agent does, then swap the model id any time — every model in the catalog works through the same key.

What your agent doesUse this
Edits files / calls tools and streams responses (most coding agents)An Anthropic model via the Anthropic endpoint (tools + streaming both work)
Calls tools but does not need streaming (any model)The OpenAI-compatible endpoint with a single model id
Wants tools and streaming on a non-Anthropic modelRun non-streaming for now — streaming tool-calls on other providers is not enabled yet
Plain chat, no toolsEither endpoint; streaming is fine
Wants a cross-model verdict (consensus) on a high-stakes answerSet model to tokonomix-consensus on the OpenAI-compatible endpoint — note: consensus rejects tool requests (no tool-calling)
Endpoint & API reference (technical)

anthropic-messages → https://tokonomix.ai/api/anthropic — tools ✓, streaming ✓ (use an Anthropic model). openai-completions → https://tokonomix.ai/api/v1 — tools ✓ (single-model passthrough), streaming with tools not yet enabled. Plain chat: streaming works on both. Consensus: openai-completions, model tokonomix-consensus, no tools. Swap the model id to any slug returned by GET /api/v1/models.

Browse all models →

Related agents