# JSON/YAML Bidirectional Converter

> JSON/YAML Bidirectional Converter is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Converts a source string between JSON and YAML formats, supporting config files, Helm values, Kubernetes manifests, and CI workflow files.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/v1/json-yaml-convert
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-yaml-bidirectional-converter-15110b53
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_N11yNiBcWP5KwPRAILC-U

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 json-yaml-bidirectional-converter-15110b53 -d '<json body>'
```

Example prompt: Convert this JSON string to YAML for me: {"name": "my-app", "replicas": 3, "image": "nginx:latest"} — I need a clean YAML version I can drop into my Helm values file.

## When to prefer this

Choose this endpoint when you need a quick, reliable bidirectional JSON↔YAML conversion for DevOps artifacts like Helm values, Kubernetes manifests, or CI configs, especially in an agentic workflow where paying per-call with x402 is acceptable and you want a stateless, no-setup API without managing a local parser.

## Known failure modes

- Invalid JSON input returns a parse error
- Invalid YAML input returns a parse error
- Unsupported from/to format combination returns a 400 error
- Malformed or empty source string returns an error
- Deeply nested or very large payloads may exceed size limits

## How this service works

Bidirectional JSON/YAML transcode for config files, Helm values, K8s manifests, and CI workflows. Give the source string plus from/to.

## Output

A converted string in the target format (JSON or YAML), structurally equivalent to the input, suitable for use in config files, Helm values, Kubernetes manifests, or CI pipelines.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "type": "string"
  },
  "from": {
   "type": "string"
  },
  "input": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "to": "yaml",
  "result": "name: app\nreplicas: 3\n"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-yaml-bidirectional-converter-15110b53/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
