# boring-api · convert: JSON to YAML

> boring-api · convert: JSON to YAML 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-14).

Converts a JSON string into YAML format using pure-JS or backend conversion libraries

## Facts

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

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-json-to-yaml-ee2d0de0 -d '<json body>'
```

Example prompt: Can you convert this JSON into YAML for me: {"name": "my-service", "replicas": 3, "image": "nginx:latest"}?

## When to prefer this

Use this endpoint when you need a reliable, API-accessible JSON-to-YAML conversion without spinning up local tooling, especially in automated workflows, CI/CD pipelines, or agent tasks where transforming config files or data payloads is required on-demand.

## Known failure modes

- Invalid or malformed JSON in 'content' field returns an error response
- Empty content field may return an error or empty YAML
- Payment not provided or declined results in HTTP 402 with x402 payment challenge
- Network timeout or upstream service error returns 5xx response

## 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

Returns a JSON object containing the YAML-formatted equivalent of the input JSON string, suitable for use in config files, CI/CD pipelines, Kubernetes manifests, or any YAML-consuming system.

## 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-json-to-yaml-ee2d0de0/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)
