Nanotoll Account API

The account API from Nanotoll — 5 operation(s) for account.

GitHub OpenAPI

Operations 5

POST /api/v1/register Self-register and obtain an API key + USDC funding address #
GET /api/v1/balance Check current credit balance #
GET /api/v1/account Full account state for this key #
GET /api/v1/payments Recent onchain payment history #
POST /api/v1/trial Issue a free trial API key (1 per IP) #

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/nanotoll-dev:nanotoll-dev-account-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

nanotoll-dev-account-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Nanotoll Account API
  description: 'Single public REST API for nanotoll.dev: account registration and key issuance, trial keys, credit balance, payment history. One API key, one balance, billed in USDC on Base L2. The compress endpoint is served under /v1 on this host and as a tool on the MCP server. Revenue metrics are internal (dashboard only) and not part of the public API.'
  version: 1.0.0
  contact:
    name: Nanotoll
    url: https://nanotoll.dev
servers:
- url: https://api.nanotoll.dev
tags:
- name: Account
paths:
  /api/v1/register:
    post:
      tags:
      - Account
      summary: Self-register and obtain an API key + USDC funding address
      description: No authentication, no request body. Creates a user, derives a Base USDC funding address via BIP-44, and returns a fresh API key. Rate-limited per IP.
      responses:
        '201':
          description: Registration successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterResponse'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '500':
          description: Unexpected server failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      operationId: postApiV1Register
      x-operation-id-source: derived
  /api/v1/balance:
    get:
      tags:
      - Account
      summary: Check current credit balance
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Balance info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalanceResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      description: Returns the current credit balance in nanos (1 USDC = 1e9 nanos) and its USDC equivalent. Free - no billing.
      operationId: getApiV1Balance
      x-operation-id-source: derived
  /api/v1/account:
    get:
      tags:
      - Account
      summary: Full account state for this key
      security:
      - bearerAuth: []
      responses:
        '200':
          description: 'Account state: tier, credit, expiry, usage'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountResponse'
        '401':
          description: Missing or invalid API key (expired keys answer 401 too)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      description: 'Per-key account state: derived tier (trial/paid/internal), key type, credit balance, expiry, usage totals (requests, chars, amount charged, refunds) and the trial inflight limit. Free - no billing. Service-wide caps and per-mode prices are public at GET /v1/limits.'
      operationId: getApiV1Account
      x-operation-id-source: derived
  /api/v1/payments:
    get:
      tags:
      - Account
      summary: Recent onchain payment history
      security:
      - bearerAuth: []
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 20
          minimum: 1
          maximum: 100
      responses:
        '200':
          description: Payment history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentsResponse'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      description: Returns recent confirmed onchain USDC deposits (Base L2) for this account. Free - no billing. Use limit to cap results (1-100, default 20).
      operationId: getApiV1Payments
      x-operation-id-source: derived
  /api/v1/trial:
    post:
      tags:
      - Account
      summary: Issue a free trial API key (1 per IP)
      description: No authentication. No request body. Issues a key_type='free' account bound to the caller's IP (one trial key per IP, subject to a service-wide daily cap), with the configured credit grant, an expiry, and a Base USDC funding address so the trial key can be topped up like any other. The grant is excluded from revenue stats until the user makes a real deposit.
      responses:
        '201':
          description: Free key issued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FreeKeyResponse'
        '409':
          description: IP already used for a free key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limit or daily trial cap exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '500':
          description: Unexpected server failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      operationId: postApiV1Trial
      x-operation-id-source: derived
components:
  schemas:
    PaymentEntry:
      type: object
      required:
      - tx_hash
      - log_index
      - amount
      - chain
      - confirmations_seen
      - status
      - created_at
      properties:
        tx_hash:
          type: string
        log_index:
          type: integer
        amount:
          type: number
          format: double
        chain:
          type: string
          example: base
        confirmations_seen:
          type: integer
        status:
          type: string
          example: confirmed
        created_at:
          type: string
          format: date-time
    AccountResponse:
      type: object
      required:
      - key_type
      - tier
      - internal
      - credit_balance
      - funding_address
      - chain
      - token
      - trial_inflight_limit
      - usage
      - limits_endpoint
      - key_status
      properties:
        key_type:
          type: string
          description: 'Storage class: deposit (paying), free (trial grant), glama (service key).'
          example: free
        tier:
          type: string
          description: 'Derived tier: trial (free grant), paid (funded key), internal (operator).'
          enum:
          - trial
          - paid
          - internal
        key_status:
          type: string
          enum:
          - active
          - expired
          description: 'Derived label: expired only for a free key past its expires_at. Credit 0.0 is not a state - paid keys never expire.'
        internal:
          type: boolean
        credit_balance:
          type: number
          format: double
          description: Current credit in USDC.
        funding_address:
          type: string
          description: USDC (Base) top-up address for this account.
        chain:
          type: string
          example: base
        token:
          type: string
          example: USDC
        expires_at:
          type:
          - string
          - 'null'
          description: Free-key expiry, RFC3339 UTC (e.g. 2026-11-23T06:21:21Z). null = never expires.
          example: '2026-11-23T06:21:21Z'
        trial_inflight_limit:
          type:
          - integer
          - 'null'
          description: Trial keys hold at most this many requests in flight; paid keys queue instead. null for non-trial tiers.
        usage:
          type: object
          properties:
            charged_requests:
              type: integer
            charged_chars:
              type: integer
              description: Total input chars across charged calls.
            charged_amount:
              type: number
              format: double
              description: Total USDC charged.
            refunded_requests:
              type: integer
              description: Calls refunded after a server-side failure.
        limits_endpoint:
          type: string
          description: 'Service-wide caps and per-mode prices: GET /v1/limits (open).'
          example: /v1/limits
    PaymentsResponse:
      type: object
      required:
      - payments
      - count
      properties:
        payments:
          type: array
          items:
            $ref: '#/components/schemas/PaymentEntry'
        count:
          type: integer
          example: 1
    ErrorEnvelope:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              example: BAD_REQUEST
            message:
              type: string
              example: Validation failure
            details:
              type: object
              additionalProperties: true
    FreeKeyResponse:
      type: object
      properties:
        api_key:
          type: string
          description: Bearer token for all billed services.
        funding_address:
          type: string
          description: Base USDC deposit address for this account. Fund it to upgrade the trial key to a permanent paid key.
        chain:
          type: string
          example: base
          description: Deposit chain.
        token:
          type: string
          example: USDC
          description: Deposit token.
        credit_balance:
          type: number
          description: Free grant in USDC.
        key_type:
          type: string
          enum:
          - free
        expires_at:
          type: string
          description: Free-key expiry, RFC3339 UTC (e.g. 2026-11-23T06:21:21Z). null = never expires.
          example: '2026-11-23T06:21:21Z'
      required:
      - api_key
      - funding_address
      - chain
      - token
      - credit_balance
      - key_type
      - expires_at
    BalanceResponse:
      type: object
      required:
      - credit_balance
      - funding_address
      - chain
      - token
      properties:
        credit_balance:
          type: number
          format: double
          example: 5.0
        funding_address:
          type: string
        chain:
          type: string
          example: base
        token:
          type: string
          example: USDC
    RegisterResponse:
      type: object
      required:
      - api_key
      - funding_address
      - chain
      - token
      - credit_balance
      - legal_notice_version
      - refund_policy_url
      - withdrawal_notice_url
      properties:
        api_key:
          type: string
          example: macs_00000000000000000000000000000000
        funding_address:
          type: string
          example: 0xAbc123...
        chain:
          type: string
          example: base
        token:
          type: string
          example: USDC
        credit_balance:
          type: number
          format: double
          example: 0.0
        legal_notice_version:
          type: string
          description: 'Revision of the legal notices served with this response, as an ISO date. Store it with the response: the withdrawal information for EU/EEA and UK consumers is delivered here, in a durable medium.'
          example: '...'
        refund_policy_url:
          type: string
          description: Refund Policy, including the consumer right of withdrawal.
          example: https://nanotoll.dev/legal/refund/
        withdrawal_notice_url:
          type: string
          description: Direct link to the consumer right of withdrawal section.
          example: https://nanotoll.dev/legal/refund/#2-right-of-withdrawal-for-consumers-eu-eea-and-uk
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'API key issued by TOLL POST /api/v1/register (e.g. macs_<32hex>). Sent as `Authorization: Bearer ***`'