# Losbeto Text-to-JSON Extractor

> Losbeto Text-to-JSON Extractor is a paid API for AI agents from api.losbeto.xyz, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-10).

Extracts structured JSON from unstructured text using caller-defined fields or a schema, returning exactly the requested keys with null for absent values — never hallucinating.

## Facts

- Endpoint: POST https://api.losbeto.xyz/extract?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/losbeto-text-to-json-extractor-d1686599
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mdV6b5sJym5zEm4qZthTk

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 losbeto-text-to-json-extractor-d1686599 -d '<json body>'
```

Example prompt: Pull out the vendor name, invoice number, total amount, and due date from this invoice text and give them back as JSON — use null for anything that isn't explicitly stated: 'ACME Corp, Invoice #4821, Net 30, Total: $3,450.00, issued Jan 15 2025.'

## When to prefer this

Choose this endpoint when you need deterministic, schema-bound extraction from unstructured text with a strict no-hallucination guarantee. It is ideal for document processing pipelines (invoices, contracts, emails, receipts) where invented values would be harmful. Prefer it over a general LLM call when you want null-safe structured output without writing your own parse-and-retry logic. Not suitable for free-form text generation or summarization.

## Known failure modes

- Source text exceeds 6000 character limit — request rejected
- Neither fields nor schema provided — may return empty or error object
- Text is too ambiguous for reliable extraction — fields returned as null
- Model produces malformed JSON — one automatic retry is attempted; if still invalid the payment is returned as call credit
- Non-extractive use (e.g. free-form generation) — endpoint not designed for this use case

## How this service works

Turn messy text into strict JSON: send text plus the fields you want and get back exactly those keys, null for anything the text does not state — never invented. Invoices, emails, contracts, scraped pages, chat logs....

## Output

A JSON object containing exactly the keys requested in the fields or schema parameter. Any field whose value is not explicitly stated in the source text is returned as null — no values are invented or inferred beyond what the text states.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "method": {
     "type": "string",
     "description": "POST"
    },
    "bodyParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Messy source text (max 6000 chars)."
      },
      "fields": {
       "type": "string",
       "description": "Alternative to schema: comma-separated field names."
      },
      "schema": {
       "type": "object",
       "description": "{field: description} — the keys you want back."
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "properties": {
    "example": {
     "type": "object",
     "description": "Turn messy text into strict JSON: send text plus the fields you want and get back exactly those keys, null for anything the text does not state — never invented. Invoices, emails, contracts, scraped pages, chat logs. One retry repairs malformed model output; if valid JSON still cannot be produced the payment is returned as call credit. Replaces your own parse-and-retry error branch..."
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/losbeto-text-to-json-extractor-d1686599/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.losbeto.xyz](https://www.zero.xyz/host/api.losbeto.xyz/llms.txt)
