Tollvex

Documentation

Tollvex docs

Tollvex is one API key and one prepaid balance for many tools. Agents connect through MCP or REST. Each successful call debits its listed price; failed calls are free. Agents can read the same instructions at /SKILL.md and /llms.txt.

Quickstart

shell
curl -X POST https://tollvex.com/api/v1/tools/weather.current/run \
  -H "Authorization: Bearer $TOLLVEX_API_KEY" \
  -H "content-type: application/json" \
  -d '{"input":{"city":"Lisbon"}}'

Authentication

Send your key as Authorization: Bearer tvx_… (or x-api-key: tvx_…). Keys are shown once when created; Tollvex stores only a hash. Revoke a key from the dashboard at any time.

Tools API

List tools (no key needed)

GET
GET https://tollvex.com/api/v1/tools?q=search&category=finance

Get one tool

GET
GET https://tollvex.com/api/v1/tools/{slug}

Run a tool

Body is {"input": {...}} matching the tool's input schema. Defaults in the schema are filled in for you.

response 200
{
  "request_id": "…",
  "resource": "weather.current",
  "output": { … },
  "cost_usd_micros": 500,
  "balance_usd_micros": 99500,
  "latency_ms": 412
}

Money is always integer micro-dollars: 1000000 = $1.00.

Balance and recent usage

GET
GET https://tollvex.com/api/v1/balance

MCP server

Endpoint https://tollvex.com/mcp, Streamable HTTP transport, stateless JSON responses, Bearer auth. Tools: search_tools (free, no key), run_tool (billed), get_balance (free).

Claude Code
claude mcp add --transport http tollvex https://tollvex.com/mcp \
  --header "Authorization: Bearer $TOLLVEX_API_KEY"
mcp.json (Cursor, Windsurf, Cline…)
{
  "mcpServers": {
    "tollvex": {
      "url": "https://tollvex.com/mcp",
      "headers": { "Authorization": "Bearer tvx_..." }
    }
  }
}

Models API

OpenAI-compatible POST /api/v1/chat/completions with base URL https://tollvex.com/api/v1. Streaming is supported. Billed per token from the usage the provider reports.

Available now: claude-haiku-5-5, claude-sonnet-5-5, claude-opus-5-5. Full list with prices: GET /api/v1/models.

python
import os
from openai import OpenAI

client = OpenAI(base_url="https://tollvex.com/api/v1", api_key=os.environ["TOLLVEX_API_KEY"])
r = client.chat.completions.create(
    model="claude-haiku-5-5",
    messages=[{"role": "user", "content": "Hello"}],
)

Billing

  • Prepaid balance only. No subscriptions. Agents cannot top up.
  • Tools: listed price per successful call. Non-2xx upstream responses and timeouts are not billed.
  • Models: per token, at the listed input/output rates. Because tokens are known only after the response, a long completion can take the balance slightly below zero; new calls are refused until you top up.
  • Card and crypto top-ups are not live yet.

Errors

Errors look like {"error": {"code": "…", "message": "…"}}.

  • 400 invalid_input: input does not match the schema
  • 401 missing_api_key / invalid_api_key
  • 402 insufficient_balance: top up, then retry
  • 404 not_found / model_not_found
  • 502 upstream_error: the tool or provider failed; you were not charged

Selling

List any HTTPS endpoint with a price per call on the sellers page. Tollvex sends a signed POST, bills the caller on a 2xx response, and credits you 80%. Verify requests with HMAC-SHA256 of `${timestamp}.${rawBody}` using your listing's signing secret.