# 24K Labs Structured Text Extraction

> 24K Labs Structured Text Extraction is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-13).

Extracts specified fields from unstructured text and returns them as a structured JSON object matching a requested schema or field list.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/v1/extract-structured
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/24k-labs-structured-text-extraction-5b300d94
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EwKC9dWLHJmc_OORTSy_i

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 24k-labs-structured-text-extraction-5b300d94 -d '<json body>'
```

Example prompt: Pull out the customer name, order date, total amount, and shipping address from this email body and give me the result as JSON: 'Hi, I placed an order on March 14th for $48.99. Please ship to John Smith, 42 Maple Ave, Springfield, IL 62701.'

## When to prefer this

Choose this endpoint when you need to convert free-form, unstructured text into a predictable JSON structure with specific named fields — especially in pipelines where downstream code expects typed data. It is ideal for parsing emails, invoices, resumes, support tickets, or any natural language input where you already know the target schema. Prefer it over general LLM calls when you want a consistent, cost-predictable, single-purpose extraction with a defined per-call price.

## Known failure modes

- Requested fields not present in the input text — returns null values or empty fields
- Ambiguous or conflicting values in text leading to incorrect extraction
- Malformed input text causing parsing errors
- Schema shape too complex or deeply nested for reliable extraction
- Rate limiting or payment failure via x402 protocol

## How this service works

Extract fields from unstructured text into JSON matching a requested shape/field list.

## Output

A JSON object whose keys correspond to the requested fields or schema shape, with values populated from the unstructured input text. Fields not found in the source text may be returned as null or omitted depending on the service behavior.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string"
  },
  "fields": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/24k-labs-structured-text-extraction-5b300d94/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
