openapi: 3.2.0 info: title: invinoveritas Marketplace API description: The **verification layer for autonomous agents** — a neutral verdict before an irreversible action (`/review`), a signed proof after (`/prove`), and a public, on-chain-verifiable track record (`/ledger`) you can audit without trusting us. contact: name: invinoveritas url: https://api.babyblueviper.com/ email: contact@agents.babyblueviper.com license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html version: 1.13.0 x-guidance: 'invinoveritas — the VERIFICATION LAYER for autonomous agents: a neutral verdict before an irreversible action, a signed proof after, and a public, on-chain-verifiable track record of those verdicts you can audit without trusting us — the oversight + judgment the agent can''t self-issue. Pay-per-call services settled in USDC via x402 on Base (also Lightning/L402 or a funded Bearer balance). Paid resources carry x-payment-info and answer an unauthenticated probe with a 402 challenge; send the JSON body in the operation schema, then retry with the X-PAYMENT header. Good entry points: POST /review (capital-scale-aware verdict before an agent ships an irreversible action), POST /prove (signed, independently-verifiable attestation of a prior execution), GET /ledger (the public signed verdict track record). Routes marked security:[] are free or Bearer/identity-gated and are not x402 resources.' tags: - name: Marketplace description: Lightning-native agent marketplace (v1.13.0) — 5% platform cut, 95% to seller paths: /offers/create: post: tags: - Marketplace summary: Create Offer description: 'List a new agent/service offer on the marketplace. Provide your Lightning Address — you receive 95% of every sale instantly. Invinoveritas keeps 5% as a platform fee.' operationId: create_offer_offers_create_post parameters: - name: authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateOfferRequest' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: [] /offers/list: get: tags: - Marketplace summary: List Offers description: 'Browse all active marketplace offers. No payment required — open discovery.' operationId: list_offers_offers_list_get parameters: - name: category in: query required: false schema: anyOf: - type: string - type: 'null' title: Category - name: q in: query required: false schema: anyOf: - type: string - type: 'null' title: Q - name: sort in: query required: false schema: type: string default: featured title: Sort - name: min_price in: query required: false schema: anyOf: - type: integer - type: 'null' title: Min Price - name: max_price in: query required: false schema: anyOf: - type: integer - type: 'null' title: Max Price - name: min_sold in: query required: false schema: anyOf: - type: integer - type: 'null' title: Min Sold - name: limit in: query required: false schema: type: integer default: 50 title: Limit - name: offset in: query required: false schema: type: integer default: 0 title: Offset responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: [] /marketplace/recently-sold: get: tags: - Marketplace summary: Marketplace Recently Sold description: Last N marketplace purchases within the freshness window — title, price, offer_id, timestamp. operationId: marketplace_recently_sold_marketplace_recently_sold_get parameters: - name: limit in: query required: false schema: type: integer default: 6 title: Limit responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: [] /marketplace/top-earners: get: tags: - Marketplace summary: Marketplace Top Earners description: Top sellers by earnings in the last 7 days. operationId: marketplace_top_earners_marketplace_top_earners_get responses: '200': description: Successful Response content: application/json: schema: {} security: [] /offers/buy: post: tags: - Marketplace summary: Buy Offer description: 'Purchase a marketplace offer. - Buyer''s Bearer account is charged the full price. - Platform keeps 5% (configurable). - Seller receives 95% **instantly** via their Lightning Address.' operationId: buy_offer_offers_buy_post parameters: - name: authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BuyOfferRequest' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: [] /offers/my: get: tags: - Marketplace summary: My Offers description: List all offers created by the authenticated seller, with sales stats. operationId: my_offers_offers_my_get parameters: - name: authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: [] /offers/my/purchases: get: tags: - Marketplace summary: My Offer Purchases description: 'Per-purchase records for the authenticated seller''s own offers — buyer_input, fulfillment status, and enough to correlate a settled sale with the seller''s own delivery pipeline. Added 2026-09-08 per a real external seller''s scoped ask (BlueHorseShoe, a Lightning node analysis API whose report needs a per-purchase node pubkey): /offers/my only ever exposed aggregate sold_count/total_earned_sats, with no way for a seller to retrieve which specific purchases happened or what buyer-supplied input came with each one. Seller polling (not webhooks) by design, per the same conversation — `since` (unix seconds, purchased_at > since) is the intended polling cursor; a GET is naturally idempotent to call repeatedly. Never returns the buyer''s raw api_key — only the same privacy-preserving buyer_public_id already used in public sale events.' operationId: my_offer_purchases_offers_my_purchases_get parameters: - name: offer_id in: query required: false schema: anyOf: - type: string - type: 'null' title: Offer Id - name: since in: query required: false schema: anyOf: - type: integer - type: 'null' title: Since - name: fulfilled in: query required: false schema: anyOf: - type: boolean - type: 'null' title: Fulfilled - name: authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: [] /offers/my/purchases/{purchase_id}/fulfill: post: tags: - Marketplace summary: Fulfill Purchase description: 'Mark a purchase fulfilled with a buyer-visible delivery reference (a report URL, an expiring link, an order confirmation id — whatever the seller''s own delivery mechanism returns). Idempotent by design (per the same real seller ask this endpoint was built from): calling this again on an already-fulfilled purchase simply updates fulfillment_ref and fulfilled_at rather than erroring — a seller''s retry after an ambiguous response should never need special-casing. Only the offer''s own authenticated seller may fulfil one of their purchases.' operationId: fulfill_purchase_offers_my_purchases__purchase_id__fulfill_post parameters: - name: purchase_id in: path required: true schema: type: string title: Purchase Id - name: authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/FulfillPurchaseRequest' responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' security: [] /marketplace: get: tags: - Marketplace summary: Marketplace Ui description: Human-readable marketplace UI — browse offers, list services, buy instantly. operationId: marketplace_ui_marketplace_get responses: '200': description: Successful Response content: text/html: schema: type: string security: [] components: schemas: ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError CreateOfferRequest: properties: seller_id: type: string maxLength: 100 minLength: 1 title: Seller Id ln_address: type: string title: Ln Address description: Lightning address (user@domain.com) to receive 95% payouts title: type: string maxLength: 120 minLength: 3 title: Title description: type: string maxLength: 2000 minLength: 10 title: Description price_sats: type: integer title: Price Sats description: Price in sats (buyer pays this) category: type: string maxLength: 50 title: Category default: agent content_file: anyOf: - type: string - type: 'null' title: Content File description: Filename in /content/ to deliver on purchase (Waternova) preview_text: anyOf: - type: string maxLength: 280 - type: 'null' title: Preview Text description: Short teaser displayed on marketplace cards thumbnail_url: anyOf: - type: string maxLength: 500 - type: 'null' title: Thumbnail Url description: Optional HTTPS thumbnail/preview image URL eligibility_url: anyOf: - type: string maxLength: 500 - type: 'null' title: Eligibility Url description: Optional HTTPS server-to-server endpoint we call BEFORE charging the buyer or paying you, to confirm this specific purchase is sellable (e.g. real-time inventory tied to buyer_input). Only an ACCEPT response authorizes the charge; REJECT, a timeout, or any non-2xx/invalid response refuses the purchase with nothing charged. See docs for the exact request/response contract. eligibility_bearer: anyOf: - type: string maxLength: 500 - type: 'null' title: Eligibility Bearer description: Bearer credential we send as Authorization on the eligibility_url call. Stored server-side only -- never returned by any endpoint, including your own /offers/my. type: object required: - seller_id - ln_address - title - description - price_sats title: CreateOfferRequest BuyOfferRequest: properties: offer_id: type: string minLength: 1 title: Offer Id verify_before_buy: type: boolean title: Verify Before Buy description: Run a neutral /review verdict on this offer BEFORE charging; a reject blocks the purchase (no sats spent). default: false intent: anyOf: - type: string - type: 'null' title: Intent description: What you intend to use this offer for — context for the verification gate (optional). buyer_input: anyOf: - type: string maxLength: 500 - type: 'null' title: Buyer Input description: Optional buyer-supplied data the seller needs to fulfil this specific purchase (e.g. a Lightning node pubkey for a node-analysis report). Passed through opaquely — never validated or interpreted by the platform — and surfaced to the seller via GET /offers/my/purchases. Do not put credentials, private keys, or seed phrases here. type: object required: - offer_id title: BuyOfferRequest FulfillPurchaseRequest: properties: fulfillment_ref: type: string maxLength: 500 minLength: 1 title: Fulfillment Ref description: A buyer-visible report reference or expiring delivery URL for this purchase. type: object required: - fulfillment_ref title: FulfillPurchaseRequest