# GeekVault CIDR Calculator

> GeekVault CIDR Calculator is a paid API for AI agents from api.geekvault.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-28).

Calculates all key IPv4 subnet details from a CIDR notation input, including network address, broadcast, netmask, host range, and address counts.

## Facts

- Endpoint: GET https://api.geekvault.dev/dev-tools/v1/cidr-calculate?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/geekvault-cidr-calculator-41b2cef7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ZQ61Lqqe7Tp2R06pBgN68

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 geekvault-cidr-calculator-41b2cef7
```

Example prompt: What are all the subnet details for 10.0.0.0/22 — I need the network address, broadcast, netmask, wildcard mask, and how many usable hosts there are.

## When to prefer this

Use this endpoint when you need instant, structured IPv4 subnet calculations without standing up any infrastructure or authenticating. Ideal for network automation agents, infrastructure planning scripts, or any workflow needing programmatic CIDR expansion. Prefer this over manual calculation or local tooling when operating in a pay-per-call serverless agent context using USDC on Base.

## Known failure modes

- Invalid CIDR format (e.g. missing prefix length or malformed IP) returns an error
- Out-of-range prefix length (e.g. /33) causes a validation error
- IPv6 CIDR inputs are not supported — only IPv4
- Missing required 'cidr' parameter returns a 400-level error

## How this service works

Network, docs, image, web, and dev utility tools paid per call via x402. No signup, no API keys, no subscriptions — just USDC on Base.

## Output

Returns a JSON object with the original CIDR, network address, broadcast address, subnet mask, wildcard mask, first usable host IP, last usable host IP, total address count, and count of usable host addresses.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "cidr"
 ],
 "properties": {
  "cidr": {
   "type": "string",
   "description": "CIDR IPv4, ej. `192.168.1.0/24`."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "cidr",
  "network",
  "broadcast",
  "netmask",
  "wildcard_mask",
  "first_host",
  "last_host",
  "total_addresses",
  "usable_hosts"
 ],
 "properties": {
  "cidr": {
   "type": "string"
  },
  "netmask": {
   "type": "string"
  },
  "network": {
   "type": "string"
  },
  "broadcast": {
   "type": "string"
  },
  "last_host": {
   "type": "string"
  },
  "first_host": {
   "type": "string"
  },
  "usable_hosts": {
   "type": "integer",
   "format": "int64",
   "minimum": 0
  },
  "wildcard_mask": {
   "type": "string"
  },
  "total_addresses": {
   "type": "integer",
   "format": "int64",
   "minimum": 0
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/geekvault-cidr-calculator-41b2cef7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.geekvault.dev](https://www.zero.xyz/host/api.geekvault.dev/llms.txt)
