{"openapi":"3.1.0","info":{"title":"Geometry Toolkit","version":"0.1.0","description":"Planar geometry — circle, rectangle and triangle metrics, polygon area/perimeter/centroid (shoelace) and point distances.","x-guidance":"Planar geometry — circle, rectangle and triangle metrics, polygon area/perimeter/centroid (shoelace) and point distances. Each operation is an HTTP POST to its /v1/<operation> path with a JSON request body (see each operation's requestBody schema) and returns a JSON response. Endpoints are paid per successful call via x402 or MPP (USDC on Base); an unpaid request returns 402 with payment metadata in the WWW-Authenticate header.","contact":{"email":"hello@openverbs.com"}},"x-discovery":{"ownershipProofs":["0xb1401a71756f51464a9962db12f1eb3e9522490cd20010b06d00cf7b7770acfd5f79721f9dfdf2643f8cecd29af3bde9ec133941a386042b32d9886053a70de61b","0xc1c1f11793e18a00fcb7072421f26e89fb75b6aa517fa84370564991f4b10efa024f6f57e4e67eefd20cf46cc01fc5a62d793fa8fbcda04f26c946a3433d73f91b","0x676b474af0ef9ed4809b5d12d2e789b36e52d56215b21f601d71f76620e36ec630347116a7b2b349a3c3681e5db0fbfa76c4169a676b6d6f27864d0e5017284a1c","0xc2ab96522515ed9e9bc4f1a241b774bd48df42e951ddbf7f6aa8fc76f5a96a20421703e1ec402ce7eb1e4eabea3b6e4e4129cf39d56ea91cf4fcf38561fc94fc1c"]},"servers":[{"url":"https://geometry.openverbs.com"}],"paths":{"/health":{"get":{"summary":"Health check","security":[],"responses":{"200":{"description":"Healthy","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"service":{"type":"string"},"version":{"type":"string"}}}}}}}}},"/v1/circle":{"post":{"summary":"Circle","description":"Diameter, circumference and area of a circle from its radius. Paid endpoint (x402 + MPP). Price: $0.004000 USDC per successful payment.","tags":["circle area calculator","calculate circumference","radius to diameter","circle geometry api","area of circle","circle metrics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"radius":{"type":"number","exclusiveMinimum":0,"description":"Circle radius."}},"required":["radius"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ radius, diameter, circumference, area }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ radius, diameter, circumference, area }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Diameter, circumference and area of a circle from its radius.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.004000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"4000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Diameter, circumference and area of a circle from its radius.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Diameter, circumference and area of a circle from its radius.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/rectangle":{"post":{"summary":"Rectangle","description":"Area, perimeter and diagonal of a rectangle from its width and height. Paid endpoint (x402 + MPP). Price: $0.004000 USDC per successful payment.","tags":["rectangle area calculator","calculate rectangle perimeter","rectangle diagonal","width height geometry","area of rectangle","rectangle metrics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"description":"Rectangle width."},"height":{"type":"number","exclusiveMinimum":0,"description":"Rectangle height."}},"required":["width","height"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ width, height, area, perimeter, diagonal }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ width, height, area, perimeter, diagonal }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Area, perimeter and diagonal of a rectangle from its width and height.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.004000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"4000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Area, perimeter and diagonal of a rectangle from its width and height.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Area, perimeter and diagonal of a rectangle from its width and height.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/triangle":{"post":{"summary":"Triangle (SSS)","description":"Area (Heron's formula), perimeter and interior angles of a triangle from its three side lengths. Sides that violate the triangle inequality are rejected as a clean 400. Paid endpoint (x402 + MPP). Price: $0.004000 USDC per successful payment.","tags":["triangle area calculator","herons formula","triangle side lengths","calculate triangle angles","triangle inequality validation","sss triangle metrics"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"a":{"type":"number","exclusiveMinimum":0,"description":"Side a."},"b":{"type":"number","exclusiveMinimum":0,"description":"Side b."},"c":{"type":"number","exclusiveMinimum":0,"description":"Side c."}},"required":["a","b","c"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ sides, perimeter, area, angles: { A, B, C } }` (degrees).","content":{"application/json":{"schema":{"type":"object","description":"`{ sides, perimeter, area, angles: { A, B, C } }` (degrees)."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Area (Heron's formula), perimeter and interior angles of a triangle from its three side lengths. Sides that violate the triangle inequality are rejected as a clean 400.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.004000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"4000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Area (Heron's formula), perimeter and interior angles of a triangle from its three side lengths. Sides that violate the triangle inequality are rejected as a clean 400.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Area (Heron's formula), perimeter and interior angles of a triangle from its three side lengths. Sides that violate the triangle inequality are rejected as a clean 400.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/polygon":{"post":{"summary":"Polygon","description":"Area (shoelace formula), perimeter and centroid of a simple polygon given its vertices in order. Vertices are treated as a closed ring (last connects to first). Paid endpoint (x402 + MPP). Price: $0.004000 USDC per successful payment.","tags":["polygon area calculator","shoelace formula","polygon centroid","calculate polygon perimeter","vertices to area","area of polygon"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"points":{"type":"array","minItems":3,"maxItems":10000,"items":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2},"description":"Vertices as [x, y] pairs, in order."}},"required":["points"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ vertices, area, perimeter, centroid: [x, y] }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ vertices, area, perimeter, centroid: [x, y] }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Area (shoelace formula), perimeter and centroid of a simple polygon given its vertices in order. Vertices are treated as a closed ring (last connects to first).","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.004000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"4000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Area (shoelace formula), perimeter and centroid of a simple polygon given its vertices in order. Vertices are treated as a closed ring (last connects to first).","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Area (shoelace formula), perimeter and centroid of a simple polygon given its vertices in order. Vertices are treated as a closed ring (last connects to first).","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}},"/v1/distance":{"post":{"summary":"Point distance","description":"Euclidean, Manhattan and Chebyshev distance between two 2-D points. Paid endpoint (x402 + MPP). Price: $0.004000 USDC per successful payment.","tags":["point distance calculator","euclidean distance","manhattan distance","chebyshev distance","distance between points","2d point distance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2,"description":"Start point [x, y]."},"to":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2,"description":"End point [x, y]."}},"required":["from","to"],"additionalProperties":false}}}},"responses":{"200":{"description":"`{ euclidean, manhattan, chebyshev }`.","content":{"application/json":{"schema":{"type":"object","description":"`{ euclidean, manhattan, chebyshev }`."}}}},"400":{"description":"Invalid request; no payment is attempted"},"402":{"description":"Payment required; x402/MPP metadata returned in headers"},"502":{"description":"Upstream provider error after payment verification"}},"x-payment-info":{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Euclidean, Manhattan and Chebyshev distance between two 2-D points.","method":"tempo","preferredOffer":"mpp-tempo","price":{"mode":"fixed","currency":"USD","amount":"0.004000"},"protocols":[{"x402":{"scheme":"exact","network":"eip155:8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"evm","intent":"charge","network":"8453","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}},{"mpp":{"method":"tempo","intent":"charge","network":"4217","currency":"0x20c000000000000000000000b9537d11c60e8b50","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}}],"network":"4217","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A","offers":[{"amount":"4000","currency":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Euclidean, Manhattan and Chebyshev distance between two 2-D points.","intent":"charge","method":"evm","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"},{"amount":"4000","currency":"0x20c000000000000000000000b9537d11c60e8b50","description":"Euclidean, Manhattan and Chebyshev distance between two 2-D points.","intent":"charge","method":"tempo","recipient":"0xb3f4de103F34b99f0Da19B4F16D6B53a14C2194A"}]}}}},"x-service-info":{"categories":["compute"],"docs":{"homepage":"https://geometry.openverbs.com","apiReference":"https://geometry.openverbs.com/openapi.json"}}}