# 24K Labs Structured Extraction API

> 24K Labs Structured Extraction API 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 the requested shape or field list.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/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-extraction-api-5fe4902f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vzK8WJDhypQlLNFxcIC1g

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-extraction-api-5fe4902f -d '<json body>'
```

Example prompt: Pull out the sender name, email address, order number, and total amount from this email text and give me the result as JSON: 'Hi, I'm Jane Doe, jane@example.com — my order #ORD-4892 for $134.50 arrived damaged.'

## When to prefer this

Choose this endpoint when you need to pull specific named fields from free-form or semi-structured text and receive a clean JSON object back — especially useful in agentic pipelines that need to bridge human-written content (emails, documents, messages) with downstream structured systems. Prefer this over regex or manual parsing when the text format is variable or unpredictable. It is well-suited for lightweight, per-record extraction tasks where you define the output shape at call time.

## Known failure modes

- Text contains no relevant content for the requested fields — returns null or empty values for missing fields
- Ambiguous text leads to incorrect field mapping or hallucinated values
- Malformed or overly complex schema shape may result in incomplete extraction
- Very long input text may be truncated or cause timeouts
- Payment failure or insufficient USDC balance results in 402 error preventing execution

## How this service works

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

## Output

A JSON object containing keys matching the requested field list or schema shape, with values extracted from the provided unstructured text. Fields that could not be found may be null or absent. The response is ready to use programmatically without further parsing.

## 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-extraction-api-5fe4902f/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)
