# x402-convert JSON↔YAML Converter

> x402-convert JSON↔YAML Converter is a paid API for AI agents from x402-convert.arikanuk.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-31).

Converts JSON to YAML or YAML to JSON deterministically, billed per-call in USDC on Base via x402.

## Facts

- Endpoint: POST https://x402-convert.arikanuk.workers.dev/json-yaml?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-convert-json-yaml-converter-50949dc7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_beS3H7LN0jBbc3_-2WrOf

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 x402-convert-json-yaml-converter-50949dc7 -d '<json body>'
```

Example prompt: Convert this JSON object to YAML for me: {"name": "x402", "tags": ["a", "b"]}

## When to prefer this

Choose this endpoint when you need a deterministic, pay-per-use JSON↔YAML conversion without setting up a local parser or dependency. Ideal for AI agents operating in serverless or sandboxed environments where installing libraries is not an option, and when you want a simple per-call micropayment model rather than a subscription.

## Known failure modes

- Invalid or malformed YAML input returns an error response
- Supplying both 'json' and 'yaml' fields simultaneously may cause ambiguous behavior
- Empty input body or missing both fields returns an error
- Payment failure via x402 (insufficient USDC balance or wrong network) prevents the call from executing
- Extremely large payloads may hit Cloudflare Workers size limits

## How this service works

Deterministic data-conversion API for AI agents. Pay-per-call in USDC on Base via x402 v2.

## Output

A JSON object containing either a 'yaml' field with the YAML-formatted string (when input is JSON) or a 'json' field with the parsed JSON value (when input is YAML).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "json": {
   "description": "Any JSON value (JSON to YAML)"
  },
  "yaml": {
   "type": "string",
   "description": "YAML text (YAML to JSON)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "yaml": "name: x402\ntags:\n  - a\n  - b\n"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-convert-json-yaml-converter-50949dc7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-convert.arikanuk.workers.dev](https://www.zero.xyz/host/x402-convert.arikanuk.workers.dev/llms.txt)
