# JSON/YAML Bidirectional Transcoder

> JSON/YAML Bidirectional Transcoder 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 workflows.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/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-transcoder-7ec5a60e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3L9js2qHX4JMcUSOJ_nmD

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-transcoder-7ec5a60e -d '<json body>'
```

Example prompt: Convert this Kubernetes deployment manifest from YAML to JSON — here's the source: `apiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: my-app`

## When to prefer this

Choose this endpoint when you need a quick, reliable bidirectional conversion between JSON and YAML, especially for DevOps artifacts like Kubernetes manifests, Helm charts, or CI/CD pipeline configs. It's ideal for agents automating infrastructure workflows that need to switch between formats programmatically without local tooling.

## Known failure modes

- Invalid JSON input causes parse error
- Malformed YAML causes parse error
- Unsupported from/to format combination returns error
- Deeply nested or circular structures may fail serialization
- Empty or null source string returns validation error

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

Returns the transcoded string in the target format (JSON or YAML), preserving the original structure and values. The output is ready to use directly in config files, manifests, or pipeline definitions.

## 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-transcoder-7ec5a60e/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)
