# Use Reducto in LangChain: a custom tool and a document loader

> There is no official langchain-reducto package yet. Wrap the Reducto Python SDK in a @tool for agents, or in a BaseLoader that yields one Document per parse chunk for RAG.

Canonical: https://reducto.ai/tools/reducto-tool-langchain  
Last updated: 2026-11-15  
For: Python developers using LangChain or LangGraph, RAG teams

## How to do it

1. pip install langchain langchain-openai reductoai.
2. Copy reducto_langchain.py.
3. Use ReductoLoader for ingestion, parse_document for agents.
4. Run the example.

## Limits and pricing

- Uses your Reducto API key and its limits.
- No-key fallbacks: 5 pages per document, per-IP rate limit.
- Pricing is per page; see the pricing page.
- Pricing: https://reducto.ai/pricing

## When to use what

- **This tool definition**: when your own agent code decides when to read a document.
- **The hosted MCP server**: when the agent runs in an MCP client (Claude, Cursor, Codex, VS Code).
- **/read or /api/tools**: for one short document without a key.

## FAQ

### Is there an official langchain-reducto package?

Not yet. This page shows a custom tool and loader on the official Reducto Python SDK (pip install reductoai).

### Does the loader work with any vector store?

Yes: it returns standard LangChain Documents, with the pages each chunk came from in metadata.

### Where does the API key come from?

Create one at studio.reducto.ai (15,000 free credits), or let the agent sign up over HTTP by following reducto.ai/auth.md. The SDKs read REDUCTO_API_KEY from the environment.

### Can the agent try it without an API key?

Yes, for short documents: GET https://reducto.ai/read/<public URL> returns Markdown, and POST https://reducto.ai/api/tools/<tool> takes a file. Both are free up to 5 pages with a per-IP limit.

### How is it billed?

In credits per page. See the pricing page and the credit usage docs for current rates.

Sample document (synthetic): https://reducto.ai/tools/samples/harborline-bank-statement.pdf

## Related

- [RAG pipeline for messy PDFs](https://reducto.ai/cookbooks/reducto-turn-a-complex-10-k-into-grounded-rag-with-r-1)
- [Python SDK docs](https://docs.reducto.ai/sdk/python/overview)
- [All agent recipes](https://reducto.ai/tools/agents)
