# Animica Extract — Structured Data Extraction from Unstructured Text

> Animica Extract — Structured Data Extraction from Unstructured Text is a paid API for AI agents from animica.dev, paid per call via x402, $0.001796/call, status unknown (last checked 2026-09-15).

Extracts structured, schema-validated data from unstructured text using AI, returning a JSON object that conforms to a user-supplied JSON Schema.

## Facts

- Endpoint: POST https://animica.dev/x402/extract
- Price: $0.001796/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/animica-extract-structured-data-extraction-from-unstructured-text-fe9e258d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ScENaowOSPXg6A38DhOY-

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 animica-extract-structured-data-extraction-from-unstructured-text-fe9e258d -d '<json body>'
```

Example prompt: Extract the vendor name, invoice date, total amount, and line items from this invoice text and return them as a JSON object: 'Invoice from Acme Corp dated 2024-03-15, total $1,250.00 — 5 widgets at $200 each, 1 setup fee at $250.'

## When to prefer this

Use this endpoint when you need to extract structured, schema-validated data from arbitrary unstructured text and want a single API call that handles both the AI inference and output validation. It is particularly well-suited for agents that need deterministic typed output (e.g. for downstream JSON processing) rather than a free-text AI response. Prefer it over generic LLM calls when you want schema enforcement, automatic repair, and pay-per-call pricing without managing your own AI API keys.

## Known failure modes

- Schema too complex or uses unsupported JSON Schema keywords — unsupported keywords listed in response but not enforced
- Text contains insufficient information to populate required schema fields — model may hallucinate or return nulls
- Malformed input schema — request rejected or partial extraction
- Repeated validation failures after max attempts — may return best-effort result with repaired flag set true
- Payment failure via x402 — 402 response before extraction is attempted

## How this service works

Turn messy text — a web page, email, invoice, receipt, job posting, contract clause, product description — into strict JSON matching a schema YOU supply. The schema is enforced in code, not merely requested: output is parsed, validated, repaired once against the exact validation error, and the call FAILS with the violated constraint rather than returning unvalidated JSON. Fields not present in the input come back null instead of a plausible invention. Priced per call. For high-volume use, buy prepaid credits (POST /x402/credits/buy) and send X-Animica-Credits on each request — no settlement, no gas, no per-call payment round trip. Paying in ANM on the animica:1 lane is also ~25% cheaper because we sponsor no gas there.

## Output

A JSON object with the key 'data' containing the extracted values validated against the provided JSON Schema, plus metadata: 'model' (which AI model was used), 'attempts' (how many inference attempts were made), 'repaired' (boolean indicating if the output needed schema repair), and 'unsupported_schema_keywords' (list of any schema keywords that were ignored).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "description": "the unstructured text to extract from"
  },
  "schema": {
   "type": "object",
   "description": "JSON Schema the result must satisfy (subset: type, properties, required, items, enum, const, min/max, minLength/maxLength, minItems/maxItems, additionalProperties)"
  },
  "instruction": {
   "type": "string",
   "description": "optional extra guidance, e.g. \"amounts in minor units\""
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/animica-extract-structured-data-extraction-from-unstructured-text-fe9e258d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from animica.dev](https://www.zero.xyz/host/animica.dev/llms.txt)
