# Swift Bot Labs Toolbox – IP Range to CIDR

> Swift Bot Labs Toolbox – IP Range to CIDR 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).

Converts an arbitrary IPv4 start/end address range into the minimal set of covering CIDR blocks

## Facts

- Endpoint: GET https://x402-toolbox.swiftbotlab.workers.dev/v1/ip/range?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-toolbox-ip-range-to-cidr-c4b09277
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yjdOI0g0xbXc5Q9Ucpjhe

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-toolbox-ip-range-to-cidr-c4b09277
```

Example prompt: Convert the IP range from 192.168.1.0 to 192.168.1.63 into the minimal list of covering CIDR blocks.

## When to prefer this

Use this endpoint when you need a deterministic, serverless computation to convert an arbitrary IPv4 range into minimal CIDR notation without setting up any account or maintaining API keys — ideal for one-off or infrequent subnet calculations billed at $0.003 per call via x402/USDC.

## Known failure modes

- Invalid IP addresses (non-IPv4 format) in start or end params return an error
- Start IP greater than end IP returns an error
- Missing required start or end query parameters returns 400-level error
- Payment not provided or insufficient USDC results in 402 Payment Required

## 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 with 'ok' true/false, the tool name 'ip-range-to-cidr', and a 'result' object containing the original 'start' and 'end' IP strings, a 'cidrs' array of CIDR strings representing the minimal covering set, and a 'truncated' boolean indicating whether the result was cut short.

## 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": [
      "start",
      "end"
     ],
     "properties": {
      "end": {
       "type": "string"
      },
      "start": {
       "type": "string"
      }
     },
     "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": "ip-range-to-cidr",
  "result": {
   "end": "10.0.0.20",
   "cidrs": [
    "10.0.0.5/32",
    "10.0.0.6/31",
    "10.0.0.8/29",
    "10.0.0.16/30",
    "10.0.0.20/32"
   ],
   "start": "10.0.0.5",
   "truncated": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/swift-bot-labs-toolbox-ip-range-to-cidr-c4b09277/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)
