# IPv4 CIDR Calculator

> IPv4 CIDR Calculator is a paid API for AI agents from api.aventtech.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Calculates IPv4 network properties from a CIDR notation input: network address, broadcast address, netmask, wildcard, usable host range and count, with optional IP membership check.

## Facts

- Endpoint: GET https://api.aventtech.com/net/cidr
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ipv4-cidr-calculator-94309bf3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Hr_KXGTa1bbWgegNN1GW_

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 ipv4-cidr-calculator-94309bf3
```

Example prompt: Can you give me the full subnet breakdown for 192.168.10.0/24 — network address, broadcast, netmask, wildcard, usable host range and count — and also check if 192.168.10.55 falls inside that subnet?

## When to prefer this

Use this endpoint when you need precise IPv4 subnet arithmetic — network/broadcast addresses, netmask, wildcard, usable host range — without standing up your own networking library. Particularly useful when also needing to verify whether a specific IP belongs to a given CIDR block in a single call. Prefer over general-purpose code execution when you need a reliable, low-latency, pay-per-call answer with no infrastructure overhead.

## Known failure modes

- Invalid or malformed CIDR string (e.g. missing prefix length, out-of-range octet) returns an error
- IP provided for membership check is not a valid IPv4 address
- IPv6 CIDR notation not supported (IPv4 only)
- Host bits set in the network address may cause rejection or normalization depending on implementation

## How this service works

IPv4 CIDR calculator: network, broadcast, netmask, wildcard, usable host range and count, plus optional contains-IP membership check.

## Output

Returns structured network details for the given CIDR: network address, broadcast address, subnet mask, wildcard mask, first and last usable host addresses, total usable host count, and — if an optional IP was supplied — a boolean indicating whether that IP falls within the subnet.

## 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": [
      "cidr"
     ],
     "properties": {
      "ip": {
       "type": "string",
       "description": "Optional IP to test for membership"
      },
      "cidr": {
       "type": "string",
       "description": "IPv4 CIDR, e.g. 10.0.0.0/8"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ipv4-cidr-calculator-94309bf3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.aventtech.com](https://www.zero.xyz/host/api.aventtech.com/llms.txt)
