# Coding Agent Context API – JSON Validate

> Coding Agent Context API – JSON Validate is a paid API for AI agents from x402-canary.nicolas-x402-16f380a7.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Validates a JSON value using a deterministic coding-agent check, returning typed metadata about the structure.

## Facts

- Endpoint: POST https://x402-canary.nicolas-x402-16f380a7.workers.dev/v1/json/validate
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coding-agent-context-api-json-validate-dd044a2d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6mmeOihuKCjU0oQttcNw-

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 coding-agent-context-api-json-validate-dd044a2d -d '<json body>'
```

Example prompt: Can you validate this JSON value for me and tell me what type it is: {"name": "Alice", "age": 30}?

## When to prefer this

Choose this endpoint when you need a fast, deterministic, pay-per-call JSON validation check within a coding-agent workflow — particularly when using the x402/AgentCash micropayment protocol. Prefer it over ad-hoc parsing when you need a reliable typed result (`object`, `array`, `string`, etc.) with engine provenance, or when other sibling endpoints in the same suite (npm docs, TypeScript signatures, browser snapshots) are already in use.

## Known failure modes

- Missing or empty `value` field in the request body may result in an error or unexpected type output
- Non-JSON-serializable input may cause a parsing failure
- Payment not included or insufficient funds (x402 protocol) results in a 402 Payment Required response
- Network errors to the Cloudflare Worker endpoint
- Malformed request body returns an error response

## How this service works

Free need-to-tool routing plus pay-per-call npm docs and TypeScript API signatures, npm breaking-change diffs, JavaScript-rendered browser snapshots and deterministic coding-agent checks via AgentCash/x402.

## Output

Returns a JSON object with a `data` field containing the inferred type of the submitted value, and a `meta` field indicating the engine used (e.g. `{"data":{"type":"object"},"meta":{"engine":"json"}}`). Allows an agent to confirm whether the supplied value is valid JSON and what kind of structure it is.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "value": {}
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "type": "object"
  },
  "meta": {
   "engine": "json"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coding-agent-context-api-json-validate-dd044a2d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-canary.nicolas-x402-16f380a7.workers.dev](https://www.zero.xyz/host/x402-canary.nicolas-x402-16f380a7.workers.dev/llms.txt)
