# IP Address Classifier

> IP Address Classifier is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Classifies an IPv4 or IPv6 address returning version, public/private/loopback/link-local flags, integer and hex representations, reverse-DNS pointer, and optional CIDR membership test.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/v1/ip-classify
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ip-address-classifier-e7b29250
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lrcMJLzEndZrRyh-yTEVN

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 ip-address-classifier-e7b29250 -d '<json body>'
```

Example prompt: Can you classify the IP address 192.168.1.50 for me — tell me if it's public or private, what version it is, its hex form, its reverse-DNS pointer, and whether it falls inside the CIDR block 192.168.1.0/24?

## When to prefer this

Choose this endpoint when you need a one-call solution to fully characterize an IP address — version detection, scope classification (public/private/loopback/link-local), numeric conversions, and CIDR membership — rather than writing custom parsing logic or calling multiple utilities separately. It handles both IPv4 and IPv6 and is particularly useful in security pipelines, network diagnostics, and infrastructure tooling where fast, reliable IP metadata is required.

## Known failure modes

- Invalid IP address format returns a 4xx error with a message indicating the input is not a valid IPv4 or IPv6 address
- Malformed CIDR notation (e.g. missing prefix length) returns an error describing the invalid CIDR
- Empty or missing IP input returns a validation error
- Extremely rare: reverse-DNS lookup may time out or return no result, flagged in the response

## How this service works

Classify an IPv4/IPv6 address: version, public/private/loopback/link-local flags, integer and hex forms, reverse-DNS pointer, and optional CIDR membership test.

## Output

Returns a structured object including the IP version (4 or 6), boolean flags for public, private, loopback, and link-local classifications, the IP expressed as an integer and in hexadecimal, the reverse-DNS PTR record string, and if a CIDR was supplied, a boolean indicating whether the IP falls within that network block.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ip": {
   "type": "string"
  },
  "cidr": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "version": 4,
  "is_private": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ip-address-classifier-e7b29250/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
