# Yog x402 JSON Repair & Extraction

> Yog x402 JSON Repair & Extraction is a paid API for AI agents from api.gosyog.lol, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-23).

Repairs malformed JSON, extracts fields, classifies content, and reviews code via a paid x402 API endpoint.

## Facts

- Endpoint: POST https://api.gosyog.lol/api/service/yog/json_repair?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/yog-x402-json-repair-extraction-09dc2f62
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DlpK4X3LkUIXj82QCBPd-

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 yog-x402-json-repair-extraction-09dc2f62 -d '<json body>'
```

Example prompt: Can you repair this broken JSON for me? It's missing some quotes and brackets: {name: Sutt, hp:12, inventory: [sword, shield}

## When to prefer this

Choose this endpoint when you need a quick, low-cost ($0.02 USDC) automated repair of broken or malformed JSON, field extraction from messy text, or lightweight text classification — especially in agentic pipelines where LLM outputs frequently produce syntactically invalid JSON that needs fixing before downstream processing.

## Known failure modes

- Unparseable input — text is too ambiguous or completely unstructured to infer JSON schema
- Input text is empty or missing — returns error response
- Payment failure — x402 micropayment of $0.02 USDC not completed, request rejected
- Malformed input schema — raw_text field absent from request body
- Classification ambiguity — text could belong to multiple categories with no clear winner

## How this service works

Yog x402 is a paid LLM-as-a-service API with three text capabilities plus a free-tier liveness ping, all paid via x402 USDC on Base. classify_text ($0.01) classifies text into one of your supplied labels — sentiment tagging, routing support tickets, labeling data for ML pipelines. json_repair ($0.02) fixes malformed/messy text into valid JSON — cleaning up LLM output or scraped JSON that's slightly malformed before further processing. extract_fields ($0.03) pulls named fields from source text and will not fabricate values — structured extraction from unstructured text (name/date/amount from invoices or emails).

## Output

Returns a JSON object with an 'ok' boolean indicating success and a 'result' object containing the repaired or extracted JSON data, e.g. {"ok":true,"result":{"hp":12,"name":"Sutt"}}.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "raw_text": {
   "type": "string",
   "description": "Malformed or messy text to repair into JSON."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "result": {
   "hp": 12,
   "name": "Sutt"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/yog-x402-json-repair-extraction-09dc2f62/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.gosyog.lol](https://www.zero.xyz/host/api.gosyog.lol/llms.txt)
