# boring-api · convert: YAML to JSON

> boring-api · convert: YAML to JSON is a paid API for AI agents from convert.boring-api.com, paid per call via x402, $0.0005/call, status unknown (last checked 2026-09-13).

Converts YAML-formatted text content into JSON format using pure-JS or Pandoc-backed conversion libraries.

## Facts

- Endpoint: POST https://convert.boring-api.com/yaml-to-json
- Price: $0.0005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/boring-api-convert-yaml-to-json-7da2f1b3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bgwK3C5vXfIRG0awXYhtS

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 boring-api-convert-yaml-to-json-7da2f1b3 -d '<json body>'
```

Example prompt: Can you convert this YAML to JSON for me? Here's the content: 'name: Alice\nage: 30\nroles:\n  - admin\n  - user'

## When to prefer this

Choose this endpoint when you need a reliable, hosted, pay-per-call YAML-to-JSON conversion without setting up your own parsing infrastructure. Ideal for agents that occasionally need to convert YAML config snippets, Kubernetes manifests, or API specs to JSON on the fly, without managing dependencies like js-yaml or Pandoc locally.

## Known failure modes

- Invalid or malformed YAML input returns an error response
- Empty content field may return an error or empty object
- Deeply nested or complex YAML anchors may fail to parse correctly
- Payment failure (402) if x402 payment is not processed before the call

## How this service works

Document and data format conversions via Pandoc, Chromium-headless, and pure-JS libs. Text inputs/outputs are JSON-fielded; binary inputs/outputs use base64 in JSON for uniformity.

## Output

A JSON object containing the converted result. The YAML input is parsed and returned as a JSON-structured response, with text output delivered as a JSON field value.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "content": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/boring-api-convert-yaml-to-json-7da2f1b3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from convert.boring-api.com](https://www.zero.xyz/host/convert.boring-api.com/llms.txt)
