{"openapi":"3.1.0","info":{"title":"Vangrid data API for agents","version":"1.0.0","description":"Ground-level captures of the physical world, anchored on Base, and bounties that send a person to capture a place. Paid per call in USDC over x402 on Base (eip155:8453) and Arc (eip155:5042); no account, no API key. Free provenance check.","contact":{"name":"Vangrid","url":"https://vangrid.io","email":"hello@vangrid.io"},"x-guidance":"Two things an agent can do here. (1) Query captures that already exist: POST /api/v1/spatial/query with a GeoJSON Point (+ radius_m) or Polygon and a time window, or GET /api/v1/observations/{id} by sha256. Every observation carries a coarse geohash, the capture time and an EAS attestation on Base. (2) Commission a new capture: POST /api/v1/bounties with a title, a brief, amount_usdc and deadline_days; the payment is the bounty amount and settles upfront; keep the returned agent_token, poll GET /api/v1/bounties/{id} until submissions appear (a human has to go and film, so hours or days), review preview_url links, then POST .../accept with one submission_id to receive the 3D model links; cancel or let it expire and the USDC comes back to the paying wallet on the network it was paid on. Payments: x402 v2 exact scheme, USDC, networks listed in each 402. On Arc the USDC asset is 0x3600000000000000000000000000000000000000 and has to be allowed in the client (spendControls.allowedAssets). Docs: https://docs.vangrid.io/api/agent-bounties"},"servers":[{"url":"https://data.vangrid.io"}],"tags":[{"name":"data","description":"Anchored capture data"},{"name":"bounties","description":"Commission a capture"}],"paths":{"/api/v1/spatial/query":{"post":{"operationId":"spatialQuery","tags":["data"],"summary":"Captures inside an area and time window","description":"Returns anchored observations inside a GeoJSON Point (with radius_m) or Polygon, newest first. Empty result is 200 with an empty array.","x-payment-info":{"protocols":[{"x402":{"version":2,"scheme":"exact"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"payTo":"0x1a8b69A1338C6E829E1Ced4c3007C79E945E4E70","networks":[{"network":"eip155:8453","name":"Base","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","symbol":"USDC"},{"network":"eip155:5042","name":"Arc","asset":"0x3600000000000000000000000000000000000000","symbol":"USDC"}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["aoi"],"properties":{"aoi":{"type":"object","description":"GeoJSON Point or Polygon (bbox at most 100 km²)","properties":{"type":{"type":"string","enum":["Point","Polygon"]},"coordinates":{}}},"radius_m":{"type":"number","minimum":1,"maximum":5000,"default":500},"from":{"type":"string","description":"ISO 8601, default 7 days before to"},"to":{"type":"string","description":"ISO 8601, default now"},"limit":{"type":"integer","minimum":1,"maximum":1000,"default":100}}},"example":{"aoi":{"type":"Point","coordinates":[139.7671,35.6812]},"radius_m":1000,"limit":100}}}},"responses":{"402":{"description":"Payment required. The PAYMENT-REQUIRED header (base64 JSON, x402 v2) lists the accepted networks, the USDC amount and the payTo address; retry with PAYMENT-SIGNATURE.","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"base64-encoded x402 PaymentRequired"}}}},"security":[{"x402":[]}]}},"/api/v1/observations/{id}":{"get":{"operationId":"getObservation","tags":["data"],"summary":"One anchored capture by sha256","x-payment-info":{"protocols":[{"x402":{"version":2,"scheme":"exact"}}],"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"payTo":"0x1a8b69A1338C6E829E1Ced4c3007C79E945E4E70","networks":[{"network":"eip155:8453","name":"Base","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","symbol":"USDC"},{"network":"eip155:5042","name":"Arc","asset":"0x3600000000000000000000000000000000000000","symbol":"USDC"}]},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^(0x)?[0-9a-fA-F]{64}$","description":"sha256 of a capture, hex"},"example":"cf9642dae244a213bc9c0e6d325a84be44fe8fd1f57d9b362c64493769b74a48"}],"responses":{"402":{"description":"Payment required. The PAYMENT-REQUIRED header (base64 JSON, x402 v2) lists the accepted networks, the USDC amount and the payTo address; retry with PAYMENT-SIGNATURE.","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"base64-encoded x402 PaymentRequired"}}}},"security":[{"x402":[]}]}},"/api/v1/provenance/{hash}":{"get":{"operationId":"verifyProvenance","tags":["data"],"summary":"Is this sha256 a capture anchored on Base (free)","parameters":[{"name":"hash","in":"path","required":true,"schema":{"type":"string","pattern":"^(0x)?[0-9a-fA-F]{64}$","description":"sha256 of a capture, hex"},"example":"cf9642dae244a213bc9c0e6d325a84be44fe8fd1f57d9b362c64493769b74a48"}],"responses":{"200":{"description":"verified true with anchor, or verified false","content":{"application/json":{"schema":{"type":"object","properties":{"provenance_hash":{"type":"string"},"verified":{"type":"boolean"},"captured_at":{"type":"string"},"geohash":{"type":"string"},"anchor":{"type":"object","properties":{"chain_id":{"type":"integer"},"tree_id":{"type":"integer"},"leaf_hash":{"type":"string"},"root":{"type":"string"},"attest_uid":{"type":"string","description":"EAS attestation uid on Base"},"attest_tx":{"type":"string"},"eas_url":{"type":"string"},"viewer_url":{"type":"string"}}}}}}}}},"security":[]}},"/api/v1/bounties":{"post":{"operationId":"postBounty","tags":["bounties"],"summary":"Commission a capture of a real place","description":"The price of this call is the bounty amount (amount_usdc), settled upfront. Returns bounty_id and a one-time agent_token for the other bounty calls.","x-payment-info":{"protocols":[{"x402":{"version":2,"scheme":"exact"}}],"price":{"mode":"dynamic","currency":"USD","min":"50","max":"5000","note":"equals amount_usdc in the request body"},"payTo":"0x1a8b69A1338C6E829E1Ced4c3007C79E945E4E70","networks":[{"network":"eip155:8453","name":"Base","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","symbol":"USDC"},{"network":"eip155:5042","name":"Arc","asset":"0x3600000000000000000000000000000000000000","symbol":"USDC"}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title","brief","amount_usdc"],"properties":{"title":{"type":"string","minLength":3,"maxLength":200},"brief":{"type":"string","minLength":20,"maxLength":4000,"description":"What to film, where exactly, what must be in frame"},"amount_usdc":{"type":"integer","minimum":50,"maximum":5000},"deadline_days":{"type":"integer","minimum":1,"maximum":30,"default":7}}},"example":{"title":"Loading dock, east side","brief":"Walk the full length of the east loading dock at ground level, both directions, daylight. Include the ramp and the two roller doors.","amount_usdc":200,"deadline_days":7}}}},"responses":{"402":{"description":"Payment required. The PAYMENT-REQUIRED header (base64 JSON, x402 v2) lists the accepted networks, the USDC amount and the payTo address; retry with PAYMENT-SIGNATURE.","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"},"description":"base64-encoded x402 PaymentRequired"}}}},"security":[{"x402":[]}]}},"/api/v1/bounties/{id}":{"get":{"operationId":"getBounty","tags":["bounties"],"summary":"Status, submissions with preview links, model links after accept (free, bearer agent_token)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"cmufahx1e00002egi0d1um822"}],"responses":{"200":{"description":"Bounty","content":{"application/json":{"schema":{"type":"object","properties":{"bounty_id":{"type":"string"},"status":{"type":"string","enum":["paid","creating","open","accepting","accepted","cancelling","cancelled","expired","expired_refunded","failed"]},"amount_usdc":{"type":"integer"},"deadline":{"type":"string"},"title":{"type":"string"},"brief":{"type":"string"},"onchain_id":{"type":["integer","null"]},"board_url":{"type":["string","null"]},"payer":{"type":"string"},"network":{"type":"string"},"payment_tx":{"type":["string","null"]},"create_tx":{"type":["string","null"]},"accept_tx":{"type":["string","null"]},"cancel_tx":{"type":["string","null"]},"refund_tx":{"type":["string","null"]},"payout_tx":{"type":["string","null"]},"poll_url":{"type":"string"},"submissions":{"type":"array","items":{"type":"object","properties":{"submission_id":{"type":"string"},"submitted_at":{"type":"string"},"note":{"type":["string","null"]},"preview_status":{"type":"string"},"quality_status":{"type":"string"},"reconstruction_status":{"type":"string"},"preview_url":{"type":["string","null"],"description":"Signed link, valid 15 minutes"},"accepted":{"type":"boolean"},"full_capture_url":{"type":["string","null"]},"model_glb_url":{"type":["string","null"]},"model_zip_url":{"type":["string","null"]}}}}}}}}},"401":{"description":"bounty id and token do not match"}},"security":[{"agentToken":[]}]}},"/api/v1/bounties/{id}/accept":{"post":{"operationId":"acceptSubmission","tags":["bounties"],"summary":"Accept one submission; escrow released, reconstruction starts (free, bearer agent_token)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"cmufahx1e00002egi0d1um822"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["submission_id"],"properties":{"submission_id":{"type":"string"}}}}}},"responses":{"202":{"description":"accepting"},"404":{"description":"no such submission"},"409":{"description":"not_open or deadline_passed"}},"security":[{"agentToken":[]}]}},"/api/v1/bounties/{id}/cancel":{"post":{"operationId":"cancelBounty","tags":["bounties"],"summary":"Cancel while open; USDC returns to the paying wallet (free, bearer agent_token)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"cmufahx1e00002egi0d1um822"}],"responses":{"202":{"description":"cancelling"},"409":{"description":"not_open"}},"security":[{"agentToken":[]}]}}},"components":{"securitySchemes":{"x402":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 v2 payment. Call without the header, read the payment requirements off the 402 response (PAYMENT-REQUIRED header, base64 JSON), sign an exact USDC authorization for one of the advertised networks, and retry with the signature in this header."},"agentToken":{"type":"http","scheme":"bearer","description":"agent_token returned by POST /api/v1/bounties"}}}}