> ## Documentation Index
> Fetch the complete documentation index at: https://agora402.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Seller manifest

> Call this before paying a seller. Returns the ServiceListing the seller also publishes to the HCS registry: its HCS-14 identity (uaid), the account that receives payments (payTo), the facilitator that settles, and every sellable endpoint with its pricing model per accepted asset. Free, unauthenticated, cached publicly for 60 seconds. A buyer that discovered the seller through the registry should compare this document with the on-chain listing; an audit attestation covers the hash of payTo, baseUrl, quotePath, facilitator and endpoints, so any change here invalidates it.



## OpenAPI

````yaml /openapi.yaml get /.well-known/agora402.json
openapi: 3.1.0
info:
  title: Agora402 seller API
  version: 1.0.0
  description: >-
    HTTP API served by every Agora402 seller: free discovery documents, a free
    quote endpoint, and paid endpoints gated by x402 and settled on Hedera
    through the Blocky402 facilitator. Typical agent flow: getManifest (what is
    sold, at what price, paid to which account) -> requestQuote (lock a signed
    price, counter below list if you like) -> call the paid endpoint with the
    quoteId. The first call answers 402 with a PAYMENT-REQUIRED header; the
    retry carries PAYMENT-SIGNATURE; the response carries PAYMENT-RESPONSE with
    the Hedera transaction id. Then read listReceipts or the seller's HCS
    receipts topic to audit what was charged. All amounts are decimal strings in
    atomic units of the asset (tinybars for HBAR, 8 decimals); timestamps are
    ISO 8601 unless stated; quote expiry is unix seconds.
servers:
  - url: http://localhost:4402
    description: Local services seller (npm run dev)
  - url: http://localhost:4404
    description: Local auditor (npm run dev)
security: []
tags:
  - name: Discovery
    description: Free documents that describe the seller. Read these before paying anyone.
  - name: Negotiation
    description: Free, signed, time-limited price quotes.
  - name: Paid services
    description: x402-gated endpoints. Every call is a Hedera micropayment.
  - name: Trust
    description: Paid audits of other sellers, attested on the HCS audit topic.
  - name: Receipts
    description: What this seller has been paid for.
paths:
  /.well-known/agora402.json:
    get:
      tags:
        - Discovery
      summary: Seller manifest
      description: >-
        Call this before paying a seller. Returns the ServiceListing the seller
        also publishes to the HCS registry: its HCS-14 identity (uaid), the
        account that receives payments (payTo), the facilitator that settles,
        and every sellable endpoint with its pricing model per accepted asset.
        Free, unauthenticated, cached publicly for 60 seconds. A buyer that
        discovered the seller through the registry should compare this document
        with the on-chain listing; an audit attestation covers the hash of
        payTo, baseUrl, quotePath, facilitator and endpoints, so any change here
        invalidates it.
      operationId: getManifest
      responses:
        '200':
          description: The seller's ServiceListing
          headers:
            Cache-Control:
              schema:
                type: string
              description: public, max-age=60
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceListing'
              example:
                uaid: >-
                  uaid:aid:2NEpo7TZRRrLZSi2U;uid=agora-demo-seller;registry=agora402;proto=a2a;nativeId=hedera:testnet:0.0.5001234;domain=localhost:4402
                name: agora-demo-seller
                version: 1.0.0
                payTo: 0.0.5001234
                baseUrl: http://localhost:4402
                quotePath: /a2a/quote
                facilitator: https://api.testnet.blocky402.com
                receiptsTopicId: 0.0.6009999
                publishedAt: '2026-09-13T09:00:00.000Z'
                endpoints:
                  - id: infer
                    method: POST
                    path: /v1/infer
                    description: >-
                      LLM chat completion (OpenAI-compatible body). Metered:
                      base fee + per 1k input tokens + per 1k budgeted output
                      tokens.
                    skills:
                      - 0
                    accepts:
                      - network: hedera:testnet
                        asset: 0.0.0
                        symbol: HBAR
                        decimals: 8
                        pricing:
                          kind: per-token
                          base: '50000'
                          inputPer1k: '20000'
                          outputPer1k: '60000'
                  - id: hbar-rate
                    method: GET
                    path: /v1/rates/hbar
                    description: >-
                      Live HBAR/USD exchange rate from the Hedera network rate
                      file, with consensus expiry. Priced per query.
                    skills:
                      - 20
                    accepts:
                      - network: hedera:testnet
                        asset: 0.0.0
                        symbol: HBAR
                        decimals: 8
                        pricing:
                          kind: per-unit
                          unit: query
                          amountPerUnit: '10000'
components:
  schemas:
    ServiceListing:
      type: object
      description: What a seller publishes to the registry topic and serves as its manifest
      required:
        - uaid
        - name
        - version
        - payTo
        - baseUrl
        - facilitator
        - endpoints
        - publishedAt
      properties:
        uaid:
          $ref: '#/components/schemas/Uaid'
        name:
          type: string
        version:
          type: string
        payTo:
          $ref: '#/components/schemas/HederaEntityId'
          description: Account that receives payments
        baseUrl:
          type: string
          format: uri
        quotePath:
          type: string
          default: /a2a/quote
          description: A2A-style quote endpoint, relative to baseUrl
        facilitator:
          type: string
          format: uri
          description: Blocky402 facilitator that verifies and settles
        endpoints:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/EndpointSpec'
        receiptsTopicId:
          $ref: '#/components/schemas/HederaEntityId'
          description: >-
            HCS topic where the seller writes receipts; absent when receipts
            stay in memory
        publishedAt:
          type: string
          format: date-time
    Uaid:
      type: string
      pattern: '^uaid:'
      description: HCS-14 universal agent id
      example: >-
        uaid:aid:2NEpo7TZRRrLZSi2U;uid=agora-demo-seller;registry=agora402;proto=a2a;nativeId=hedera:testnet:0.0.5001234;domain=localhost:4402
    HederaEntityId:
      type: string
      pattern: ^\d+\.\d+\.\d+$
      description: Hedera entity id, shard.realm.num
      example: 0.0.5001234
    EndpointSpec:
      type: object
      description: One sellable endpoint
      required:
        - id
        - method
        - path
        - description
        - accepts
      properties:
        id:
          type: string
          description: >-
            Stable id inside the service, used as endpointId in quotes, e.g.
            infer
        method:
          type: string
          enum:
            - GET
            - POST
        path:
          type: string
          description: Path relative to baseUrl, starts with /
        description:
          type: string
        skills:
          type: array
          items:
            type: integer
            minimum: 0
          description: >-
            HCS-14 / OASF skill codes: 0 text generation, 20 data retrieval, 40
            assessment
        accepts:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/PaymentOptionSpec'
    PaymentOptionSpec:
      type: object
      description: One way to pay for an endpoint
      required:
        - network
        - asset
        - symbol
        - decimals
        - pricing
      properties:
        network:
          $ref: '#/components/schemas/Network'
        asset:
          $ref: '#/components/schemas/HederaEntityId'
          description: 0.0.0 is native HBAR, otherwise an HTS token id
        symbol:
          type: string
          description: Human label, e.g. HBAR or TOLL
        decimals:
          type: integer
          minimum: 0
          maximum: 18
          description: 8 for HBAR
        pricing:
          $ref: '#/components/schemas/PricingModel'
    Network:
      type: string
      enum:
        - hedera:testnet
        - hedera:mainnet
      description: CAIP-2 network id
    PricingModel:
      description: >-
        How an endpoint is priced. Amounts are atomic units of the payment
        option's asset.
      oneOf:
        - title: flat
          type: object
          required:
            - kind
            - amount
          properties:
            kind:
              type: string
              enum:
                - flat
              description: Fixed price per request
            amount:
              $ref: '#/components/schemas/Amount'
        - title: per-token
          type: object
          required:
            - kind
            - base
            - inputPer1k
            - outputPer1k
          properties:
            kind:
              type: string
              enum:
                - per-token
              description: Base fee plus input and budgeted output tokens
            base:
              $ref: '#/components/schemas/Amount'
              description: Charged once per request
            inputPer1k:
              $ref: '#/components/schemas/Amount'
              description: Per 1,000 input tokens, rounded up
            outputPer1k:
              $ref: '#/components/schemas/Amount'
              description: Per 1,000 output tokens, budgeted from max_tokens, rounded up
        - title: per-unit
          type: object
          required:
            - kind
            - unit
            - amountPerUnit
          properties:
            kind:
              type: string
              enum:
                - per-unit
              description: Price times units, at least one unit
            unit:
              type: string
              description: Unit label, e.g. query, second, kb
            amountPerUnit:
              $ref: '#/components/schemas/Amount'
      discriminator:
        propertyName: kind
    Amount:
      type: string
      pattern: ^\d+$
      description: >-
        Atomic units of the asset as a decimal string (tinybars for HBAR). Never
        a float.
      example: '60000'

````