# LIN Desk YAML to JSON Converter

> LIN Desk YAML to JSON Converter is a paid API for AI agents from lin-desk-x402.lindesk.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-11).

Converts a YAML string into formatted JSON via a pay-per-call GET API endpoint.

## Facts

- Endpoint: GET https://lin-desk-x402.lindesk.workers.dev/v1/dataformat/yaml2json?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lin-desk-yaml-to-json-converter-4075f773
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_d71OmS9gaqdgx5toF84fQ

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 lin-desk-yaml-to-json-converter-4075f773
```

Example prompt: Convert this YAML snippet to JSON for me: 'name: alice\ntags:\n  - a\n  - b' — use an indent of 2.

## When to prefer this

Choose this endpoint when you need a lightweight, stateless, pay-per-call YAML-to-JSON conversion without API keys or signup overhead. Ideal for AI agent pipelines that occasionally need to reformat YAML configs, specs, or data blobs into JSON programmatically on Base/USDC micropayment rails.

## Known failure modes

- Invalid or malformed YAML input returns a validation error with error details in the errors array
- Input payload exceeding 100 KiB limit is rejected
- Missing required 'input' query parameter causes a 400-level error
- Non-YAML content (e.g. binary data) may fail parsing silently or with an error array

## How this service works

Pay-per-call API for AI agents: turn any public web page or PDF into clean, LLM-ready Markdown. $0.002 per call in USDC on Base via x402. No API key, no signup.

## Output

Returns a JSON object containing the operation name ('yaml2json'), the parsed representation of the YAML as a native object, the serialized JSON string result with requested indentation, and elapsed processing time in milliseconds.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "input"
     ],
     "properties": {
      "input": {
       "type": "string",
       "description": "Payload text (CSV/JSON/YAML/XML); max 100 KiB"
      },
      "indent": {
       "type": "string",
       "pattern": "^-?\\d+$",
       "description": "JSON indent (default 2)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "op": {
       "type": "string"
      },
      "cols": {
       "type": "array"
      },
      "rows": {
       "type": "integer"
      },
      "valid": {
       "type": "boolean"
      },
      "errors": {
       "type": "array"
      },
      "result": {},
      "encoding": {
       "type": "string"
      },
      "elapsed_ms": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "op": "yaml2json",
  "parsed": {
   "name": "alice",
   "tags": [
    "a",
    "b"
   ]
  },
  "result": "{\n  \"name\": \"alice\",\n  \"tags\": [\n    \"a\",\n    \"b\"\n  ]\n}",
  "elapsed_ms": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lin-desk-yaml-to-json-converter-4075f773/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from lin-desk-x402.lindesk.workers.dev](https://www.zero.xyz/host/lin-desk-x402.lindesk.workers.dev/llms.txt)
