DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to serve document extraction through a FastAPI endpoint with Py Idp

Run the production FastAPI server so other systems can send documents and get fields back.

Short answer: Run pip install py-idp[api] to install the FastAPI server extra; then run idp serve to start the server; send a document to the /extract endpoint with an HTTP client. All steps.

Who it is forA backend developer who needs other internal services to submit documents over HTTP instead of running the Python library directly.

The problemEach service that needs extraction would otherwise have to install and configure the pipeline on its own.

The outcomeA running HTTP server with /extract, /templates, /healthz, and /metrics endpoints.

What you need first

  • Python with pip available
  • An API key for a hosted LLM backend such as OpenAI, or a local backend such as Ollama (the zero-config path runs on the in-tree mock backend without a key)
  • A sample PDF or text file to test with, such as invoice.pdf

Steps

  1. Run pip install py-idp[api] to install the FastAPI server extra.
  2. Run idp serve to start the server. (inferred, check the README)
  3. Send a document to the /extract endpoint with an HTTP client.
  4. Call /healthz to confirm the server is up.

Prompt for your agent

In the py-idp repo, start the FastAPI server with `idp serve`, then send <path to document> to the /extract endpoint. Return the JSON response. Verify that /healthz returns a healthy status before you send the document.

Caveat. The README does not document the request format for /extract, so read the API docs before writing a client.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for rollroyces/py-idp and "Serve document extraction through a FastAPI endpoint"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer