# Brotli Decompressor (agent402.tools)

> Brotli Decompressor (agent402.tools) 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).

Decompresses a base64-encoded Brotli payload and returns the result as UTF-8 text or base64-encoded binary, with a 10MB expansion cap to prevent zip bombs.

## Facts

- Endpoint: POST https://agent402.tools/api/brotli-decompress
- 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/brotli-decompressor-agent402-tools-24ed85a3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4N06Wm8zrfU8ipwdeiJ5v

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 brotli-decompressor-agent402-tools-24ed85a3 -d '<json body>'
```

Example prompt: I have this base64-encoded Brotli-compressed blob and I need to read what's inside — can you decompress it and give me the UTF-8 text? Here's the payload: 'G2gA8AEB...'

## When to prefer this

Use this endpoint when you have a Brotli-compressed payload encoded in base64 (or hex) and need to decompress it server-side without installing local Brotli libraries. Particularly useful in agent workflows where Brotli-encoded HTTP responses or data blobs need to be read as text. Prefer this over gzip or zlib decompressors specifically when the compression algorithm is Brotli (br).

## Known failure modes

- Invalid base64 input — returns error if the input string is not valid base64
- Corrupted or invalid Brotli data — returns error if bytes cannot be decompressed as Brotli
- Decompression bomb rejection — refuses and errors if the expanded payload would exceed 10MB
- Unsupported inputFormat or outputFormat values — returns validation error
- Empty or missing input field — returns bad request error

## How this service works

Decompress a base64-encoded Brotli payload. Returns the result as utf8 (text) or base64 (binary). Refuses to expand past 10MB to defend against zip bombs.

## Output

Returns the decompressed content either as a UTF-8 string (for text payloads) or as a base64-encoded string (for binary payloads). Refuses to expand any payload that would exceed 10MB to guard against decompression bomb attacks.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "description": "Base64-encoded Brotli bytes"
  },
  "inputFormat": {
   "type": "string",
   "description": "How `input` is encoded: base64 (default) or hex"
  },
  "outputFormat": {
   "type": "string",
   "description": "Result encoding: utf8 (default, for text) or base64 (for binary)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "output": "hello world!",
  "algorithm": "brotli",
  "inputBytes": 16,
  "outputBytes": 12
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brotli-decompressor-agent402-tools-24ed85a3/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)
