{"openapi":"3.1.0","info":{"title":"Penny Engine M2M Paid Services","version":"0.7.1","description":"Rank up to 50 ecommerce pricing scenarios per request, paid in USDC on Base via x402. Service is unavailable until payment recipient configured.","x-guidance":"For repeated agent workflows: inspect the exact input schema, run the free demo or preflight, and use an x402-compatible buyer wallet to authorize a $0.001 USDC call on Base. Never share wallet credentials. A 402 quote is not proof of settlement."},"servers":[{"url":"https://penny-paid-batch-production.up.railway.app"}],"paths":{"/api/fulfill":{"post":{"operationId":"m2m_unified_fulfillment","summary":"One x402 purchase completes catalog audit or multi-agent output QA with reports","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"goal":{"type":"string","enum":["catalog-csv-audit","agent-output-batch-qa"]},"input":{"type":"object","properties":{"csv":{"type":"string"},"targetMarginPct":{"type":"number"},"jobs":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","properties":{"id":{"type":"string"},"result":{},"expectations":{"type":"object"}},"required":["id","result","expectations"]}}}}},"required":["goal","input"]},"example":{"goal":"catalog-csv-audit","input":{"csv":"sku,name,price,cost,shippingCost,feePct\nS1,Sample Notebook,24,10,3,10\nS2,Sample Bottle,18,8,2,10","targetMarginPct":25}}}}},"responses":{"200":{"description":"Validated three-step fulfillment outcome"},"400":{"description":"Invalid or unsupported input"},"402":{"description":"Payment Required (x402 Base USDC)"},"503":{"description":"Internal tool unavailable"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"security":[]}},"/api/proof-gate":{"post":{"operationId":"m2m_agent_outcome_guard","summary":"Validate a machine result against JSON assertions and return an integrity fingerprint","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"result":{},"expectations":{"type":"object"}},"required":["result","expectations"]},"example":{"result":{"status":"completed","items":[{"id":"A1","priceUsd":12.5}],"processed":1,"source":"inventory-import"},"expectations":{"requiredPaths":["status","items.0.id"],"equals":{"status":"completed"},"nonEmptyPaths":["source"],"numberRanges":{"processed":{"min":1,"max":100}}}}}}},"responses":{"200":{"description":"Machine outcome report, pass or fail"},"400":{"description":"Malformed rules"},"402":{"description":"Payment Required (x402 Base USDC)"},"503":{"description":"Payment receiver unavailable"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"security":[]}},"/api/market-demand":{"get":{"operationId":"penny_market_demand","summary":"Source-reported onchain market demand","responses":{"200":{"description":"Seller settlement and buyer-diversity analysis"},"402":{"description":"Payment Required (x402 Base USDC)"},"503":{"description":"Upstream unavailable"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"security":[]}},"/api/route-plan":{"get":{"operationId":"penny_route_plan","summary":"Find machine service routes and compare catalog prices","parameters":[{"name":"task","in":"query","required":true,"schema":{"type":"string","minLength":4,"maxLength":160}}],"responses":{"200":{"description":"Route comparison, no purchase"},"400":{"description":"Invalid task"},"402":{"description":"Payment Required (x402 Base USDC)"},"503":{"description":"Upstream unavailable"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"security":[]}},"/api/base-network":{"get":{"operationId":"penny_base_network_snapshot","summary":"Get Base gas price, current block and illustrative transaction gas fee estimates","description":"Real-time public Base JSON-RPC summary for automated payment and trading workflows, paid at $0.001 USDC via x402.","responses":{"200":{"description":"Live network snapshot"},"402":{"description":"Payment Required (x402 Base USDC)"},"503":{"description":"RPC not available"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"security":[]}},"/ping":{"get":{"operationId":"penny_x402_ping","summary":"Paid x402 payment compatibility diagnostic","description":"One payment protected request on Base for 0.001 USDC.","responses":{"200":{"description":"Payment-protected result"},"402":{"description":"Payment Required (x402 Base USDC)"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"security":[]}},"/api/base-wallet":{"get":{"operationId":"penny_base_wallet_snapshot","summary":"Paid Base wallet USDC balance, ETH balance and block number","description":"Requires x402 payment of 0.001 USDC. Public blockchain data only.","parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}],"responses":{"200":{"description":"On-chain wallet snapshot"},"400":{"description":"Invalid public wallet address"},"402":{"description":"Payment Required (x402 Base USDC)"},"503":{"description":"RPC unavailable"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"security":[]}},"/api/price-batch":{"post":{"summary":"Analyze up to 50 ecommerce pricing scenarios","operationId":"penny_price_batch","description":"Submit user-provided price, cost, shipping, feePct, ads, other. Charged $0.001 USDC when enabled.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scenarios":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","properties":{"id":{"type":"string"},"price":{"type":"number"},"cost":{"type":"number"},"shipping":{"type":"number"},"feePct":{"type":"number"},"ads":{"type":"number"},"other":{"type":"number"}},"required":["price","cost"]}},"targetMarginPct":{"type":"number"}},"required":["scenarios"]},"example":{"scenarios":[{"id":"plan-A","price":24,"cost":9,"shipping":4,"feePct":12,"ads":1},{"id":"plan-B","price":29,"cost":11,"shipping":5,"feePct":12,"ads":2}],"targetMarginPct":25}}}},"responses":{"200":{"description":"Paid analysis after settlement"},"400":{"description":"Bad request"},"402":{"description":"Payment Required (x402 Base USDC)"},"503":{"description":"Payment receiver not configured"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"security":[]}}}}