Fermat
Server Details
OpenAI-compatible LLM gateway: pay per request with an API key, signed receipt for each call.
- Status
- Healthy
- Last Tested
- Transport
- Streamable HTTP · MCP 2025-11-25
- URL
TDQS
Score is being calculated.
Available Tools
11 toolschatInspect
Run a chat completion on the Fermat gateway, paid from the Phase API key or the wallet this server uses (free models cost nothing). Returns the answer, actual price, task id for the receipt and usage.
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | model id from list_models, or a class: auto | eco | premium | agentic | |
| prompt | No | single user message (use messages for multi-turn) | |
| system | No | optional system prompt | |
| session | No | saved session id (from the session tool or a /s/<id> link): the gateway prepends its history and appends this turn | |
| messages | No | full conversation; overrides prompt/system | |
| max_tokens | No | output cap; also bounds the price ceiling | |
| temperature | No | sampling temperature 0–2 (Claude ignores it) |
Output Schema
| Name | Required | Description |
|---|---|---|
| text | Yes | |
| batch | No | payment batch this call was charged to (settled with one transaction later) |
| level | No | |
| model | Yes | |
| usage | Yes | |
| payment | Yes | |
| session | No | |
| task_id | Yes | |
| tx_hash | No | |
| provider | Yes | |
| price_usd | Yes | |
| elapsed_ms | Yes | |
| ceiling_usd | No | |
| receipt_url | No | |
| session_url | No | |
| routed_model | No |
compareInspect
Run one prompt on 2 to 4 Fermat models or classes at once and compare answer, price, tokens and speed; returns the cheapest, the most expensive and how many times more the expensive one cost. Spends credit for each model. Default models: the cheapest paid chat model, auto, and the most expensive open chat model.
| Name | Required | Description | Default |
|---|---|---|---|
| models | No | 2 to 4 model ids or classes; default: the cheapest paid chat model, auto, and the most expensive open chat model | |
| prompt | No | single user message (use messages for multi-turn) | |
| system | No | optional system prompt | |
| messages | No | full conversation; overrides prompt/system | |
| max_tokens | No | output cap for every model (default: none) |
Output Schema
| Name | Required | Description |
|---|---|---|
| ratio | No | most expensive price divided by the cheapest, one decimal |
| results | Yes | |
| cheapest | No | model with the lowest price among the answers |
| most_expensive | No | model with the highest price among the answers |
docsRead-onlyInspect
Fermat documentation in short: connect, pricing (with the live price table), savings, mcp, byok, data, receipts, limits.
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | what to explain |
Output Schema
| Name | Required | Description |
|---|---|---|
| text | Yes | |
| topic | Yes |
embedInspect
Compute embeddings on the Fermat gateway (paid from the Phase API key or the wallet).
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | ||
| model | Yes | embeddings model id |
Output Schema
| Name | Required | Description |
|---|---|---|
| payment | Yes | |
| vectors | Yes | |
| price_usd | Yes |
keyRead-onlyInspect
Balance, daily cap and spend of the Phase API key this server pays with (key mode).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| key | No |
list_modelsRead-onlyInspect
List models of the Fermat gateway with prices (USD per 1M tokens, fee per call) and layer (flagship | open | class | free).
| Name | Required | Description | Default |
|---|---|---|---|
| layer | No | optional filter: flagship | open | class | free |
Output Schema
| Name | Required | Description |
|---|---|---|
| models | Yes | |
| wallet | No | |
| gateway | Yes |
quoteRead-onlyInspect
Get the price ceiling for a chat request without paying (the gateway's 402 quote).
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | model id from list_models, or a class: auto | eco | premium | agentic | |
| prompt | No | single user message (use messages for multi-turn) | |
| system | No | optional system prompt | |
| session | No | saved session id (from the session tool or a /s/<id> link): the gateway prepends its history and appends this turn | |
| messages | No | full conversation; overrides prompt/system | |
| max_tokens | No | output cap; also bounds the price ceiling | |
| temperature | No | sampling temperature 0–2 (Claude ignores it) |
Output Schema
| Name | Required | Description |
|---|---|---|
| free | Yes | |
| model | Yes | |
| network | Yes | |
| ceiling_usd | Yes | |
| paid_by_key | No | true when a Phase API key pays: its balance and daily cap apply, max_usd_per_call does not |
| per_call_usd | Yes | |
| wallet_can_pay | Yes | |
| input_usd_per_1m | Yes | |
| max_usd_per_call | No | largest quote the wallet will sign (wallet mode only) |
| output_usd_per_1m | Yes | |
| input_tokens_estimate | Yes | |
| max_output_tokens_priced | Yes |
receiptRead-onlyInspect
Fetch the public receipt of a paid request by task id (model, provider, tokens, price, settlement tx, request/response hashes, signatures) and its Merkle proof once the weekly epoch is closed.
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | task id from chat / embed (0x…) |
Output Schema
| Name | Required | Description |
|---|---|---|
| url | Yes | |
| proof | No | |
| receipt | Yes | |
| epoch_state | Yes |
route_explainRead-onlyInspect
Explain one Fermat request from its public receipt: the model or class it named, the complexity level, the model and provider that served it, the price, the price of the class baseline model and the saving in percent, and the providers tried.
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | task id from chat / embed (0x…) |
Output Schema
| Name | Required | Description |
|---|---|---|
| level | No | complexity level the classifier gave the request |
| task_id | Yes | |
| attempts | No | providers tried, the one that served included |
| is_class | Yes | |
| provider | Yes | |
| price_usd | Yes | |
| requested | Yes | model or class the request named |
| saved_usd | No | |
| explanation | Yes | |
| receipt_url | Yes | |
| baseline_usd | No | price of the same usage on the class baseline model |
| routed_model | Yes | |
| saving_percent | No | |
| failed_attempts | No |
sessionDestructiveInspect
Saved chat sessions on the Fermat gateway: create one (returns an id and a shareable /s/ link), read its thread, list the wallet's sessions (wallet mode only: signed with the wallet key, no transaction), or delete one. Pass the id as session to chat and the gateway carries the context between turns and visits.
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | session id (get, delete) | |
| model | No | create: model the session starts with (informational; each chat names its own) | |
| title | No | create: title (defaults to the first message) | |
| action | Yes | create | get | list | delete | |
| system | No | create: system prompt kept for every turn |
Output Schema
| Name | Required | Description |
|---|---|---|
| id | Yes | |
| url | Yes | |
| model | No | |
| title | No | |
| system | No | |
| deleted | No | |
| messages | Yes | |
| requests | Yes | |
| sessions | No | |
| spent_usd | Yes | |
| expires_at | Yes |
usageRead-onlyInspect
Spend and savings of the Fermat API key over the last N days (1 to 90, default 7): totals, per day and per model when the gateway has the history (source usage), otherwise the key's totals (source key). Key mode only.
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | period in days, 1 to 90 (default 7) |
Output Schema
| Name | Required | Description |
|---|---|---|
| days | Yes | |
| source | Yes | usage: per-day history from /v1/key/usage; key: totals only from /v1/key |
| per_day | No | |
| requests | Yes | |
| per_model | No | |
| saved_usd | No | |
| spent_usd | Yes | |
| available_usd | No | |
| daily_cap_usd | No | |
| spent_today_usd | No |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
- Added
compare - Added
docs - Added
route_explain - Added
usage
7 tool updates
- First observed
chat - First observed
embed - First observed
key - First observed
list_models - First observed
quote - First observed
receipt - First observed
session
Related MCP Connectors
Pay-per-call LLM + extract (no API key), prepaid wallets, scoped keys, BSV x402 MCP.
OpenAI-compatible LLM gateway for Russia: 500+ models, ruble pricing, balance, chat.
GPT, Claude, Gemini, DeepSeek, Grok, Qwen and GLM through one API key. Pay per token.
Pay-per-call x402 gateway: agent tools, OpenAI-compatible LLM, market data, RPC, security audits.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceCrypto-native LLM gateway with OpenAI-compatible API and per-token USDC payments on Solana via the x402 protocol.4,113 npmMIT
- FlicenseNot gradedqualityCmaintenanceKeyless, pay-per-call AI gateway: 248 LLMs plus image/video/voice/music generation and live crypto, DeFi, markets, web-search and research tools through one MCP server. Pay per call in USDC via x402 on Base/Solana — no API key, no signup, free tier.-
- AlicenseAqualityFmaintenanceMCP server for ProxyLLM, the OpenAI-compatible LLM gateway, enabling live model catalogs, plan-savings calculations, routing key management, and autonomous account signup.940 npmMIT
- AlicenseAqualityAmaintenanceEnables any agent to purchase Claude and Grok inference metered per token, settled in BSV, via the hosted gateway without holding keys or running models locally.469 npmMIT
Glama MCP Gateway
Add one secure layer between your agents and this server.