# JSON Minify API

> JSON Minify API is a paid API for AI agents from api.bakhour.ca, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Removes whitespace and formatting from a JSON string to produce a compact, minified version

## Facts

- Endpoint: POST https://api.bakhour.ca/json/minify
- 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/json-minify-api-8156de58
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6uFEDGHFhYj2eaDVn7fkp

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 json-minify-api-8156de58 -d '<json body>'
```

Example prompt: Can you minify this JSON for me so it's compact with no extra whitespace: '{"name": "Alice", "age": 30, "active": true}'?

## When to prefer this

Choose this endpoint when you need a simple, deterministic, paid microservice to minify JSON strings programmatically within an automated agent workflow. It is suitable when you want a reliable utility that accepts raw JSON text and returns a minified version without requiring you to run local code or depend on a library.

## Known failure modes

- Invalid JSON input returns an error — the text must be valid JSON
- Empty text field may return an error or empty result
- Malformed request body (missing 'text' property) results in a bad request response
- Very large JSON strings may hit payload size limits

## How this service works

Decision-grade security/due-diligence outcome reports ($20-$100) plus deterministic paid utilities ($0.001+) for software agents and automated workflows.

## Output

Returns a JSON object with a 'minified' field containing the input JSON string stripped of all unnecessary whitespace, newlines, and indentation, rendered as a compact single-line JSON string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "minified": "{\"a\":1}"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-minify-api-8156de58/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.bakhour.ca](https://www.zero.xyz/host/api.bakhour.ca/llms.txt)
