Skip to content
Mods logo (Charm)

Mods via Tokonomix

Add a Tokonomix api to Mods’ config — pipe shell output through 130+ models and a consensus alias, all on one key.

apis: base-url + api-key-env (mods.yml)Shell-pipe CLIMIT · open sourcemacOS · Windows · Linux
Mods — Charm CLI that pipes shell output through an LLM, via Tokonomix

What is Mods?

Mods is a Charm CLI that pipes shell output through an LLM — mods "explain this" < file.go. It works with any OpenAI-compatible endpoint, so one Tokonomix entry aliases and routes 130+ models from a single key.

  • Reads from stdin and pipes it through a model, ideal for one-shot shell tasks.
  • Custom endpoints go in an apis: block (base-url, api-key-env, models).
  • Per-model aliases and max-input-chars let you tune each entry.
  • Open source; configured via mods --settings.

Why route Mods through Tokonomix?

  • One apis: entry, 130+ models — alias tokonomix-consensus to consensus for the hard ones.
  • The consensus alias sanity-checks a generated command before you run it; a fast slug for routine piping.
  • Per-call spend caps bound usage; region / origin routing for sensitive output.
  • Reference the key from an environment variable, not the config file.

Connect Tokonomix in mods.yml

Add a Tokonomix entry under apis: with the base-url, an api-key-env reference and a models map (an alias makes it quick to select).

# mods --settings  ->  apis: section
apis:
  tokonomix:
    base-url: https://tokonomix.ai/api/v1
    api-key-env: TOKONOMIX_API_KEY
    models:
      tokonomix-consensus:
        aliases: ["consensus"]
        max-input-chars: 392000

# export TOKONOMIX_API_KEY=tok_live_your-key
# mods -m consensus "explain this" < file.go

Verify it works

  • Export TOKONOMIX_API_KEY, save the apis: block via mods --settings.
  • Pipe a file through the consensus alias: mods -m consensus "explain this" < file.go.
  • Confirm the call and token usage 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