Dagon InferenceDocs Console

Agents

Agent setup

An agent can discover the API, create a key and pay for its own inference without a browser or email.

On this page

Discovery files

FileWhat it holds
/llms.txtThe API, models and prices, and how to pay, written for language models
/llms-full.txtThe same plus the full text of every guide
/openapi.jsonOpenAPI 3.1, with x402 payment info on the inference operations
/.well-known/api-catalogRFC 9727 link set pointing at the API and its descriptions
/models.jsonCatalog snapshot (the live list is /v1/models)
/changelog.xmlAtom feed of catalog changes: new, removed and renamed models, refusal labels, providers, prices (also /changelog.json)

How an agent pays

  1. x402 per request: no key, no setup. The first paid response returns a key in x-dagon-key.
  2. Wallet top-up: create a key with POST /v1/keys, then fund it in two calls.
  3. MCP server, remote or local, below.

Remote MCP server

https://inference.dagon.so/mcp is an MCP server over Streamable HTTP (stateless, JSON responses) for any client that takes a URL: Claude and ChatGPT connectors, Claude Code, Cursor, MCP directories. Send your gk_ key as Authorization: Bearer on the connection, as with the API; dagon_models and dagon_create_key work without one. Each tool call is an ordinary API request made with your key and your address, so the same limits, location block, billing and receipts apply; dagon_chat returns the receipt id. The server holds no wallet and never signs: dagon_buy_credits returns the unsigned USDC transaction for payer_wallet to sign, then dagon_confirm_purchase takes the signed transaction (fee sponsored) or the signature of the one you sent. Requests are limited to 120 a minute per network and 1 MiB each; a browser client's Origin must be https (or http on localhost).

Shell
claude mcp add --transport http dagon https://inference.dagon.so/mcp --header "Authorization: Bearer gk_..."
.mcp.json
{
  "mcpServers": {
    "dagon": {
      "type": "http",
      "url": "https://inference.dagon.so/mcp",
      "headers": { "Authorization": "Bearer ${DAGON_API_KEY}" }
    }
  }
}

Local MCP server

The gateway repository's mcp/ folder is a local stdio MCP server for Claude Desktop, Claude Code, omp and other MCP clients, with the same tools. It can also sign purchases with a wallet you configure. It is not published to npm: run it from a checkout (Node 22.18 or newer). It does not pay with x402.

ToolWhat it does
dagon_modelsGET /v1/models
dagon_balanceGET /v1/credits
dagon_create_keyPOST /v1/keys
dagon_buy_creditsBuys credits with Solana USDC (signs with a configured wallet, or returns the unsigned transaction)
dagon_confirm_purchaseCredits a payment you signed yourself: the signed transaction when fee sponsored, else the signature of the one you sent
dagon_chatOne non-streaming chat completion
Shell
git clone https://github.com/inkwell-finance/dagon-inference.git
cd dagon-inference/mcp && npm ci
claude mcp add dagon --env DAGON_API_KEY=gk_... -- node /path/to/dagon-inference/mcp/src/index.ts
claude_desktop_config.json / .mcp.json
{
  "mcpServers": {
    "dagon": {
      "command": "node",
      "args": ["/path/to/dagon-inference/mcp/src/index.ts"],
      "env": { "DAGON_API_KEY": "${DAGON_API_KEY}" }
    }
  }
}

Purchases are bounded by the server's own limits (by default $50 per call and $200 per day) and need DAGON_TREASURY_WALLET set independently. See mcp/README.md in the repository for every variable.

Coding agents and SDK tools

Any tool that accepts an OpenAI-compatible base URL works with https://inference.dagon.so/v1; tools built on the Anthropic SDK use https://inference.dagon.so. Use a child key per agent with a set balance, so a runaway loop spends at most that.

Last updated