# CoCo JSON Format Tool

> CoCo JSON Format Tool is a paid API for AI agents from cocoeatsai.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-19).

Validates and pretty-formats a JSON string, returning the parsed JSON along with a validity flag

## Facts

- Endpoint: GET https://cocoeatsai.com/area4/agent/tools/json-format?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coco-json-format-tool-4bcaaa2c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_upVbE3mWTj99tIXofu4cj

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 coco-json-format-tool-4bcaaa2c
```

Example prompt: Can you check if this is valid JSON and format it nicely for me: '{"name":"Alice","age":30,"active":true}'?

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call JSON validation and formatting tool without standing up your own infrastructure. It is ideal for AI agents that occasionally need to sanitize or verify JSON strings on the fly, especially within a micropayment (x402) workflow where no API key management is desired.

## Known failure modes

- Malformed or non-JSON input may return valid:false with unparseable output
- Missing required 'data' query parameter may result in an error response
- Network or payment-related failures (x402 micropayment not fulfilled) may block the request
- Extremely large JSON payloads may time out or be rejected

## How this service works

Zach Riehn's lab: an about-me and portfolio, a news desk, The Atelier for AI experiments, Launch Lab for XRP research, and Fracture for games.

## Output

Returns an object containing a 'json' field with the formatted (pretty-printed) JSON string, and a 'valid' boolean indicating whether the input was syntactically correct JSON.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ]
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "data": {
       "type": "string"
      },
      "mode": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "json"
     ],
     "properties": {
      "json": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "json": "[\n  {\n    \"name\": \"example\",\n    \"value\": 1\n  }\n]",
  "valid": true
 },
 "exampleNote": "Computed offline with demonstration inputs; time/random values are illustrative."
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coco-json-format-tool-4bcaaa2c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from cocoeatsai.com](https://www.zero.xyz/host/cocoeatsai.com/llms.txt)
