GBlin Protocol X402 API

The X402 API from GBlin Protocol — 11 operation(s) for x402.

GitHub OpenAPI

Operations 11

GET /api/x402/treasury-state Treasury state #
GET /api/x402/plan Treasury plan for idle USDC #
GET /api/x402/health Wallet treasury health #
GET /api/x402/quote Swap quote #
GET /api/x402/invest Invest USDC into GBLIN #
GET /api/x402/jit Just-In-Time GBLIN to USDC #
GET /api/x402/governance Governance check #
GET /api/x402/attestation-sample Risk attestation sample (free) #
GET /api/x402/attestation Risk Attestation (perishable, verifiable) #
POST /api/x402/seal AI Action Receipt: seal the hashes of an action #
GET /api/x402/catalog x402 endpoint liveness catalog #

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/gblin-digital:gblin-digital-x402-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

gblin-digital-x402-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GBLIN Protocol X402 API
  version: 1.1.0
  description: 'GBLIN is a basket token on Base mainnet (45% cbBTC, 45% WETH, 10% USDC) minted and redeemed at net asset value, with an on-chain Crash Shield that cuts the risk-asset weights during drawdowns. It is crypto exposure, not capital protection. Three endpoints are paid per call with x402 (USDC on Base, chain id 8453): a signed risk attestation, a receipt in a public transparency log, and an x402 endpoint liveness catalog. The vault reads, the treasury plan and the unsigned calldata routes are free.'
  contact:
    name: GBLIN
    url: https://gblin.digital
    email: info@gblin.digital
  x-guidance: 'Free routes need no payment: call them with a plain GET. Start with /api/x402/treasury-state for NAV, basket and shield status. To decide what to do with idle USDC, call /api/x402/plan?wallet=0x...&daily_burn=25: it returns the cash to keep liquid, the surplus, a mint simulation with live fees and an estimate of exiting the same day. Nothing executes: /api/x402/invest and /api/x402/jit return unsigned calldata that the wallet owner reviews and signs. Paid routes answer HTTP 402 with x402 v2 payment requirements (exact scheme, USDC on Base); retry with the signed payment header. Use /api/x402/attestation before moving capital (free sample: /api/x402/attestation-sample), POST /api/x402/seal after an action you may need to prove, and /api/x402/catalog before paying an x402 service you have not used recently. The same tools are available as a free MCP server at https://mcp.gblin.digital/mcp.'
servers:
- url: https://gblin.digital
tags:
- name: X402
paths:
  /api/x402/treasury-state:
    get:
      summary: Treasury state
      description: 'NAV in USD, basket composition with dynamic weights, Crash Shield status.


        Free since 2026-09-27: no payment required. Also available free in the MCP server (@gblin-protocol/mcp-server).'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                - nav_usd
                - eth_price_usd
                - crash_shield_active
                - slippage_buffer_pct
                - slippage_reason
                - basket
                - meta
                properties:
                  nav_usd:
                    type: number
                    description: Net asset value in USD per GBLIN
                  eth_price_usd:
                    type: number
                  crash_shield_active:
                    type: boolean
                  slippage_buffer_pct:
                    type: number
                  slippage_reason:
                    type: string
                  basket:
                    type: array
                    description: Current basket entries with dynamic weights
                  meta:
                    type: object
                    description: Contract and chain metadata for this reading
      security: []
      tags:
      - X402
      operationId: getApiX402TreasuryState
      x-operation-id-source: derived
  /api/x402/plan:
    get:
      summary: Treasury plan for idle USDC
      description: 'Turns a wallet and a spending rate into a reviewable plan: the operating cash to keep in USDC (the larger of reserve and daily_burn x days), the surplus above it, a simulation of minting that surplus into GBLIN with every fee read from the vault, the estimated value of exiting the same day, a trial amount, blockers, and the URLs that prepare unsigned calldata. Nothing is executed. Provide daily_burn or reserve.'
      parameters:
      - name: wallet
        in: query
        required: true
        schema:
          type: string
          pattern: ^0x[0-9a-fA-F]{40}$
        description: 0x wallet address
      - name: daily_burn
        in: query
        required: false
        schema:
          type: number
        description: USD the wallet spends per day
      - name: days
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 365
        description: Days of spending to keep liquid (1-365, default 7)
      - name: reserve
        in: query
        required: false
        schema:
          type: number
        description: USD to keep liquid regardless of spending
      - name: trial
        in: query
        required: false
        schema:
          type: number
        description: Size in USDC of a first trial (default 100)
      security: []
      responses:
        '200':
          description: Success
      tags:
      - X402
      operationId: getApiX402Plan
      x-operation-id-source: derived
  /api/x402/health:
    get:
      summary: Wallet treasury health
      description: 'Balances, gas runway and rebalance recommendation for a wallet.


        Free since 2026-09-27: no payment required. Also available free in the MCP server (@gblin-protocol/mcp-server).'
      responses:
        '200':
          description: Success
      parameters:
      - name: wallet
        in: query
        required: true
        schema:
          type: string
        description: 0x wallet address
      - name: daily_burn
        in: query
        required: false
        schema:
          type: string
        description: Estimated daily USDC burn
      security: []
      tags:
      - X402
      operationId: getApiX402Health
      x-operation-id-source: derived
  /api/x402/quote:
    get:
      summary: Swap quote
      description: 'Preview a GBLIN swap (no execution). Returns expected output and safe minOut.


        Free since 2026-09-27: no payment required. Also available free in the MCP server (@gblin-protocol/mcp-server).'
      responses:
        '200':
          description: Success
      parameters:
      - name: direction
        in: query
        required: true
        schema:
          type: string
        description: buy or sell
      - name: amount
        in: query
        required: true
        schema:
          type: string
        description: Input amount
      security: []
      tags:
      - X402
      operationId: getApiX402Quote
      x-operation-id-source: derived
  /api/x402/invest:
    get:
      summary: Invest USDC into GBLIN
      description: 'Two-step approve + buyGBLINWithToken calldata for treasury accumulation.


        Free since 2026-09-27: no payment required. Also available free in the MCP server (@gblin-protocol/mcp-server).'
      responses:
        '200':
          description: Success
      parameters:
      - name: usdc
        in: query
        required: true
        schema:
          type: string
        description: USDC amount to invest
      security: []
      tags:
      - X402
      operationId: getApiX402Invest
      x-operation-id-source: derived
  /api/x402/jit:
    get:
      summary: Just-In-Time GBLIN to USDC
      description: 'Two-step calldata: sellGBLINForEth then Uniswap WETH to USDC. Single atomic tx.


        Free since 2026-09-27: no payment required. Also available free in the MCP server (@gblin-protocol/mcp-server).'
      responses:
        '200':
          description: Success
      parameters:
      - name: usdc
        in: query
        required: true
        schema:
          type: string
        description: Target USDC amount
      - name: wallet
        in: query
        required: true
        schema:
          type: string
        description: 0x wallet address
      security: []
      tags:
      - X402
      operationId: getApiX402Jit
      x-operation-id-source: derived
  /api/x402/governance:
    get:
      summary: Governance check
      description: 'Verify owner is the 48h Timelock and read min delay parameters.


        Free since 2026-09-27: no payment required. Also available free in the MCP server (@gblin-protocol/mcp-server).'
      responses:
        '200':
          description: Success
      security: []
      tags:
      - X402
      operationId: getApiX402Governance
      x-operation-id-source: derived
  /api/x402/attestation-sample:
    get:
      summary: Risk attestation sample (free)
      description: 'A free static example with the same shape and EIP-712 schema as the paid risk attestation from /api/x402/attestation, for integration testing. The data is frozen and expired: never a live risk signal.'
      security: []
      responses:
        '200':
          description: Success
      tags:
      - X402
      operationId: getApiX402AttestationSample
      x-operation-id-source: derived
  /api/x402/attestation:
    get:
      summary: Risk Attestation (perishable, verifiable)
      description: 'Perishable (10-minute) proof of the current BTC/ETH risk regime (calm | elevated | crash) derived from the on-chain Crash Shield. Attach it to your action as portable proof-of-diligence; any counterparty verifies it in one step (EIP-712 signature when an attestor key is configured, else a tamper-evident attestation_id). Expires in 10 minutes, so re-fetch each decision cycle.


        Requires an x402 USDC payment on Base mainnet ($0.003 USDC). Free verifier: verify_risk_attestation in @gblin-protocol/mcp-server.'
      responses:
        '200':
          description: Success
        '402':
          description: Payment Required
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.003'
        protocols:
        - x402: {}
      tags:
      - X402
      operationId: getApiX402Attestation
      x-operation-id-source: derived
  /api/x402/seal:
    post:
      summary: 'AI Action Receipt: seal the hashes of an action'
      description: 'Seal the SHA-256 hashes of an AI action into GBLIN''s public append-only RFC 6962 transparency log. Returns a portable receipt: Ed25519 signature, inclusion proof and signed checkpoint; the tree root is anchored daily on Base. Body: {action, input_hash, output_hash?, agent_id?, tool?, meta?}. The labels are public; only the hashes protect the content.


        Requires an x402 USDC payment on Base mainnet ($0.0045 USDC). Free demo (5 per day per IP) and free reading: https://mcp.gblin.digital/log'
      responses:
        '200':
          description: Success
        '402':
          description: Payment Required
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.0045'
        protocols:
        - x402: {}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - action
              - input_hash
              properties:
                action:
                  type: string
                  maxLength: 128
                  description: 'Short public label for what the AI did. Published in the log: identifiers only, never secrets.'
                input_hash:
                  type: string
                  pattern: ^(0x)?[0-9a-fA-F]{64}$
                  description: sha256 of your input, 64 hex chars (0x prefix optional)
                output_hash:
                  type: string
                  pattern: ^((0x)?[0-9a-fA-F]{64})?$
                  description: sha256 of your output (optional)
                agent_id:
                  type: string
                  maxLength: 128
                  description: Your agent identifier (optional). Published.
                tool:
                  type: string
                  maxLength: 128
                  description: Tool or model used (optional). Published.
                meta:
                  type: string
                  maxLength: 512
                  description: Extra JSON object as a string (optional). Published.
      tags:
      - X402
      operationId: postApiX402Seal
      x-operation-id-source: derived
  /api/x402/catalog:
    get:
      summary: x402 endpoint liveness catalog
      description: 'Call before your agent pays an x402 service it has not used recently: is that endpoint actually alive? Liveness of the ~200 most recently updated Bazaar listings, probed in rotation: HTTP status, latency, last-OK time and consecutive failures per endpoint. Measurements only, no judgements; the probes never pay.


        Requires an x402 USDC payment on Base mainnet ($0.005 USDC). Free aggregate view: https://mcp.gblin.digital/catalog'
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.005'
        protocols:
        - x402: {}
      responses:
        '200':
          description: Success
        '402':
          description: Payment Required
      tags:
      - X402
      operationId: getApiX402Catalog
      x-operation-id-source: derived
externalDocs:
  description: Machine-readable index (free)
  url: https://gblin.digital/api/x402/llms.txt
x-payment:
  x402Version: 2
  scheme: exact
  network: eip155:8453
  chainId: 8453
  asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
  facilitator: Coinbase CDP (https://api.cdp.coinbase.com/platform/v2/x402); PayAI (https://facilitator.payai.network) only when CDP is disabled
  requirementsHeader: PAYMENT-REQUIRED
  signatureHeader: PAYMENT-SIGNATURE
  responseHeader: PAYMENT-RESPONSE
  recommendedClient: '@x402/fetch or @x402/axios (handle both v1 and v2)'