# Extract Structured JSON from Text Using Custom Field List

> Extract Structured JSON from Text Using Custom Field List is a paid API for AI agents from twin.unykorn.org, paid per call via x402, $0.006/call, status unknown (last checked 2026-09-30).

Takes arbitrary text (invoices, emails, contracts, listings) and a user-defined field map, returning structured JSON with the requested fields extracted.

## Facts

- Endpoint: POST https://twin.unykorn.org/ai/extract?utm_source=zero.xyz
- Price: $0.006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/extract-structured-json-from-text-using-custom-field-list-1e480b05
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Lcm3HbtNP0hYMJTYqywOR

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 extract-structured-json-from-text-using-custom-field-list-1e480b05 -d '<json body>'
```

Example prompt: Pull the vendor name, invoice number, total amount, due date, and line items out of this invoice text and give me the result as structured JSON: [paste invoice text here].

## When to prefer this

Choose this endpoint when you have unstructured or semi-structured text (emails, invoices, contracts, listings, forms) and need to extract a specific, user-defined set of named fields as structured JSON. It is ideal for document processing pipelines, data entry automation, and any workflow where you need to convert free-form text into machine-readable records with custom schemas. Prefer it over general LLM prompting when you want a consistent, schema-driven extraction result via a paid, reliable API endpoint.

## Known failure modes

- Text exceeds 16,000 character limit — request rejected
- More than 30 fields defined in the field map — may fail or truncate
- Field definitions are ambiguous — extracted values may be incorrect or empty
- AI model unable to identify requested fields in text — returns null values
- Malformed input object or missing required params — HTTP error response
- Payment failure via x402 protocol — call not executed

## How this service works

Extract structured JSON from any text using your field list (invoices, emails, contracts, listings) — Genesis402 / UnyKorn Operator Network

## Output

A structured JSON object where each key corresponds to a field name provided in the input field map, and each value is the extracted content from the source text. Missing or not-found fields may be null or absent.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "params": {
   "type": "object",
   "properties": {
    "text": {
     "type": "string",
     "description": "required, up to 16,000 chars"
    },
    "fields": {
     "type": "object",
     "description": "required: {field_name: what to extract}, up to 30 fields"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "type": "text-extract-json",
  "receipt": {
   "tx_hash": "0x<64hex>",
   "amount_usd": 0.006,
   "receipt_id": "g402-<16hex>"
  },
  "sources": [
   {
    "ok": true,
    "name": "<source>"
   }
  ],
  "limitations": "<text>",
  "generated_at": "<iso time>",
  "evidence_hash": "sha256:<64hex>"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/extract-structured-json-from-text-using-custom-field-list-1e480b05/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from twin.unykorn.org](https://www.zero.xyz/host/twin.unykorn.org/llms.txt)
