# agent402.tools JSON to YAML Converter

> agent402.tools JSON to YAML Converter is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Converts a JSON value or JSON string into equivalent YAML format

## Facts

- Endpoint: POST https://agent402.tools/api/json-to-yaml
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-json-to-yaml-converter-8c1e83c1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_arz2uNEsmMHbKPjSYRBod

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 agent402-tools-json-to-yaml-converter-8c1e83c1 -d '<json body>'
```

Example prompt: Can you convert this JSON to YAML for me: {"name": "Alice", "age": 30, "roles": ["admin", "user"]}?

## When to prefer this

Use this endpoint when you need a simple, reliable, pay-per-use JSON-to-YAML conversion without setting up local tooling or libraries. Ideal for agents or workflows that encounter JSON payloads and need YAML output for configuration files, CI/CD pipelines, or Kubernetes manifests.

## Known failure modes

- Invalid or malformed JSON input causes a parse error
- Empty or missing 'json' field may return an error or empty output
- Deeply nested or very large JSON may hit processing limits
- Non-serializable JSON values may fail conversion

## How this service works

Convert JSON to YAML.

## Output

Returns the YAML-formatted equivalent of the provided JSON input as a string, preserving all keys, values, and nested structures in valid YAML syntax.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "json": {
   "description": "Any JSON value (or a JSON string of one)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "yaml": "name: Ada\ntags:\n  - eng\n"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-json-to-yaml-converter-8c1e83c1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
