# agent402.tools IPv6 Expand/Compress

> agent402.tools IPv6 Expand/Compress is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Expands a compressed IPv6 address to full 8-group notation or compresses a full address by collapsing the longest zero run, with format validation.

## Facts

- Endpoint: POST https://agent402.tools/api/ipv6-expand
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-ipv6-expand-compress-b410ef11
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_tQ3G_7g5_Fh82-A2tGFbh

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 agent402-tools-ipv6-expand-compress-b410ef11 -d '<json body>'
```

Example prompt: Can you expand the IPv6 address 2001:db8::1 to its full 8-group notation like 2001:0db8:0000:0000:0000:0000:0000:0001?

## When to prefer this

Use this endpoint when you need to normalize IPv6 addresses for comparison, storage, or display — specifically when you need to expand compressed :: notation to full 8-group form or compress a verbose address to its shortest canonical representation. Ideal for pure deterministic, CPU-bound IPv6 formatting with no external dependencies.

## Known failure modes

- Invalid IPv6 address format returns a validation error
- Missing required 'address' field returns a bad request error
- Malformed input that cannot be parsed as IPv6 returns an error
- Ambiguous or conflicting :: usage in the input address causes a parse failure

## How this service works

Expand a compressed IPv6 address to full 8-group notation (:: to 0000:...) or compress a full address by collapsing the longest zero run. Also validates format. Pure CPU, deterministic.

## Output

Returns the expanded (or compressed) IPv6 address in the requested format, along with validation status confirming whether the input was a valid IPv6 address.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "address": {
   "type": "string",
   "description": "IPv6 address to expand or compress"
  },
  "compress": {
   "type": "boolean",
   "description": "If true, compress instead of expand (default: false)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "valid": true,
  "groups": 8,
  "expanded": "2001:0db8:0000:0000:0000:0000:0000:0001",
  "compressed": "2001:db8::1"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-ipv6-expand-compress-b410ef11/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
