{"uid":"cap_Hw0bQVlS22aTG2jK_0fJV","slug":"writerslogic-svg-geometry-validator-d099ca6b","name":"WritersLogic SVG Geometry Validator","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/svg-geometry?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"width":{"type":"number","maximum":10000000,"minimum":0.001,"description":"Viewport width in px (the svg width attribute)."},"checks":{"type":"array","items":{"enum":["clip","empty","overlap"],"type":"string"},"maxItems":3,"description":"Subset of clip, empty, overlap; default all. Overlap reports partial overlaps only; a shape fully inside another (a label on a card) is listed as nested and never fails."},"height":{"type":"number","maximum":10000000,"minimum":0.001,"description":"Viewport height in px."},"shapes":{"type":"array","items":{"type":"object","required":["type"],"properties":{"r":{"type":"number","maximum":1000000000,"minimum":-1000000000},"x":{"type":"number","maximum":1000000000,"minimum":-1000000000},"y":{"type":"number","maximum":1000000000,"minimum":-1000000000},"cx":{"type":"number","maximum":1000000000,"minimum":-1000000000},"cy":{"type":"number","maximum":1000000000,"minimum":-1000000000},"id":{"type":"string","maxLength":80},"rx":{"type":"number","maximum":1000000000,"minimum":-1000000000},"ry":{"type":"number","maximum":1000000000,"minimum":-1000000000},"x1":{"type":"number","maximum":1000000000,"minimum":-1000000000},"x2":{"type":"number","maximum":1000000000,"minimum":-1000000000},"y1":{"type":"number","maximum":1000000000,"minimum":-1000000000},"y2":{"type":"number","maximum":1000000000,"minimum":-1000000000},"bbox":{"type":"array","items":{"type":"number","maximum":1000000000,"minimum":-1000000000},"maxItems":4,"minItems":4},"text":{"type":"string","maxLength":500},"type":{"enum":["rect","circle","ellipse","line","polygon","polyline","text","bbox"],"type":"string"},"width":{"type":"number","maximum":1000000000,"minimum":-1000000000},"height":{"type":"number","maximum":1000000000,"minimum":-1000000000},"points":{"type":"array","items":{"type":"array","items":{"type":"number","maximum":1000000000,"minimum":-1000000000},"maxItems":2,"minItems":2},"maxItems":200},"fontSize":{"type":"number","maximum":100000,"minimum":0},"textAnchor":{"enum":["start","middle","end"],"type":"string"},"strokeWidth":{"type":"number","maximum":1000000,"minimum":0}},"additionalProperties":false},"maxItems":200,"minItems":1,"description":"Shapes in user coordinates (no transform). rect: x,y,width,height. circle: cx,cy,r. ellipse: cx,cy,rx,ry. line: x1,y1,x2,y2,strokeWidth. polygon/polyline: points. text: x,y,text,fontSize,textAnchor. bbox: bbox [minX,minY,maxX,maxY] for a path you measured yourself."},"viewBox":{"type":"string","maxLength":120,"description":"The viewBox attribute value, e.g. \"0 0 800 600\"."},"preserveAspectRatio":{"type":"string","maxLength":40,"description":"Default xMidYMid meet."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_zb_Mh_NjBDFCNtsrrjHki","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates up to 200 described SVG shapes against a viewport/viewBox for clipping, empty-render, and overlap issues without parsing markup or rendering","exampleAgentPrompt":"Can you check these 5 SVG shapes — a rect at x=10 y=10 width=200 height=100, a circle at cx=300 cy=150 r=50, and three more — against a 400×300 viewport with a viewBox of '0 0 400 300' for clipping and overlap issues?","exampleUseCases":[{"title":"Validate AI-generated chart layout","prompt":"I just generated an SVG bar chart with 12 rect elements and a few text labels; the viewport is 800×600 with viewBox '0 0 800 600' — can you check all the shapes for clipping or empty-size issues before I render it?"},{"title":"Detect overlapping icon shapes","prompt":"I'm building an SVG icon with a 24×24 viewport and viewBox '0 0 24 24'; it has a circle at cx=12 cy=12 r=10 and a polygon with points [[2,2],[22,2],[12,20]] — can you check for partial overlaps between those shapes?"},{"title":"Catch zero-size elements in diagram","prompt":"My diagram generator created an SVG with a 1920×1080 viewport and viewBox '0 0 1920 1080' containing 30 shapes including some lines and ellipses — please run the empty check to find any shapes that would render nothing due to zero or negative dimensions."}],"resultDescription":"A structured report listing each shape by ID with findings per requested check type (clip, empty, overlap). Each finding is classified as pass, fail, nested, or unknown. Unknown is returned when the result depends on estimated bounding boxes (e.g. text boxes, polygons, ellipses) rather than exact geometry. Also reports viewBox validity.","failureModes":["Exceeding 200 shapes limit returns a validation error","Invalid or missing shape type enum causes rejection","Viewport width or height outside 0.001–10,000,000 range returns error","Text bounding box checks always yield 'unknown' due to lack of font metrics","Polygon/polyline overlap and clip results may yield 'unknown' rather than definitive pass/fail","Path data and SVG markup cannot be parsed — only pre-computed bounding boxes accepted","Transforms, CSS, and clip-paths are ignored, so results may differ from actual renderer output"],"whenToPreferThis":"Use this endpoint when an AI agent is generating SVG diagrams, charts, icons, or illustrations and needs to verify geometric correctness before delivering output — specifically to catch shapes clipped by the viewport, shapes that would render as invisible, or unintended overlaps. Prefer this over manual review or full SVG rendering when you have shape geometry available as structured coordinates rather than markup, and you need a fast, cheap, deterministic check without spinning up a browser or renderer.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-22T18:35:31.426Z","isFirstParty":false,"canonicalSlug":"writerslogic-svg-geometry-validator-d099ca6b"}