# Swift Bot Labs CIDR Info

> Swift Bot Labs CIDR Info is a paid API for AI agents from x402-toolbox.swiftbotlab.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-31).

Parses a CIDR notation block and returns detailed IP network information including netmask, network/broadcast addresses, usable host range, and host count.

## Facts

- Endpoint: GET https://x402-toolbox.swiftbotlab.workers.dev/v1/ip/cidr?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/swift-bot-labs-cidr-info-0d11a5b1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-3eZqsF-CUvSv4dwvIzwS

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 swift-bot-labs-cidr-info-0d11a5b1
```

Example prompt: What are the network address, broadcast address, netmask, and usable IP range for the CIDR block 192.168.10.64/26?

## When to prefer this

Use this endpoint when you need fast, deterministic CIDR subnet arithmetic without setting up any account or API key — ideal for one-off or agent-driven networking tasks paid per-call in USDC. Prefer it over full networking libraries when you need a lightweight, external computation for subnetting details in an automated pipeline.

## Known failure modes

- Invalid or malformed CIDR string returns an error
- Missing required 'cidr' query parameter causes a 400-level error
- CIDR with prefix length out of valid range (e.g. >32 for IPv4) may return an error
- Payment not provided or insufficient USDC results in a 402 Payment Required response

## How this service works

62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.

## Output

A JSON object containing the parsed CIDR block details: the original CIDR, netmask, network address, broadcast address, first and last usable IP, total address count, usable host count, and a flag indicating whether host bits were set in the input.

## 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",
      "HEAD"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "cidr"
     ],
     "properties": {
      "cidr": {
       "type": "string",
       "description": "e.g. 10.0.0.0/22 or 2001:db8::/48"
      }
     },
     "additionalProperties": false
    },
    "discoverable": {
     "type": "boolean"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tool": "cidr-info",
  "result": {
   "cidr": "192.168.10.64/26",
   "netmask": "255.255.255.192",
   "network": "192.168.10.64",
   "addresses": "64",
   "broadcast": "192.168.10.127",
   "lastUsable": "192.168.10.126",
   "firstUsable": "192.168.10.65",
   "usableHosts": "62",
   "hostBitsWereSet": true
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/swift-bot-labs-cidr-info-0d11a5b1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-toolbox.swiftbotlab.workers.dev](https://www.zero.xyz/host/x402-toolbox.swiftbotlab.workers.dev/llms.txt)
