# Yog x402 – Field Extraction

> Yog x402 – Field Extraction is a paid API for AI agents from api.gosyog.lol, paid per call via x402, $0.03/call, status unknown (last checked 2026-10-20).

Extracts specified fields from free-form source text and returns their values as structured JSON.

## Facts

- Endpoint: POST https://api.gosyog.lol/api/service/yog/extract_fields?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/yog-x402-field-extraction-610e1d31
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JaP_YgzrOvBN5Ui1GjX_F

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-field-extraction-610e1d31 -d '<json body>'
```

Example prompt: Extract the fields 'total' and 'order_id' from this text: 'Thank you for your order #4821. Your total was $19.99. It will ship in 3-5 business days.'

## When to prefer this

Choose this endpoint when you have free-form text and a known set of field names you want to extract in one structured call, especially when you need a quick, paid-per-use solution without setting up your own NLP pipeline. It is particularly useful for receipts, emails, documents, and any unstructured text where you know the keys but not the positions.

## Known failure modes

- Field not present in source text returns null for that key rather than an error
- Ambiguous or repeated field values may yield unexpected extractions
- Malformed or very short source text may result in all null values
- Missing required 'fields' or 'source_text' parameters will cause a request error
- Payment failure or insufficient balance will block the call with a 402 response

## 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

A JSON object with an 'ok' boolean and a 'result' object whose keys are the requested field names and whose values are the extracted text values (or null if a field was not found in the source).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "fields": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Field names to extract. Values not present in the source are null."
  },
  "source_text": {
   "type": "string",
   "description": "Source text to extract from."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "result": {
   "total": "$19.99",
   "order_id": "4821"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/yog-x402-field-extraction-610e1d31/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)
