# LangExtract v0.10.0 - API Reference

## Modules

- Core API
  - [LangExtract](LangExtract.md): Extracts structured data from text with source grounding.
Maps extraction strings back to exact byte positions in source text.
  - [LangExtract.ChunkError](LangExtract.ChunkError.md): A failed chunk with its byte position in the source and error reason.
  - [LangExtract.ChunkResult](LangExtract.ChunkResult.md): A successfully processed chunk: its byte range in the source and the
spans extracted from it.
  - [LangExtract.Client](LangExtract.Client.md): A configured LLM client for extraction.
  - [LangExtract.Extraction](LangExtract.Extraction.md): A single extraction: an entity class, its verbatim source text, and
arbitrary attributes.
  - [LangExtract.Prompt.Validator](LangExtract.Prompt.Validator.md): Validates that few-shot examples in a `LangExtract.Template` are self-consistent.
  - [LangExtract.Prompt.Validator.Issue](LangExtract.Prompt.Validator.Issue.md): Describes a single alignment problem in a few-shot example.

  - [LangExtract.Prompt.Validator.ValidationError](LangExtract.Prompt.Validator.ValidationError.md): Raised by `LangExtract.Prompt.Validator.validate!/1` when alignment issues are found.

  - [LangExtract.Provider](LangExtract.Provider.md): Behaviour for LLM inference providers.
  - [LangExtract.Provider.Response](LangExtract.Provider.Response.md): A provider's successful inference response: the raw text plus token
usage when the API reported it.
  - [LangExtract.Result](LangExtract.Result.md): A completed extraction run: document-ordered spans plus per-chunk errors.
  - [LangExtract.Runner](LangExtract.Runner.md): A caller-owned, supervised extraction runner with a shared request budget.
  - [LangExtract.Serializer](LangExtract.Serializer.md): Serialization and deserialization of extraction results.
  - [LangExtract.Span](LangExtract.Span.md): An aligned extraction with its byte position in the source text.
  - [LangExtract.Template](LangExtract.Template.md): The extraction task definition: a plain-language description of what to
extract, plus few-shot examples showing the expected output.
  - [LangExtract.Template.Example](LangExtract.Template.Example.md): A single few-shot example: a sample `text` paired with the extractions
expected from it.

- Advanced
  - [LangExtract.Alignment.Aligner](LangExtract.Alignment.Aligner.md): Maps extraction strings to byte spans in source text.
  - [LangExtract.Chunker](LangExtract.Chunker.md): Splits text into sentence-level chunks using the Alignment.Tokenizer.
  - [LangExtract.Chunker.Chunk](LangExtract.Chunker.Chunk.md): A chunk of text with its byte offset in the source.

  - [LangExtract.Pipeline](LangExtract.Pipeline.md): Extraction pipeline: normalize LLM output, parse extractions, align to source text.

  - [LangExtract.Prompt.Builder](LangExtract.Prompt.Builder.md): Renders Q&A-formatted prompts from a template for LLM extraction.
  - [LangExtract.WireFormat](LangExtract.WireFormat.md): Port between external LLM format and internal domain.

- Providers
  - [LangExtract.Provider.Claude](LangExtract.Provider.Claude.md): Claude (Anthropic) provider for LLM inference.
  - [LangExtract.Provider.Gemini](LangExtract.Provider.Gemini.md): Gemini (Google) provider for LLM inference.
  - [LangExtract.Provider.OpenAI](LangExtract.Provider.OpenAI.md): OpenAI provider for LLM inference.

- Internal
  - [LangExtract.Alignment.Token](LangExtract.Alignment.Token.md): A token with its byte position in the source text.
  - [LangExtract.Alignment.Tokenizer](LangExtract.Alignment.Tokenizer.md): Regex-based tokenizer that splits text into tokens with byte offsets.
  - [LangExtract.Orchestrator](LangExtract.Orchestrator.md): Wires the full extraction pipeline.
  - [LangExtract.Pipeline.Parser](LangExtract.Pipeline.Parser.md): Parses canonical extraction maps into `%Extraction{}` structs.
  - [LangExtract.Runner.Delivery](LangExtract.Runner.Delivery.md): Bounded delivery of supervised chunk results to a lazy caller-side stream.
  - [LangExtract.Runner.Limiter](LangExtract.Runner.Limiter.md): The runner's shared request budget: an RPM token bucket plus an in-flight
cap, with global backoff on `retry-after`.
  - [LangExtract.Runner.Request](LangExtract.Runner.Request.md): A single chunk request through the runner's budget, with the runner's
retry policy.

