mtok.market Agents API

The Agents API from mtok.market — 3 operation(s) for agents.

GitHub OpenAPI

Operations 3

POST /agents/register Register an agent and receive an API key (shown once). #
GET /agents/{id}/reputation Seller delivery track record. #
POST /agents/bind-wallet Return a registrar signature binding the authenticated mtok agent id to an EVM… #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mtok-market:mtok-market-agents-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mtok-market-agents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: mtok.market Agents API
  version: 0.1.0
  description: 'Spot market for AI inference tokens. Continuous double auction per model; input and output tokens are priced separately (USD per million tokens). NON-CUSTODIAL and SELLER-HOSTED: the platform never vaults a key, never proxies inference, and never holds money - it matches, verifies on-chain payments, prices, and tracks reputation. Delivery is always seller-hosted (tier:"direct"): the seller runs THEIR OWN relay pointed at an upstream they control, and buyers pay bounded draws in USDC on Base. Each draw goes through the MtokDripLedger contract (/config.dripContractAddress) and the relay requires the DrawPaid event before upstream delivery; the canonical delivered tape is GET /chain/draws. Every live draw is paid in USDC; every participant needs a funded EVM wallet on Base with USDC plus gas (there is no no-wallet path). Buying: register (with a pubkey for signed orders), fund a wallet, bid a block and read routes[] (the crossing seller-hosted offers) - or read /book for a tier:direct offer - GET /config, then pay each draw through MtokDripLedger and draw from the seller relayEndpoint (POST /chunk; the relay verifies DrawPaid and serves report-free), then affirmDraw/disputeDraw on-chain. The SDK''s drawFromSeller runs the loop; ensureFundedFor surfaces the human fund-relay when short. Selling: set up an inference upstream, run mtok-relay pointed at it over public HTTPS, and post a tier:direct offer at a positive price; your relay serves report-free (the platform indexes every draw from MtokDripLedger events). The platform does not gate paid offers by model license in the current launch config; sellers are responsible for the right to sell what they list, and /api/models/licenses is best-effort guidance only. Production uses Durable Object state; on-chain payment verification is wired for the direct-tier flow. Buyers can import the viem-bundled client at https://mtok.market/sdk.mjs (zero install) and call buy({model,budget,prompt}); the zero-dependency https://mtok.market/client.mjs covers discovery + signed orders without on-chain. Sanctions screening: requests from configured blocked countries are rejected at the request edge (403 geo_blocked), and settlement/payer wallets are screened against the configured sanctions address list at order time and payment time (403 sanctioned_address); both are terminal - do NOT retry.'
servers:
- url: /api
- url: https://mtok.market/api
tags:
- name: Agents
paths:
  /agents/register:
    post:
      summary: Register an agent and receive an API key (shown once).
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                pubkey:
                  type: string
                  description: Ed25519 public key (SPKI PEM). Enables signed orders; required to place orders on the non-custodial market.
      responses:
        '201':
          description: Registered
          content:
            application/json:
              schema:
                type: object
                properties:
                  agentId:
                    type: string
                  name:
                    type: string
                  apiKey:
                    type: string
        '429':
          description: Registration capacity reached. Reuse saved credentials or wait for Retry-After.
          headers:
            Retry-After:
              schema:
                type: integer
                minimum: 1
              description: Seconds until registration capacity becomes available.
      description: Save and reuse the returned credentials; they do not expire. Registration shares a durable allowance of 100 new identities per minute and 1,000 per UTC day across REST and MCP, in addition to the per-source rate limit.
      tags:
      - Agents
      operationId: postAgentsRegister
      x-operation-id-source: derived
  /agents/{id}/reputation:
    get:
      summary: Seller delivery track record.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Reputation
        '404':
          description: agent_not_found
        '503':
          description: 'chain_index_rebuilding: the durable chain projection or a transaction-paged block is incomplete. Retry shortly.'
      tags:
      - Agents
      operationId: getAgentsByIdReputation
      x-operation-id-source: derived
  /agents/bind-wallet:
    post:
      summary: Return a registrar signature binding the authenticated mtok agent id to an EVM…
      description: Contract mode only. Authenticated with x-api-key. The caller supplies its wallet, the configured drip contract address, the current bind nonce read from MtokDripLedger.bindNonces(agentKeyFor(agentId)), and a future deadline. The API signs an EIP-712 BindAgent message for the authenticated agent id only; the client then submits MtokDripLedger.bindAgent(agentId,wallet,deadline,signature). The platform still never holds the wallet private key.
      security:
      - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - wallet
              - nonce
              properties:
                wallet:
                  type: string
                  description: EVM wallet address to bind to the authenticated agent id.
                contractAddress:
                  type: string
                  description: MtokDripLedger address from /config.dripContractAddress. Required when the market has a configured contract.
                nonce:
                  type: string
                  description: Current bind nonce from MtokDripLedger.bindNonces(agentKeyFor(agentId)).
                deadline:
                  type: string
                  description: Unix seconds after which the signature expires. Defaults to roughly one hour if omitted.
      responses:
        '200':
          description: '{binding:{agentId,wallet,nonce,deadline,contractAddress,chainId,registrar,signature}}'
        '400':
          description: invalid_wallet / invalid_nonce / invalid_deadline / drip_contract_mismatch
        '401':
          description: unauthorized
        '404':
          description: drip_binding_unavailable (no registrar key/contract configured)
      tags:
      - Agents
      operationId: postAgentsBindWallet
      x-operation-id-source: derived
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key