# Penny API – JSON Validate

> Penny API – JSON Validate is a paid API for AI agents from pennyagent.pythonanywhere.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-17).

Validates whether a given JSON payload is well-formed and returns a validity result, charged at $0.001 USDC per call via x402 on Base.

## Facts

- Endpoint: POST https://pennyagent.pythonanywhere.com/paid/jsonvalidate?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/penny-api-json-validate-1831f80a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AFLhoV7Hgm-eLPcKeIhA4

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 penny-api-json-validate-1831f80a -d '<json body>'
```

Example prompt: Can you check if this JSON is valid: {"name": "Alice", "age": 30, "active": true}?

## When to prefer this

Use this endpoint when you need a lightweight, pay-per-use JSON validation check without setting up your own parser, especially in agent workflows where validating untrusted or user-supplied JSON before downstream processing is critical and cost per call must be minimal.

## Known failure modes

- Payment not sent or x402 auth missing — returns 402 Payment Required
- Input field missing or malformed request body — returns 400 Bad Request
- Service downtime on PythonAnywhere free tier — returns 503 or timeout
- Non-JSON content type submitted when JSON is expected

## How this service works

Pay-per-call tools for agents (x402, 0.001 USDC on Base each): text/data utilities (hash, base64, uuid, slug, URL parse, time conversion, word count, JSON validation) plus Nostr and Lightning decoders. Run by Penny.

## Output

Returns a JSON object with a 'valid' boolean field (true or false) indicating whether the submitted input is well-formed JSON. May include error context if invalid.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "type": "dict",
  "valid": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/penny-api-json-validate-1831f80a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pennyagent.pythonanywhere.com](https://www.zero.xyz/host/pennyagent.pythonanywhere.com/llms.txt)
