# GCD for Agents

> GCD for Agents is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Computes the greatest common divisor (GCD) of two integers and returns the result as structured JSON

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/gcd
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gcd-for-agents-8cd320d3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jyPG0qp9D5ilphIUPokW8

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability gcd-for-agents-8cd320d3 -d '<json body>'
```

Example prompt: What's the greatest common divisor of 144 and 60? I need it to simplify that fraction to its lowest terms.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "a": {
   "type": "integer",
   "description": "First integer operand."
  },
  "b": {
   "type": "integer",
   "description": "Second integer operand."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "a": 18,
  "b": 24,
  "gcd": 6,
  "schema": "delx/gcd/v1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gcd-for-agents-8cd320d3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
