OE
v0.10.0 | non-blocking async I/O and smarter retries

Structured Extraction

Typed output from any media.

Extract structured data from documents, images, audio, and video using LLMs and Pydantic schemas.

View Source
Terminal install
$ uv add openextract
$ openextract report.pdf \
    --schema mypkg:Invoice \
    --model xai:grok-4.3
{ "total": 1240.00, "currency": "USD", ... }
Pydantic Any LLM

Zero Config

One function call. Bring a schema, a URL, and an LLM model string.

Multi-Media

Documents, images, audio, and video with smart routing.

Any LLM

11 providers wired in: OpenAI, Anthropic, Google, AWS Bedrock, xAI, Cohere, Hugging Face, Groq, Mistral, OpenRouter, and Ollama.

Type Safe

Pydantic schemas ensure validated, typed output every time.

How it works

Schema in, typed data out

Define a BaseModel, call extract(), get validated output.

1

Define a schema

Describe the shape you want with a Pydantic model.

2

Point at any media

Documents, images, audio, or video via URL.

3

Get typed output

Validated against your schema. No parsing, no regex.

Terminal extract.py
from pydantic import BaseModel
from openextract import extract

class Report(BaseModel):
    title: str
    findings: list[str]
    severity: int

result = extract(
    schema=Report,
    model="xai:grok-4.3",
    input_file="https://example.com/report.pdf",
    instructions="Extract findings",
)

What’s new

v0.10.0

Full changelog
v0.10.0 · Performance

Non-blocking media and resilient retries

Async APIs now offload disk, DNS, and file-like reads while reusing HTTP clients. Retries reuse prepared inputs and agents, retry only transient failures, and honor bounded Retry-After values.

async I/O client reuse transient retries Retry-After

Works with any media

Documents Images Audio Video

PDF, DOCX, PNG, JPG, MP3, MP4, and 20+ formats