# JSON to TOML Converter

> JSON to TOML Converter is a paid API for AI agents from toolshed.lemon-agent.dev, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-14).

Converts a JSON object into a TOML document, rejecting null values and non-object roots

## Facts

- Endpoint: POST https://toolshed.lemon-agent.dev/convert/json-toml
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-to-toml-converter-0561021d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QdKJEMfB2n82vVrSIiaAk

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-to-toml-converter-0561021d -d '<json body>'
```

Example prompt: Take this JSON object — {"name": "my-app", "version": "1.0.0", "debug": true, "port": 8080} — and convert it to a TOML document for me.

## When to prefer this

Use this endpoint when you need a strict, error-safe JSON-to-TOML conversion that explicitly rejects null values and non-object roots rather than silently producing a broken TOML file. Prefer it for configuration file workflows (Cargo, Hugo, pyproject.toml) where correctness is critical and you want deterministic conversion without hidden surprises.

## Known failure modes

- Input JSON root is not an object (e.g. an array or primitive) — returns an error
- Any value in the JSON is null — TOML has no null type, returns an error
- Malformed or invalid JSON — returns a parse error
- Input exceeds 256 KB size limit — rejected
- Missing or incorrect Content-Type or body format

## How this service works

JSON to TOML. POST a JSON object; the response is a TOML document. The root must be an object, because TOML's root is a table, and a null anywhere in the document is refused — TOML has no spelling for one. Both are errors rather than a file that quietly parses to something you did not write.

## Output

A plain-text TOML document (application/toml) representing the input JSON object, with all keys and nested structures serialized as TOML tables and values. Null values anywhere in the input cause an error rather than being silently omitted, and non-object roots are rejected.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "const": "POST"
    },
    "bodyType": {
     "type": "string",
     "const": "text"
    },
    "body": {
     "type": "string",
     "description": "the raw JSON file as the request body, up to 256 KB",
     "maxLength": 262144
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "text"
    },
    "format": {
     "type": "string",
     "const": "application/toml",
     "description": "the converted TOML file as the response body (application/toml)"
    },
    "example": {
     "type": "string",
     "description": "the sample request body above, converted — what a the converted TOML file as the response body (application/toml) looks like"
    }
   },
   "required": [
    "type",
    "format"
   ],
   "additionalProperties": false
  }
 },
 "required": [
  "input"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-to-toml-converter-0561021d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from toolshed.lemon-agent.dev](https://www.zero.xyz/host/toolshed.lemon-agent.dev/llms.txt)
