{"openapi":"3.1.0","info":{"title":"Agent Deals","version":"1.0.0","description":"Helps AI agents pay less for x402 services: find the cheapest working service for a task, and check any service's uptime, real price and cheaper alternatives before paying."},"servers":[{"url":"https://agent-deals.gm-tools.workers.dev"}],"paths":{"/v1/best":{"get":{"operationId":"bestService","summary":"Cheapest working x402 service for a task","parameters":[{"name":"task","in":"query","required":true,"schema":{"type":"string"}},{"name":"max_price_usd","in":"query","schema":{"type":"number"}},{"name":"network","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":10}}],"x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"network":"eip155:8453"},"responses":{"200":{"description":"Ranked services"},"402":{"description":"Payment required (or use X-Free-Tier: 1)"}}}},"/v1/preflight":{"post":{"operationId":"preflightPayment","summary":"Free: GO / CAUTION / STOP before paying an x402 service (working? fair price? safe wallet?)","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"The service you're about to pay (optional when payment_required names it)"},"method":{"type":"string","default":"GET"},"payment_required":{"description":"The PAYMENT-REQUIRED header value the service sent (base64), or its decoded JSON / 402 body"},"price_usd":{"type":"number","description":"Price asked, if you don't pass payment_required"},"pay_to":{"type":"string","description":"Wallet you're asked to pay, if you don't pass payment_required"},"max_price_usd":{"type":"number","description":"Optional: STOP when the price is above this"}}}}}},"responses":{"200":{"description":"verdict (go | caution | stop), summary, findings, price and wallet details"}}},"get":{"operationId":"preflightPaymentGet","summary":"Free: the same preflight with query parameters","security":[],"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"}},{"name":"method","in":"query","schema":{"type":"string","default":"GET"}},{"name":"price_usd","in":"query","schema":{"type":"number"}},{"name":"pay_to","in":"query","schema":{"type":"string"}},{"name":"max_price_usd","in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"verdict (go | caution | stop), summary, findings, price and wallet details"}}}},"/v1/check":{"get":{"operationId":"checkService","summary":"Free: is this x402 service up, is its price right, is there a cheaper similar one?","security":[],"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","format":"uri"}},{"name":"method","in":"query","schema":{"type":"string","default":"GET"}}],"responses":{"200":{"description":"Health, price and alternatives"}}}}}}