# Feral Tools JSON Formatter

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

Formats, prettifies, and optionally sorts keys of a JSON object with configurable indentation via a paid API

## Facts

- Endpoint: POST https://feral-tools.vercel.app/api/format
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/feral-tools-json-formatter-597d6a82
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jzvsXsvjqllYTnVDQYZkB

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 feral-tools-json-formatter-597d6a82 -d '<json body>'
```

Example prompt: Can you format this JSON object for me with 2-space indentation and sort the keys alphabetically: {"b": 2, "a": 1}?

## When to prefer this

Choose this endpoint when you need a fast, deterministic, paid-per-call JSON formatting service with configurable indentation and optional key sorting — especially useful in agentic pipelines where canonical, reproducible JSON output is required without standing up your own formatting logic.

## Known failure modes

- Invalid or malformed JSON input returns an error response
- Missing required body fields may cause a 400-level error
- Network or server errors may return non-200 status
- Payment not completed via x402 protocol results in 402 Payment Required

## How this service works

Small deterministic APIs purchasable with x402 USDC on Base.

## Output

Returns a JSON object with an 'ok' boolean, the detected type of the input, the indent level used, whether keys were sorted, and a 'formatted' string containing the prettified JSON ready for display or storage.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "json": {
   "description": "A JSON value or a string containing JSON"
  },
  "indent": {
   "type": "integer",
   "default": 2,
   "maximum": 8,
   "minimum": 0
  },
  "schema": {
   "type": "object",
   "description": "Optional JSON Schema (draft-07) used to validate the input"
  },
  "sortKeys": {
   "type": "boolean",
   "default": false
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "type": "object",
  "indent": 2,
  "sortKeys": true,
  "formatted": "{\n  \"a\": 1,\n  \"b\": 2\n}"
 }
}
```

## More

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