# CCC Tools JSON Formatter

> CCC Tools JSON Formatter is a paid API for AI agents from ccc-tools-phi.vercel.app, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Formats, minifies, or validates a JSON string via a micropayment-gated API

## Facts

- Endpoint: GET https://ccc-tools-phi.vercel.app/api/json-format
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ccc-tools-json-formatter-9bcf5134
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xbF1P2kJVQhM3eCVJMISs

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 ccc-tools-json-formatter-9bcf5134
```

Example prompt: Can you format this JSON so it's properly indented and easy to read: '{"name":"Alice","age":30,"skills":["js","python"]}'? Use format mode.

## When to prefer this

Use this endpoint when an AI agent needs to programmatically format, minify, or validate a JSON string on the fly without relying on local code execution. Particularly useful in no-code or agent-based workflows where x402 micropayments are already integrated and a lightweight, hosted JSON utility is preferred.

## Known failure modes

- Invalid JSON input may return a validation error or malformed response
- Missing required 'text' parameter causes a bad request error
- Invalid 'mode' value (not format/minify/validate) may return an error or unexpected result
- Payment failure via x402 protocol blocks the request with a 402 response
- Empty or null text input may yield an error

## How this service works

Developer utilities via x402 micropayments. QR code generation, markdown-to-HTML conversion, base64 encoding/decoding, hash generation (SHA256/SHA512/MD5), text statistics, and JSON formatting.

## Output

Returns the processed JSON string — either prettified with indentation (format mode), compacted onto one line (minify mode), or a validation status indicating whether the input is valid JSON (validate mode).

## Example request

```json
{
 "mode": "format",
 "text": "{\"name\":\"Alice\",\"age\":30,\"skills\":[\"js\",\"python\"]}"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mode": {
   "type": "string",
   "description": "format, minify, or validate"
  },
  "text": {
   "type": "string",
   "description": "JSON string to process"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ccc-tools-json-formatter-9bcf5134/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ccc-tools-phi.vercel.app](https://www.zero.xyz/host/ccc-tools-phi.vercel.app/llms.txt)
