# Network Calc: CIDR Aggregation

> Network Calc: CIDR Aggregation is a paid API for AI agents from network-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Aggregates a list of IPv4 or IPv6 CIDR blocks into the minimal set of non-overlapping, merged prefixes plus the covering supernet.

## Facts

- Endpoint: GET https://network-calc.x402tookit.com/cidr-aggregate?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/network-calc-cidr-aggregation-8cb1832b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_w-2I6l1zef_R0PQlY1d5J

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 network-calc-cidr-aggregation-8cb1832b
```

Example prompt: Can you aggregate these subnets into the smallest possible set of CIDR blocks and tell me the covering supernet: 10.0.0.0/24, 10.0.1.0/24, 10.0.2.0/24, 10.0.3.0/24?

## When to prefer this

Use this endpoint when you need to programmatically minimize a list of IP prefixes for firewall rules, routing tables, BGP advertisements, or ACL policy — especially when you want the covering supernet and a reduction percentage. Prefer this over manual tools or general-purpose code when operating in an agentic workflow that already handles x402 micropayments.

## Known failure modes

- Invalid CIDR notation in input causes parse error
- Mixed IPv4 and IPv6 in contexts expecting one family
- Empty or missing 'cidrs' query parameter returns error
- Extremely large prefix lists may time out
- Overlapping private and public ranges return unexpected supernets

## How this service works

Summarise IPv4 or IPv6 CIDR blocks into the minimal set (merging adjacent and overlapping blocks) plus the covering supernet.

## Output

Returns the aggregated list of IPv4 and/or IPv6 CIDR blocks (merged and de-duplicated), the covering supernet for each address family, any supernet gap (addresses in the supernet not covered by the input), the reduction percentage, input and output block counts, total addresses covered, and a flag indicating whether a single exact supernet covers the input precisely.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "cidrs"
     ],
     "properties": {
      "cidrs": {
       "type": "string",
       "description": "Prefixes separated by commas, spaces or newlines, for example 10.0.0.0/24,10.0.1.0/24,10.0.3.0/24"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "ipv4": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "ipv6": {
       "type": [
        "array",
        "null"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "inputCount": {
       "type": [
        "null",
        "number"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "outputCount": {
       "type": [
        "null",
        "number"
       ]
      },
      "ipv4Supernet": {
       "type": [
        "null",
        "string"
       ]
      },
      "ipv6Supernet": {},
      "ipv4SupernetGap": {
       "type": [
        "null",
        "string"
       ]
      },
      "ipv6SupernetGap": {
       "type": [
        "null",
        "string"
       ]
      },
      "reductionPercent": {
       "type": [
        "null",
        "number"
       ]
 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/network-calc-cidr-aggregation-8cb1832b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from network-calc.x402tookit.com](https://www.zero.xyz/host/network-calc.x402tookit.com/llms.txt)
