Nibgate Unlocks API

x402 paid unlocks: pay USDC, receive content

GitHub OpenAPI

Operations 5

GET /ns/{slug} Unlock a nibshare link #
GET /nibshare/{slug}/manifest Public manifest for a share #
GET /nibshare/{slug}/meta Public metadata for a share #
POST /hub/preflight Check a direct USDC transfer before the payer signs #
POST /hub/pay x402 payment gate for tracked creator-site content #

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/nibgate-xyz:nibgate-xyz-unlocks-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

nibgate-xyz-unlocks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Nibgate Hub Unlocks API
  version: 0.2.15
  description: 'Public API for the Nibgate hub: verified content discovery, paid unlocks over x402 (Circle Gateway on Arc (chain ID 5042)), Nib Tips, public ledger, reputation, and platform stats. Nibgate is an open protocol for paid content on creator-owned domains. Agent guide: https://nibgate.xyz/discovery.md'
  contact:
    name: Nibgate
    url: https://nibgate.xyz
servers:
- url: https://api.nibgate.xyz
  description: Production hub API
tags:
- name: Unlocks
  description: 'x402 paid unlocks: pay USDC, receive content'
paths:
  /ns/{slug}:
    get:
      tags:
      - Unlocks
      summary: Unlock a nibshare link
      description: Standalone share links. Free shares return the body directly; paid shares return 402 with a PAYMENT-REQUIRED header containing a standard x402 envelope (Circle Gateway scheme on eip155:5042). Pay and retry the same request to receive JSON with content, media metadata, payment receipt, and a reusable unlockProof.
      security:
      - x402: []
      x-payment-info:
        protocols:
        - x402
        price:
          mode: dynamic
          currency: USDC
          min: '0.01'
          max: '1.00'
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
        description: Share slug from a nibshare link.
      responses:
        '200':
          description: Content body (free share, or paid share after settlement)
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  resource:
                    type: object
                    properties:
                      id:
                        type: string
                      title:
                        type: string
                      price:
                        type: string
                  content:
                    type: string
                    description: Decrypted plaintext body
                  payment:
                    type: object
                    properties:
                      amount:
                        type: number
                      currency:
                        type: string
                      payerWallet:
                        type: string
                      txHash:
                        type: string
                        description: Gateway settlement reference; idempotency key for retries
                      protocolFee:
                        type: number
                        nullable: true
                  unlockProof:
                    type: string
                    description: Signed entitlement proof; present it on later requests to re-read without paying
        '402':
          description: Payment required — PAYMENT-REQUIRED header carries the base64 x402 challenge
        '404':
          description: Unknown or revoked slug
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
      operationId: getNsBySlug
      x-operation-id-source: derived
  /nibshare/{slug}/manifest:
    get:
      tags:
      - Unlocks
      summary: Public manifest for a share
      description: 'Machine-readable metadata for a nibshare: title, type, price, currency, access policy. No authentication.'
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Manifest metadata
          content:
            application/json:
              schema:
                type: object
        '404':
          description: Unknown slug
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
      operationId: getNibshareBySlugManifest
      x-operation-id-source: derived
  /nibshare/{slug}/meta:
    get:
      tags:
      - Unlocks
      summary: Public metadata for a share
      description: Public fields for a nibshare including view/unlock counters. No authentication.
      parameters:
      - name: slug
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Metadata
          content:
            application/json:
              schema:
                type: object
        '404':
          description: Unknown slug
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
      operationId: getNibshareBySlugMeta
      x-operation-id-source: derived
  /hub/preflight:
    post:
      tags:
      - Unlocks
      summary: Check a direct USDC transfer before the payer signs
      description: 'Optional, free, read-only dry run for the direct-transfer rail (Circle Gateway settles first, then the unlock is claimed). Because the transfer is irreversible, check this BEFORE sending USDC: it verifies the server-side price you were quoted, that the payTo/creator fee wallet resolves, and that the payer holds enough USDC on Arc. Returns ok:false with a reason (''price_mismatch'', ''unfunded'', ''recipient_unresolved'', ''invalid_address'') when the payment is guaranteed to fail afterwards. Nothing is charged and no transaction is created. When the hub cannot complete the check it answers ok:true with proceedAnyway:true so callers are never blocked by diagnostics.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - contentId
              - price
              properties:
                contentId:
                  type: string
                  description: Tracked hub content id or externalId; server-side price and recipient win over body values when it maps.
                title:
                  type: string
                path:
                  type: string
                amount:
                  type: string
                  description: Amount the payer intends to send, in USDC. Compared against the server-side price.
                payer:
                  type: string
                  description: Payer wallet address (0x…). Used only to read its USDC balance; never charged.
                options:
                  type: object
                  description: 'Forwarded transfer options, e.g. { hosted: true }.'
      responses:
        '200':
          description: Preflight result
          content:
            application/json:
              schema:
                type: object
      operationId: postHubPreflight
      x-operation-id-source: derived
  /hub/pay:
    post:
      tags:
      - Unlocks
      summary: x402 payment gate for tracked creator-site content
      description: POST without payment credentials returns 402 with an x402 challenge bound to the content's server-side price and fee-wallet recipient. Submit the request again with the x402 payment header to verify settlement; the response contains the receipt used by creator sites to release content. Settled payments are recorded server-side (receipts, metrics, public ledger) whether the payer is a browser or a machine. Accepts optional siteId/siteToken for attribution when contentId is not a tracked hub id.
      security:
      - x402: []
      x-payment-info:
        protocols:
        - x402
        price:
          mode: dynamic
          currency: USDC
          min: '0.01'
          max: '1.00'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - price
              - recipient
              properties:
                contentId:
                  type: string
                  description: Tracked hub content id or externalId; server-side values win over body price/recipient when it maps.
                title:
                  type: string
                path:
                  type: string
                url:
                  type: string
                price:
                  type: string
                  description: Fallback price when contentId is not tracked.
                recipient:
                  type: string
                  description: Fee wallet address receiving the payment.
                paymentRail:
                  type: string
                  enum:
                  - gateway
                  - transfer
                siteId:
                  type: string
                  description: Site UUID for attribution when contentId is not tracked.
                siteToken:
                  type: string
                  description: Site verification token.
      responses:
        '200':
          description: Payment verified
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  payment:
                    type: object
                    properties:
                      paymentProvider:
                        type: string
                      verified:
                        type: boolean
                      paymentId:
                        type: string
                        nullable: true
                      recipient:
                        type: string
                      network:
                        type: string
                      amount:
                        type: number
                      revenue:
                        type: number
                      currency:
                        type: string
                      payer:
                        type: string
                        nullable: true
                      txHash:
                        type: string
                        nullable: true
        '400':
          description: Missing recipient/invalid body
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  details:
                    type: string
        '402':
          description: Payment required — x402 challenge
      operationId: postHubPay
      x-operation-id-source: derived
components:
  securitySchemes:
    x402:
      type: apiKey
      in: header
      name: Payment
      description: x402 payment challenge-response header. Include the header on retry after settlement to unlock paid content.
x-discovery:
  ownershipProofs:
  - '0x7514Ff68BE453931ce1a8e752140E209Dd125A'