{"openapi":"3.1.0","info":{"title":"genartx402 – x402 generative art","version":"1.0.0","description":"Buy unique generative artworks with x402 v2. Payment options: 0.10 USDC on Base Sepolia (eip155:84532). Unpaid requests receive HTTP 402 with a base64 JSON PAYMENT-REQUIRED header; retry with a PAYMENT-SIGNATURE header.","license":{"name":"AGPL-3.0-only"}},"servers":[{"url":"https://genartx402.0xmintmedia.com"}],"paths":{"/.well-known/agent-card.json":{"get":{"summary":"Free public A2A v1.0 discovery Agent Card","description":"Declares one discovery skill and a JSON-RPC interface. The A2A endpoint returns connection information; paid artwork generation remains on the native x402 HTTP/MCP interfaces.","responses":{"200":{"description":"Agent Card JSON; ETag and five-minute public caching"},"304":{"description":"Card unchanged"}}}},"/a2a":{"post":{"summary":"Free A2A v1.0 JSON-RPC storefront discovery","description":"SendMessage returns a standalone Message with public payment hints and HTTP/MCP URLs. Requires A2A-Version: 1.0. No purchases, tasks, streaming, push notifications or a2a-x402 payment extension.","parameters":[{"name":"A2A-Version","in":"header","required":true,"schema":{"type":"string","const":"1.0"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"JSON-RPC result or protocol error"},"413":{"description":"Request exceeds 64 KiB"},"415":{"description":"Use application/json"}}}},"/.well-known/did.json":{"get":{"summary":"Public did:web receipt verification keys","description":"Current and retained historical Ed25519 public keys; no private signing material. Available after JWS receipts have been enabled.","responses":{"200":{"description":"DID document","content":{"application/did+ld+json":{"schema":{"type":"object"}}}},"404":{"description":"No JWS identity has been configured"}}}},"/api/art":{"get":{"summary":"Buy one artwork (x402 exact scheme)","x-x402":{"version":2,"accepts":[{"scheme":"exact","network":"eip155:84532","payTo":"0xE46966dD348AfC4Df1d1f5422Fa7F6FF230bd91E","price":{"asset":"0x036CbD53842c5426634e7929541eC2318f3dCF7e","amount":"100000","extra":{"name":"USDC","version":"2","assetTransferMethod":"permit2","decimals":6,"symbol":"USDC","currency":"USD"}},"maxTimeoutSeconds":120,"amount":"100000","asset":"0x036CbD53842c5426634e7929541eC2318f3dCF7e","currency":"USD","symbol":"USDC"}],"extensions":["bazaar","payment-identifier","offer-receipt","eip2612GasSponsoring"]},"parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json","svg","png"]},"description":"Explicit representation. PNG is 1024 × 1024; do not combine with view=html."},{"name":"flow","in":"query","required":false,"schema":{"type":"string","enum":["authorization","upfront"],"default":"authorization"},"description":"authorization: verify → generate → settle; upfront: settle → generate. Upfront payment is committed before generation."},{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"type":"string"},"description":"base64 JSON x402 PaymentPayload"},{"name":"view","in":"query","required":false,"schema":{"type":"string","enum":["html"]},"description":"Return an HTML receipt page (used by the browser paywall)"}],"responses":{"200":{"description":"Artwork. JSON by default, raw SVG with Accept: image/svg+xml, PNG with ?format=png or Accept: image/png. Settlement details in the PAYMENT-RESPONSE header.","headers":{"PAYMENT-RESPONSE":{"schema":{"type":"string"},"description":"base64 JSON SettleResponse"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"svg":{"type":"string"},"url":{"type":"string"},"pngUrl":{"type":"string"},"seed":{"type":"string"},"meta":{"type":"object"},"payment":{"type":"object"}}}},"image/svg+xml":{"schema":{"type":"string"}},"image/png":{"schema":{"type":"string","contentEncoding":"binary"}}}},"400":{"description":"Unknown, repeated or conflicting flow/format parameter"},"402":{"description":"Payment required","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"base64 JSON PaymentRequired"}}}}}},"/api/art/series":{"get":{"summary":"Buy one artwork against a batch channel voucher","description":"Each request costs 0.05 USDC. Initial escrow deposit is at least 0.50 USDC. Subsequent requests use cumulative signed vouchers; there is no per-artwork on-chain transaction. Claims and seller payouts run in the background. Use the SDK refund() method on this URL to return unused escrow without buying art. No flow query or buyer art parameters.","x-x402":{"version":2,"accepts":[{"scheme":"batch-settlement","network":"eip155:84532","price":"$0.05","asset":"0x036CbD53842c5426634e7929541eC2318f3dCF7e","payTo":"0xE46966dD348AfC4Df1d1f5422Fa7F6FF230bd91E"}]},"responses":{"200":{"description":"Artwork, or SDK refund acknowledgement. PAYMENT-RESPONSE contains channel state and chargedAmount; transaction can be empty for off-chain vouchers."},"400":{"description":"Unsupported flow query"},"402":{"description":"Payment required, invalid voucher or corrective channel state"}}}},"/api/collection":{"get":{"summary":"List the artworks owned by the signing wallet (Sign-In-With-X, no payment)","x-x402":{"version":2,"accepts":[],"extensions":["sign-in-with-x"]},"parameters":[{"name":"SIGN-IN-WITH-X","in":"header","required":false,"schema":{"type":"string"},"description":"base64 JSON SIWX payload answering the challenge in the 402"}],"responses":{"200":{"description":"{ owner, count, items[] }"},"402":{"description":"Sign-in challenge in PAYMENT-REQUIRED (extensions.sign-in-with-x)"}}}},"/mcp":{"post":{"summary":"MCP Streamable HTTP endpoint; tool buy_art uses x402 exact","description":"MCP initialization and tools/list are free. Call buy_art with empty arguments. PaymentRequired is returned in result.structuredContent with isError=true inside HTTP 200. Retry with params._meta['x402/payment']; settlement is in result._meta['x402/payment-response']. Supports payment-identifier retries and signed offers/receipts.","responses":{"200":{"description":"JSON-RPC MCP response"},"202":{"description":"Notification accepted"},"413":{"description":"Request exceeds 1 MiB"}}}},"/art/{id}.png":{"get":{"summary":"Download an already sold artwork as 1024 × 1024 PNG (free)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{12}$"}}],"responses":{"200":{"description":"image/png"},"404":{"description":"Artwork missing or payment incomplete"},"429":{"description":"Download rate limit"}}}},"/api/purchases":{"get":{"summary":"List purchases (free)","responses":{"200":{"description":"Paginated purchases"}}}},"/api/purchases/{id}":{"get":{"summary":"Full protocol trace of one purchase (free)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Purchase detail"}}}},"/api/events":{"get":{"summary":"Live protocol events (Server-Sent Events)","responses":{"200":{"description":"text/event-stream"}}}}}}