Build, Test, and Deploy Extraction APIs in Minutes

Get full, programmatic access to the Retriv.ai agentic extraction platform via our REST API and Python Library. Get your free API key and start building today.

Go from PDF to JSON in < 3 Minutes

A simple, 3-step code-based walkthrough.

1

Install the Library

pip install retriv_ai
2

Configure Your Client

import os
from retriv_ai import RetrivClient

# Set your API key from environment variables
client = RetrivClient(api_key=os.environ['RETRIV_API_KEY'])
3

Run Extraction

# Define the data you want
schema = {
  "invoice_number": "string",
  "total_due": "float",
  "issuer_name": "string"
}

# Run extraction
document = client.extract(
  file_path="my_invoice.pdf",
  schema=schema
)

# Use your data!
print(document.json)

This simple workflow gives you a powerful, scalable, and persistent API for extracting data from invoices. No training, no templates, no MLOps.

A Flexible API for Any Workflow

Three core endpoints to power your document intelligence needs.

Parse API

The foundational endpoint. Upload any document (PDF, JPG, PNG) and get back a complete, hierarchical JSON representation of its layout and content. Perfect for building your own RAG pipeline.

Extract API

The "magic" endpoint. Provide a document and a JSON schema, and get back the extracted, structured data, complete with visual grounding. This is the fastest way to production.

Parse Jobs API

For the big stuff. Asynchronously process massive, 1000+ page documents or large batches of files. Retriv.ai will process them in the background and send you a webhook when your structured data is ready.

Everything You Need to Build