OpenAI-compatible LLM gateway: pay per request with an API key, signed receipt for each call.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Phase API key as 'Bearer phk_...'
Optional: your Anthropic API key, for Claude models
Optional: your OpenAI API key, for GPT models
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
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.
model id from list_models, or a class: auto | eco | premium | agentic
single user message (use messages for multi-turn)
optional system prompt
saved session id (from the session tool or a /s/<id> link): the gateway prepends its history and appends this turn
full conversation; overrides prompt/system
output cap; also bounds the price ceiling
sampling temperature 0–2 (Claude ignores it)
The server marks this tool as destructive. Running it may delete or overwrite data on the server or in any account you connected with your headers.
Tool list last changed Oct 25, 2026.
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.
| Argument | Type | Description |
|---|---|---|
| model* | string | model id from list_models, or a class: auto | eco | premium | agentic |
| prompt | string | single user message (use messages for multi-turn) |
| system | string | optional system prompt |
| session | string | saved session id (from the session tool or a /s/<id> link): the gateway prepends its history and appends this turn |
| messages | null | array | full conversation; overrides prompt/system |
| max_tokens | integer | output cap; also bounds the price ceiling |
| temperature | null | number | sampling temperature 0–2 (Claude ignores it) |
{
"type": "object",
"required": [
"model"
],
"properties": {
"model": {
"type": "string",
"description": "model id from list_models, or a class: auto | eco | premium | agentic"
},
"prompt": {
"type": "string",
"description": "single user message (use messages for multi-turn)"
},
"system": {
"type": "string",
"description": "optional system prompt"
},
"session": {
"type": "string",
"description": "saved session id (from the session tool or a /s/<id> link): the gateway prepends its history and appends this turn"
},
"messages": {
"type": [
"null",
"array"
],
"items": {
"type": "object",
"required": [
"role",
"content"
],
"properties": {
"role": {
"type": "string",
"description": "system | user | assistant"
},
"content": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "full conversation; overrides prompt/system"
},
"max_tokens": {
"type": "integer",
"description": "output cap; also bounds the price ceiling"
},
"temperature": {
"type": [
"null",
"number"
],
"description": "sampling temperature 0–2 (Claude ignores it)"
}
},
"additionalProperties": false
}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.
| Argument | Type | Description |
|---|---|---|
| models | null | array | 2 to 4 model ids or classes; default: the cheapest paid chat model, auto, and the most expensive open chat model |
| prompt | string | single user message (use messages for multi-turn) |
| system | string | optional system prompt |
| messages | null | array | full conversation; overrides prompt/system |
| max_tokens | integer | output cap for every model (default: none) |
{
"type": "object",
"properties": {
"models": {
"type": [
"null",
"array"
],
"items": {
"type": "string"
},
"description": "2 to 4 model ids or classes; default: the cheapest paid chat model, auto, and the most expensive open chat model"
},
"prompt": {
"type": "string",
"description": "single user message (use messages for multi-turn)"
},
"system": {
"type": "string",
"description": "optional system prompt"
},
"messages": {
"type": [
"null",
"array"
],
"items": {
"type": "object",
"required": [
"role",
"content"
],
"properties": {
"role": {
"type": "string",
"description": "system | user | assistant"
},
"content": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "full conversation; overrides prompt/system"
},
"max_tokens": {
"type": "integer",
"description": "output cap for every model (default: none)"
}
},
"additionalProperties": false
}Fermat documentation in short: connect, pricing (with the live price table), savings, mcp, byok, data, receipts, limits.
| Argument | Type | Description |
|---|---|---|
| topic* | string | what to explain |
{
"type": "object",
"required": [
"topic"
],
"properties": {
"topic": {
"enum": [
"connect",
"pricing",
"savings",
"mcp",
"byok",
"data",
"receipts",
"limits"
],
"type": "string",
"description": "what to explain"
}
},
"additionalProperties": false
}Compute embeddings on the Fermat gateway (paid from the Phase API key or the wallet).
| Argument | Type | Description |
|---|---|---|
| input* | null | array | |
| model* | string | embeddings model id |
{
"type": "object",
"required": [
"model",
"input"
],
"properties": {
"input": {
"type": [
"null",
"array"
],
"items": {
"type": "string"
}
},
"model": {
"type": "string",
"description": "embeddings model id"
}
},
"additionalProperties": false
}Balance, daily cap and spend of the Phase API key this server pays with (key mode).
No arguments.
{
"type": "object",
"additionalProperties": false
}List models of the Fermat gateway with prices (USD per 1M tokens, fee per call) and layer (flagship | open | class | free).
| Argument | Type | Description |
|---|---|---|
| layer | string | optional filter: flagship | open | class | free |
{
"type": "object",
"properties": {
"layer": {
"type": "string",
"description": "optional filter: flagship | open | class | free"
}
},
"additionalProperties": false
}Get the price ceiling for a chat request without paying (the gateway's 402 quote).
| Argument | Type | Description |
|---|---|---|
| model* | string | model id from list_models, or a class: auto | eco | premium | agentic |
| prompt | string | single user message (use messages for multi-turn) |
| system | string | optional system prompt |
| session | string | saved session id (from the session tool or a /s/<id> link): the gateway prepends its history and appends this turn |
| messages | null | array | full conversation; overrides prompt/system |
| max_tokens | integer | output cap; also bounds the price ceiling |
| temperature | null | number | sampling temperature 0–2 (Claude ignores it) |
{
"type": "object",
"required": [
"model"
],
"properties": {
"model": {
"type": "string",
"description": "model id from list_models, or a class: auto | eco | premium | agentic"
},
"prompt": {
"type": "string",
"description": "single user message (use messages for multi-turn)"
},
"system": {
"type": "string",
"description": "optional system prompt"
},
"session": {
"type": "string",
"description": "saved session id (from the session tool or a /s/<id> link): the gateway prepends its history and appends this turn"
},
"messages": {
"type": [
"null",
"array"
],
"items": {
"type": "object",
"required": [
"role",
"content"
],
"properties": {
"role": {
"type": "string",
"description": "system | user | assistant"
},
"content": {
"type": "string"
}
},
"additionalProperties": false
},
"description": "full conversation; overrides prompt/system"
},
"max_tokens": {
"type": "integer",
"description": "output cap; also bounds the price ceiling"
},
"temperature": {
"type": [
"null",
"number"
],
"description": "sampling temperature 0–2 (Claude ignores it)"
}
},
"additionalProperties": false
}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.
| Argument | Type | Description |
|---|---|---|
| task_id* | string | task id from chat / embed (0x…) |
{
"type": "object",
"required": [
"task_id"
],
"properties": {
"task_id": {
"type": "string",
"description": "task id from chat / embed (0x…)"
}
},
"additionalProperties": false
}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.
| Argument | Type | Description |
|---|---|---|
| task_id* | string | task id from chat / embed (0x…) |
{
"type": "object",
"required": [
"task_id"
],
"properties": {
"task_id": {
"type": "string",
"description": "task id from chat / embed (0x…)"
}
},
"additionalProperties": false
}Saved chat sessions on the Fermat gateway: create one (returns an id and a shareable /s/<id> 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.
| Argument | Type | Description |
|---|---|---|
| id | string | session id (get, delete) |
| model | string | create: model the session starts with (informational; each chat names its own) |
| title | string | create: title (defaults to the first message) |
| action* | string | create | get | list | delete |
| system | string | create: system prompt kept for every turn |
{
"type": "object",
"required": [
"action"
],
"properties": {
"id": {
"type": "string",
"description": "session id (get, delete)"
},
"model": {
"type": "string",
"description": "create: model the session starts with (informational; each chat names its own)"
},
"title": {
"type": "string",
"description": "create: title (defaults to the first message)"
},
"action": {
"type": "string",
"description": "create | get | list | delete"
},
"system": {
"type": "string",
"description": "create: system prompt kept for every turn"
}
},
"additionalProperties": false
}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.
| Argument | Type | Description |
|---|---|---|
| days | integer | period in days, 1 to 90 (default 7) |
{
"type": "object",
"properties": {
"days": {
"type": "integer",
"description": "period in days, 1 to 90 (default 7)"
}
},
"additionalProperties": false
}