Skip to content

Integrations

Connect your AI coding agent

Tokonomix exposes an OpenAI-compatible endpoint and an MCP server so every major coding agent connects with a one-line config change. Route single-model calls for speed — or set model: "tokonomix-consensus" on high-stakes calls to get a cross-family verdict before your code lands.

OpenAI base URLhttps://tokonomix.ai/api/v1
Anthropic base URLhttps://tokonomix.ai/api/anthropic
MCPnpx tokonomix-mcp

Why Tokonomix

Routing is table stakes. Consensus is the differentiator.

Any router can forward a prompt to a model. Tokonomix adds a cross-family council: three proposer models from different families each answer independently, then a judge synthesises and flags disagreements. Blind-spot detection catches what any single model misses. Use it on architecture decisions, security reviews, or anywhere one wrong answer is expensive.

model: "tokonomix-consensus"— set this once per call to activate the full council

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 →
Connection method:OpenAI base URLAnthropic base URLMCP serverLimited support

Anthropic's official CLI coding agent for the terminal.

ANTHROPIC_BASE_URL + MCP
# Option A — Anthropic wire-format passthrough
export ANTHROPIC_BASE_URL=https://tokonomix.ai/api/anthropic
export ANTHROPIC_API_KEY=tok-your-key
claude

# Option B — add the MCP server for consensus tools
claude mcp add tokonomix -- npx -y tokonomix-mcp \
  --api-key tok-your-key

Consensus tip

MCP tools include tokonomix_consensus_ask — call it on any high-stakes refactor or design decision for a cross-family verdict.

Terminal pair-programmer that edits files and commits for you.

OPENAI_API_BASE + --model
export OPENAI_API_BASE=https://tokonomix.ai/api/v1
export OPENAI_API_KEY=tok-your-key

# Route any call through consensus
aider --model openai/tokonomix-consensus

# Or target a specific model
aider --model openai/anthropic/claude-sonnet-4-6

Consensus tip

Set --model openai/tokonomix-consensus for architecture discussions; use a single model for high-volume line edits.

Cline

VS Code extensionTool calling supported

Autonomous VS Code agent — reads, edits, runs terminals.

OpenAI Compatible provider
# Cline → Settings (gear icon) → API Provider: "OpenAI Compatible"
Base URL : https://tokonomix.ai/api/v1
API Key  : tok-your-key
Model ID : anthropic/claude-sonnet-4-6
# Opt-in: consensus for planning/review (no tool-calling)
# Model ID : tokonomix-consensus
# or any slug from GET /api/v1/models

Consensus tip

Set modelId to tokonomix-consensus for Cline's "Architect" mode tasks; switch to a direct model slug for fast inline edits.

Roo Code

VS Code extensionTool calling supported

Autonomous fork of Cline with extra workflow modes (Architect, Debug, Ask).

OpenAI Compatible provider
// Roo Code Settings → API Provider: "OpenAI Compatible"
Base URL : https://tokonomix.ai/api/v1
API Key  : tok-your-key
Model ID : anthropic/claude-sonnet-4-6
// Opt-in: consensus for planning/review (no tool-calling)
// Model ID : tokonomix-consensus

Consensus tip

Use a direct model slug for Roo's tool-calling modes (Code, Debug); switch to tokonomix-consensus as an opt-in for Architect planning tasks where no tool calls are made.

Continue.dev

IDE extension

VS Code / JetBrains coding assistant with chat, autocomplete and context.

openai provider + apiBase
# ~/.continue/config.yaml
models:
  - name: Tokonomix Consensus
    provider: openai
    model: tokonomix-consensus
    apiBase: https://tokonomix.ai/api/v1
    apiKey: tok-your-key

  - name: Tokonomix (Claude direct)
    provider: openai
    model: anthropic/claude-sonnet-4-6
    apiBase: https://tokonomix.ai/api/v1
    apiKey: tok-your-key

Consensus tip

Add both entries — use consensus in Continue's chat for critical reviews, the direct model for autocomplete (lower latency).

AI-native fork of VS Code with Composer agent and inline edits.

OpenAI base URL override (Chat only)
// Cursor Settings → Models → Override OpenAI Base URL
Base URL : https://tokonomix.ai/api/v1
API Key  : tok-your-key
Model    : tokonomix-consensus

// Note: base-URL override applies to Cursor Chat (Cmd+L) only.
// Composer / inline-edit / autocomplete use Cursor's own backend.

Consensus tip

Cursor Chat with model=tokonomix-consensus gives you consensus for design conversations; Composer continues to use Cursor's own routing.

Goose (Block)

CLI + DesktopTool calling supported

Block's open-source autonomous agent — installs, runs, tests.

OPENAI_HOST env + config.yaml
# host + key via environment (NOT config.yaml)
export OPENAI_HOST=https://tokonomix.ai/api/v1
export OPENAI_API_KEY=tok-your-key

# ~/.config/goose/config.yaml
GOOSE_PROVIDER: openai
GOOSE_MODEL: anthropic/claude-sonnet-4-6
# Opt-in: consensus for planning/review (no tool-calling)
# GOOSE_MODEL: tokonomix-consensus

Consensus tip

Goose runs long autonomous sessions with tool calls — set the default model to a direct slug. Use tokonomix-consensus as an opt-in for planning-only steps where no tool calls are made.

OpenHands

Web UI + CLITool calling supported

Open-source software dev agent (formerly OpenDevin) — autonomous PR author.

LLM_BASE_URL + LLM_MODEL env
# docker run / .env
LLM_BASE_URL=https://tokonomix.ai/api/v1
LLM_API_KEY=tok-your-key
LLM_MODEL=openai/anthropic/claude-sonnet-4-6
# Opt-in: consensus for planning/review (no tool-calling)
# LLM_MODEL=openai/tokonomix-consensus

# Or via UI: Settings → LLM → Advanced Settings
# Base URL : https://tokonomix.ai/api/v1
# Model    : openai/anthropic/claude-sonnet-4-6

Consensus tip

OpenHands drives full feature branches with tool calls — set the default model to a direct slug. Use tokonomix-consensus as an opt-in for planning/architecture steps only (no tool calls).

Zed

IDE

Fast Rust-based editor with native AI panel and multi-buffer agent.

language_models.openai_compatible
// ~/.config/zed/settings.json
{
  "language_models": {
    "openai_compatible": {
      "api_url": "https://tokonomix.ai/api/v1",
      "available_models": [
        {
          "name": "tokonomix-consensus",
          "display_name": "Tokonomix Consensus",
          "max_tokens": 128000
        }
      ]
    }
  }
}

Consensus tip

Use tokonomix-consensus in Zed's AI panel for multi-file architecture questions; switch to a direct model for completions.

Kilo Code

VS Code extension

VS Code agent focused on full-task completion with context management.

Custom provider (base URL + API key)
// Kilo Code Settings → Providers → + Custom Provider
Provider ID  : tokonomix
Display Name : Tokonomix
Base URL     : https://tokonomix.ai/api/v1
API Key      : tok-your-key
Model        : tokonomix-consensus

Consensus tip

Kilo auto-fetches the model list from the endpoint — pick tokonomix-consensus for Kilo's planning passes.

Codeium's AI-native IDE with Cascade flow agent.

MCP server (Cascade supports MCP)
// Windsurf MCP config (via Extension settings or mcp.json)
{
  "mcpServers": {
    "tokonomix": {
      "command": "npx",
      "args": ["-y", "tokonomix-mcp"],
      "env": {
        "TOKONOMIX_API_KEY": "tok-your-key"
      }
    }
  }
}

Consensus tip

Windsurf's base-URL override is limited to BYOK Anthropic only; use the MCP server instead to get consensus tools inside Cascade.

OpenClaw

CLI + VS Code

Privacy-first open-source agent with guarded network fetch paths.

models.providers (openclaw.json)
// openclaw.json
{
  "agents": { "defaults": { "model": { "primary": "tokonomix/tokonomix-consensus" } } },
  "models": {
    "providers": {
      "tokonomix": {
        "baseUrl": "https://tokonomix.ai/api/v1",
        "apiKey": "${TOKONOMIX_API_KEY}",
        "api": "openai-completions",
        "models": [{ "id": "tokonomix-consensus", "name": "Tokonomix Consensus" }]
      }
    }
  }
}

Consensus tip

OpenClaw's trust model matches Tokonomix's philosophy: you own the network path; set tokonomix-consensus as your default for any planning task.

Proxy layer that routes Claude Code requests to any backend by cost / capability.

provider block in config.json
// ~/.claude-code-router/config.json
{
  "Providers": [
    {
      "name": "tokonomix",
      "api_base_url": "https://tokonomix.ai/api/v1/chat/completions",
      "api_key": "tok-your-key",
      "models": ["tokonomix-consensus", "anthropic/claude-sonnet-4-6"]
    }
  ],
  "Router": {
    "default": "tokonomix,tokonomix-consensus"
  }
}

Consensus tip

claude-code-router can map specific Claude model IDs to tokonomix-consensus for high-complexity calls and a cheaper direct model for boilerplate.

Void

IDE

Open-source VS Code fork — direct-to-provider, zero relay architecture.

OpenAI compatible provider
// Void Settings → AI → Provider → OpenAI Compatible
API Base URL : https://tokonomix.ai/api/v1
API Key      : tok-your-key
Model        : tokonomix-consensus

// Note: Void 2026 development is officially paused.
// Last release still works; configuration above applies.

Consensus tip

Void's zero-relay architecture means your Tokonomix key goes straight to the endpoint — no third-party logging between your prompt and the consensus engine.

Tabby

Self-hosted server

Self-hosted coding assistant with code completion and chat.

HTTP chat model (api_endpoint)
# config.toml (Tabby server)
[model.chat.http]
kind     = "openai/chat"
api_endpoint = "https://tokonomix.ai/api/v1"
api_key  = "tok-your-key"
model_name = "tokonomix-consensus"

Consensus tip

Tabby serves a whole team from one server — routing the chat model to tokonomix-consensus gives every developer on the instance a consensus-backed answer.

Alibaba's open-source AI code reviewer (CLI `ocr`) — diff-anchored findings.

OCR config (Anthropic base)
# Tool-call passthrough needs the Anthropic-compatible endpoint;
# the OpenAI-compat /api/v1 path is consensus-only and strips tool-calls.
ocr config set llm.url           https://tokonomix.ai/api/anthropic/v1/messages
ocr config set llm.auth_token    tok-your-key
ocr config set llm.model         anthropic/claude-sonnet-4-6
ocr config set llm.use_anthropic true

ocr review --from origin/main --to HEAD --format json

Consensus tip

For a multi-model review, the native tokonomix-consensus-review slug (in progress) returns diff-anchored findings as JSON through the consensus pipeline — no client-side tool-calling required.

Agentic coding CLI (Gemini-CLI fork) that speaks the OpenAI protocol.

modelProviders.openai (settings.json)
// ~/.qwen/settings.json
{
  "modelProviders": {
    "openai": [
      { "id": "tokonomix-consensus", "name": "Tokonomix Consensus",
        "baseUrl": "https://tokonomix.ai/api/v1", "envKey": "TOKONOMIX_API_KEY" }
    ]
  },
  "model": { "name": "tokonomix-consensus" }
}

Consensus tip

Set model.name to tokonomix-consensus for hard reasoning turns; switch to a fast slug for high-volume edits.

LibreChat

Chat UI

Self-hosted multi-model chat UI — adds any OpenAI-compatible API as an endpoint.

librechat.yaml custom endpoint
# librechat.yaml
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

Consensus tip

List tokonomix-consensus in the endpoint models so every user on the instance gets a consensus-backed answer from the selector.

Codex CLI

CLITool calling supported

OpenAI's open-source terminal coding agent — custom model providers in config.toml.

model_providers (config.toml)
# ~/.codex/config.toml
model = "anthropic/claude-sonnet-4-6"
model_provider = "tokonomix"
# Opt-in: consensus for planning/review (no tool-calling)
# model = "tokonomix-consensus"

[model_providers.tokonomix]
name = "Tokonomix"
base_url = "https://tokonomix.ai/api/v1"
env_key = "TOKONOMIX_API_KEY"
wire_api = "chat"

Consensus tip

Point model at tokonomix-consensus for risky refactors; reserved IDs (openai/ollama/lmstudio) cannot be reused, so name the provider tokonomix.

Open-source terminal coding agent (SST) — provider-agnostic via the AI SDK.

@ai-sdk/openai-compatible (opencode.json)
// opencode.json
{
  "provider": {
    "tokonomix": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Tokonomix",
      "options": {
        "baseURL": "https://tokonomix.ai/api/v1",
        "apiKey": "{env:TOKONOMIX_API_KEY}"
      },
      "models": { "tokonomix-consensus": { "name": "Tokonomix Consensus" } }
    }
  }
}

Consensus tip

Select tokonomix-consensus for the hard reasoning turns; a fast direct slug keeps high-volume edits cheap.

Charm's glamourous terminal coding agent — model-agnostic via crush.json.

openai-compat provider (crush.json)
// crush.json
{
  "providers": {
    "tokonomix": {
      "type": "openai-compat",
      "base_url": "https://tokonomix.ai/api/v1",
      "api_key": "$TOKONOMIX_API_KEY",
      "models": [
        { "id": "tokonomix-consensus", "name": "Tokonomix Consensus",
          "context_window": 200000, "default_max_tokens": 8192 }
      ]
    }
  }
}

Consensus tip

Use type openai-compat (not openai) for Tokonomix; point Crush at tokonomix-consensus for risky changes.

bolt.diy

Web app builder

Open-source in-browser AI app builder — OpenAILike provider via env.

OpenAILike provider (env)
# .env.local
OPENAI_LIKE_API_BASE_URL=https://tokonomix.ai/api/v1
OPENAI_LIKE_API_KEY=tok-your-key

# UI: Provider → OpenAILike, Model → tokonomix-consensus

Consensus tip

Pick tokonomix-consensus from the OpenAILike model list when scaffolding architecture; a fast slug keeps iterative edits cheap.

Open WebUI

Chat UI

Self-hosted ChatGPT-style interface — adds any OpenAI-compatible API as a connection.

OpenAI connection (Base URL)
# Environment (docker run / compose)
OPENAI_API_BASE_URL=https://tokonomix.ai/api/v1
OPENAI_API_KEY=tok-your-key

# Or UI: Admin → Settings → Connections → OpenAI API

Consensus tip

Expose tokonomix-consensus in the connection so every user on the instance gets a consensus-backed answer from the model picker.

AnythingLLM

Desktop + self-hosted

All-in-one AI app (RAG + agents) — Generic OpenAI provider points anywhere.

Generic OpenAI provider
# LLM Preference → Generic OpenAI (or env)
GENERIC_OPEN_AI_BASE_PATH=https://tokonomix.ai/api/v1
GENERIC_OPEN_AI_MODEL_PREF=tokonomix-consensus
GENERIC_OPEN_AI_API_KEY=tok-your-key
GENERIC_OPEN_AI_MODEL_TOKEN_LIMIT=200000

Consensus tip

Set the model to tokonomix-consensus for high-stakes answers over your indexed documents; a fast slug for routine RAG queries.

Hermes

OpenAI-compatible base URL

Connect Nous Research's self-improving, self-hosted agent to 132 models behind one key — and add cross-family consensus to every autonomous run.

OpenAI-compatible base URL
# See full guide at /integrations/hermes

Consensus tip

Open Interpreter

CLITool calling supported

Natural-language terminal agent that runs code

--api_base + --model (LiteLLM)
interpreter \
  --api_base "https://tokonomix.ai/api/v1" \
  --api_key "tok_live_your-key" \
  --model "openai/anthropic/claude-sonnet-4-6"
# Opt-in: consensus for planning/review (no tool-calling)
# --model "openai/tokonomix-consensus"

# or in Python:
from interpreter import interpreter
interpreter.llm.api_base = "https://tokonomix.ai/api/v1"
interpreter.llm.api_key = "tok_live_your-key"
interpreter.llm.model = "openai/anthropic/claude-sonnet-4-6"
interpreter.chat()

Consensus tip

Open Interpreter runs the model's code — use openai/tokonomix-consensus before anything irreversible, and a direct slug for routine commands.

gptme

CLITool calling supported

Terminal assistant that runs code and tools

config.toml [[providers]] or OPENAI_BASE_URL
# ~/.config/gptme/config.toml
[[providers]]
name = "tokonomix"
base_url = "https://tokonomix.ai/api/v1"
api_key = "tok_live_your-key"
default_model = "anthropic/claude-sonnet-4-6"
# Opt-in: consensus for planning/review (no tool-calling)
# default_model = "tokonomix-consensus"

# then: gptme --model tokonomix/anthropic/claude-sonnet-4-6 "..."

Consensus tip

Set tokonomix-consensus as the model before gptme acts on a risky step; switch to a fast direct slug for routine shell and file work.

CodeCompanion.nvim

Neovim pluginTool calling supported

Neovim AI chat and inline-edit plugin

extend("openai_compatible", { env })
require("codecompanion").setup({
  adapters = {
    http = {
      tokonomix = function()
        return require("codecompanion.adapters").extend("openai_compatible", {
          env = {
            url = "https://tokonomix.ai",
            api_key = "tok_live_your-key",
            chat_url = "/api/v1/chat/completions",
          },
          schema = { model = { default = "anthropic/claude-sonnet-4-6" } },
          -- Opt-in: consensus for planning/review (no tool-calling)
          -- schema = { model = { default = "tokonomix-consensus" } },
        })
      end,
    },
  },
})

Consensus tip

Use tokonomix-consensus as a safety-net before accepting an inline diff; a direct slug keeps everyday chat and edits fast.

Avante.nvim

Neovim pluginTool calling supported

Cursor-style AI coding plugin for Neovim

providers entry __inherited_from = "openai"
require("avante").setup({
  provider = "tokonomix",
  providers = {
    tokonomix = {
      __inherited_from = "openai",
      endpoint = "https://tokonomix.ai/api/v1",
      model = "anthropic/claude-sonnet-4-6",
      -- Opt-in: consensus for planning/review (no tool-calling)
      -- model = "tokonomix-consensus",
      api_key_name = "TOKONOMIX_API_KEY",
    },
  },
})
-- export TOKONOMIX_API_KEY=tok_live_your-key

Consensus tip

Point Avante at tokonomix-consensus to cross-check a risky agentic refactor before it is applied; use a direct slug for routine edits.

Mods

CLI

Charm CLI that pipes shell output through an LLM

mods.yml apis: base-url + api-key-env
# 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

Consensus tip

Alias tokonomix-consensus to sanity-check a generated command before you run it; a fast direct slug for routine piping.

Twinny

VS Code extension

VS Code code-completion and chat extension

Provider=openai + Hostname/API-Path + Key
// Twinny -> Manage Providers -> add provider:
// Provider type: openai
// Hostname:      tokonomix.ai
// Port:          443
// Protocol:      https
// API Path:      /api/v1/chat/completions
// API Key:       tok_live_your-key
// Model Name:    tokonomix-consensus

Consensus tip

Set the model to tokonomix-consensus for a cross-model check before you trust a chat suggestion; a direct slug for fast completion.

llm

CLITool calling supported

Simon Willison's command-line LLM client and library.

extra-openai-models.yaml
# ~/.config/io.datasette.llm/extra-openai-models.yaml
- model_id: anthropic/claude-sonnet-4-6
  model_name: anthropic/claude-sonnet-4-6
  api_base: "https://tokonomix.ai/api/v1"
  api_key_name: tokonomix
  supports_tools: true
# Opt-in: consensus for planning/review (no tool-calling)
- model_id: tokonomix-consensus
  model_name: tokonomix-consensus
  api_base: "https://tokonomix.ai/api/v1"
  api_key_name: tokonomix

# then: llm keys set tokonomix   (paste tok-your-key)
# llm -m anthropic/claude-sonnet-4-6 "Explain quorum sensing"

Consensus tip

Point a model_id at tokonomix-consensus for hard or agentic queries; add a second entry on a direct slug for routine one-liners.

Jan

Desktop appTool calling supported

Local-first desktop AI assistant with remote endpoints.

Custom provider Base URL
# Jan -> Settings -> Model Providers -> + (OpenAI-compatible)
Base URL : https://tokonomix.ai/api/v1
API Key  : tok-your-key

# Add Model -> id: anthropic/claude-sonnet-4-6
# then pick anthropic/claude-sonnet-4-6 in the model picker and chat
# Opt-in: consensus for planning/review (no tool-calling)
# Add Model -> id: tokonomix-consensus

Consensus tip

Name the model tokonomix-consensus for high-stakes chats; add a direct slug in the picker for fast everyday questions.

CodeGPT

VS Code extension

VS Code AI coding extension with custom providers.

Custom provider endpoint
# CodeGPT panel -> select model -> Provider: Custom
Model    : tokonomix-consensus
API Key  : tok-your-key
Endpoint : https://tokonomix.ai/api/v1

# Connect (BYOK; the Custom provider needs a Pro/Teams plan)

Consensus tip

Point the Custom provider at tokonomix-consensus for risky in-editor answers; switch to a direct slug for routine completions.

aichat

CLITool calling supported

All-in-one Rust LLM CLI, shell and REPL.

openai-compatible client (config.yaml)
# ~/.config/aichat/config.yaml
clients:
  - type: openai-compatible
    name: tokonomix
    api_base: https://tokonomix.ai/api/v1
    api_key: tok-your-key
    models:
      - name: anthropic/claude-sonnet-4-6
        supports_function_calling: true
      # Opt-in: consensus for planning/review (no tool-calling)
      - name: tokonomix-consensus

# aichat -m tokonomix:anthropic/claude-sonnet-4-6 "refactor this"

Consensus tip

Select tokonomix:tokonomix-consensus for hard reasoning turns; add a direct model to the client for high-volume edits.

gp.nvim

Neovim plugin

Neovim AI plugin for chat and code ops.

providers + agent
require("gp").setup({
  providers = {
    tokonomix = {
      endpoint = "https://tokonomix.ai/api/v1/chat/completions",
      secret = os.getenv("TOKONOMIX_API_KEY"),  -- tok-your-key
    },
  },
  agents = {
    { provider = "tokonomix", name = "Tokonomix", chat = true, command = true,
      model = { model = "tokonomix-consensus" } },
  },
})

Consensus tip

Name the agent model tokonomix-consensus for risky in-editor prompts; define a second agent on a direct slug for routine chat.

Model Context Protocol

Add consensus as a tool, not just a model

The MCP server exposes tokonomix_consensus_ask as a callable tool. Any MCP-capable agent (Claude Code, Cursor, Cline, Windsurf, Zed) can call it mid-session — without changing the base model. Consensus runs only on the calls you flag, keeping costs low.

// Any MCP-capable agent (Claude Code, Cursor, Cline, Windsurf…)
{
  "mcpServers": {
    "tokonomix": {
      "command": "npx",
      "args": ["-y", "tokonomix-mcp"],
      "env": {
        "TOKONOMIX_API_KEY": "tok-your-key"
      }
    }
  }
}

// Available MCP tools:
//   tokonomix_consensus_ask   — multi-model consensus on any question
//   tokonomix_get_balance     — check remaining token balance
//   tokonomix_list_models     — enumerate available models
//   tokonomix_single_ask      — single-model call with full token accounting

Cross-family consensus

Three proposer models from different families answer independently before a judge synthesises.

Judge scoring

An independent judge model scores and reconciles proposals, surfacing disagreements explicitly.

Blind-spot detection

Catches cases where all proposers agree but are collectively wrong — the cross-family check the single-model path misses.

Full token trace

Every token, every model, every cost — itemised per call in your dashboard.

Tool calling

Tool calling / Function calling

The gateway supports the OpenAI tool-calling protocol on single-model passthrough calls. Pass a tools array (JSON Schema function definitions) on any POST /api/v1/chat/completions request to a model that carries the tools capability. The response follows the standard OpenAI shape with message.tool_calls[] and finish_reason: "tool_calls".

Single-model only

Tool calling requires a direct provider/model-id slug. Consensus mode rejects tools — the synthesis pipeline cannot merge tool calls across proposers.

Non-streaming only

Streaming tool deltas (stream: true) are not yet supported. Omit stream or set it to false to receive tool_calls in the JSON response.

Example request

curl https://tokonomix.ai/api/v1/chat/completions \
  -H "Authorization: Bearer tok-your-key" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "anthropic/claude-sonnet-4-6",
  "messages": [
    {"role": "user", "content": "What is the weather in Amsterdam?"}
  ],
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_weather",
        "description": "Get current weather for a city",
        "parameters": {
          "type": "object",
          "properties": {
            "city": {"type": "string", "description": "City name"}
          },
          "required": ["city"]
        }
      }
    }
  ],
  "tool_choice": "auto"
}'

Example response (finish_reason: "tool_calls")

{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "content": null,
      "tool_calls": [{
        "id": "call_abc123",
        "type": "function",
        "function": {
          "name": "get_weather",
          "arguments": "{"city":"Amsterdam"}"
        }
      }]
    },
    "finish_reason": "tool_calls"
  }]
}

Follow-up: send the tool result

curl https://tokonomix.ai/api/v1/chat/completions \
  -H "Authorization: Bearer tok-your-key" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "anthropic/claude-sonnet-4-6",
  "messages": [
    {"role": "user", "content": "What is the weather in Amsterdam?"},
    {
      "role": "assistant",
      "content": null,
      "tool_calls": [{
        "id": "call_abc123",
        "type": "function",
        "function": {
          "name": "get_weather",
          "arguments": "{"city":"Amsterdam"}"
        }
      }]
    },
    {
      "role": "tool",
      "tool_call_id": "call_abc123",
      "content": "{"temperature":"18°C","condition":"Partly cloudy"}"
    }
  ]
}'

Discover capable models

Query the model catalogue filtered to tools-capable models:

GET /api/v1/models?supports=tools
Authorization: Bearer tok-your-key

API changelog

API changelog

  • Tool calling live on the gateway (single-model passthrough, non-streaming).

Ready to connect?

Create a free account, generate an API key, and paste it into any of the configs above.