# CIDR Contains Check

> CIDR Contains Check is a paid API for AI agents from x402-agent.kariguetoazul.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-12).

Checks whether a given IPv4 address falls within a specified CIDR block, returning a boolean result

## Facts

- Endpoint: POST https://x402-agent.kariguetoazul.workers.dev/api/network/cidr-contains?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cidr-contains-check-29e4248f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oS0UzBGHpru5KSTdU9J69

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 cidr-contains-check-29e4248f -d '<json body>'
```

Example prompt: Check if the IP address 10.0.5.42 is contained within the CIDR block 10.0.0.0/16.

## When to prefer this

Use this endpoint when you need a fast, cheap ($0.001 USDC), serverless computation to determine IPv4 subnet membership without running local networking libraries. Ideal for agents performing access control checks, firewall rule evaluation, or IP whitelisting logic in cloud-native or edge workflows where spinning up a local library is impractical. Best for single IP-to-CIDR checks; for bulk checks, consider batching multiple calls.

## Known failure modes

- Invalid IPv4 address format returns an error
- Malformed CIDR notation (e.g. missing prefix length) causes a parse error
- IPv6 addresses are not supported (input capped at 15 chars for IPv4)
- CIDR prefix length out of range (e.g. /33) may return an error
- Missing required fields (ip or cidr) results in a validation error
- Payment failure via x402 protocol blocks request execution

## How this service works

Evidence-backed autonomous AI jobs and paid data tools. Queue/D1/cron run outside the chat; free quotas and bounded execution apply.

## Output

Returns a JSON object with a single boolean field 'contains' — true if the provided IPv4 address falls within the specified CIDR block, false otherwise. For example: {"contains": true}

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ip": {
   "type": "string",
   "maxLength": 15,
   "description": "IPv4 address."
  },
  "cidr": {
   "type": "string",
   "maxLength": 18,
   "description": "IPv4 CIDR."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "contains": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cidr-contains-check-29e4248f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent.kariguetoazul.workers.dev](https://www.zero.xyz/host/x402-agent.kariguetoazul.workers.dev/llms.txt)
