{"uid":"cap_jyPG0qp9D5ilphIUPokW8","slug":"gcd-for-agents-8cd320d3","name":"GCD for Agents","description":"Greatest common divisor. Handy for ratio simplification, scheduling grids, or math agents without local bigint helpers. Returns GCD of two integers as structured JSON. $0.001 USDC per successful call via x402 on Base—deterministic first-party JSON, no API key, no subscription, and nothing is billed on structured validation errors.","url":"https://api.delx.ai/api/v1/x402/gcd","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"a":{"type":"integer","description":"First integer operand."},"b":{"type":"integer","description":"Second integer operand."}}},"responseSchema":{"type":"json","example":{"a":18,"b":24,"gcd":6,"schema":"delx/gcd/v1"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_rbDRqUiRTXsA7DpUVx6TI","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the greatest common divisor (GCD) of two integers and returns the result as structured JSON","exampleAgentPrompt":"What's the greatest common divisor of 144 and 60? I need it to simplify that fraction to its lowest terms.","exampleUseCases":[{"title":"Fraction simplification in data pipeline","prompt":"I need to simplify the fraction 360 over 252 — can you find the GCD of 360 and 252 so I can reduce it to lowest terms?"},{"title":"Scheduling grid alignment","prompt":"I'm trying to align two repeating tasks — one runs every 48 minutes and the other every 36 minutes. What's their GCD so I know when they'll sync up?"},{"title":"Aspect ratio reduction for image tool","prompt":"I have an image that's 1920 by 1080 pixels. Can you compute the GCD of 1920 and 1080 so I can express the aspect ratio in its simplest form?"}],"resultDescription":"Returns a structured JSON object containing the computed GCD of the two input integers. The response is deterministic — same inputs always produce the same output. No charge is incurred on structured validation errors.","failureModes":["Non-integer inputs result in a validation error with no charge","Missing required fields (a or b) trigger a structured error response","Both inputs being zero is mathematically undefined and may return an error","Overflow or out-of-range integers may not be supported depending on backend limits"],"whenToPreferThis":"Choose this endpoint when your agent needs a reliable, serverless, pay-per-call GCD computation without setting up local bigint math libraries or maintaining a math microservice. Ideal for agentic pipelines doing fraction simplification, ratio normalization, or scheduling grid calculations where a deterministic first-party JSON response is required and cost is minimal at $0.001 USDC per call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:02:33.107Z","isFirstParty":false}