# CoCo CIDR Calculator

> CoCo CIDR Calculator is a paid API for AI agents from cocoeatsai.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-19).

Computes detailed network information for a given IP address or CIDR block, including subnet mask, broadcast address, host range, and address counts.

## Facts

- Endpoint: GET https://cocoeatsai.com/area4/agent/tools/cidr?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coco-cidr-calculator-7a89a02b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BN1IO33AzTMFEghLLB2dp

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 coco-cidr-calculator-7a89a02b
```

Example prompt: Can you calculate the subnet details for 10.0.0.0/24 — I need the network address, broadcast, first and last host, netmask, and how many usable hosts there are?

## When to prefer this

Choose this endpoint when you need quick, offline-computable CIDR/subnet decomposition without hitting a heavy network library or setting up your own tooling. It is ideal for agents doing network planning, infrastructure configuration, or IP range validation where a single structured JSON result covering all key subnet fields is needed in one call.

## Known failure modes

- Invalid or malformed CIDR notation returns an error or empty response
- Missing 'value' query parameter may return a bad request error
- IPv6 inputs may not be fully supported or may return partial data
- Prefix lengths out of valid range (e.g. /33 for IPv4) may cause computation errors

## How this service works

Zach Riehn's lab: an about-me and portfolio, a news desk, The Atelier for AI experiments, Launch Lab for XRP research, and Fracture for games.

## Output

Returns a JSON object with full subnet details: network address, prefix length, netmask, broadcast address, first and last usable host IPs, number of usable hosts, total address count, IP version (4 or 6), and whether the range is a private network.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ]
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "value": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "network"
     ],
     "properties": {
      "network": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "prefix": 24,
  "netmask": "255.255.255.0",
  "network": "10.0.0.0",
  "private": true,
  "version": 4,
  "broadcast": "10.0.0.255",
  "last_host": "10.0.0.254",
  "first_host": "10.0.0.1",
  "usable_hosts": 254,
  "total_addresses": 256
 },
 "exampleNote": "Computed offline with demonstration inputs; time/random values are illustrative."
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coco-cidr-calculator-7a89a02b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from cocoeatsai.com](https://www.zero.xyz/host/cocoeatsai.com/llms.txt)
