Introduction
UiForm solves three major challenges in document processing with LLMs:
- Universal Document Processing: Convert any file type (PDFs, Excel, emails, etc.) into LLM-ready format without writing custom parsers
- Structured, Schema-driven Extraction: Get consistent, reliable outputs using schema-based prompt engineering
- Automations: Create custom mailboxes and links to process documents at scale
We see it as building Stripe for document processing.
Our goal is to make the process of analyzing documents and unstructured data as easy and transparent as possible.
Many people haven’t yet realized how powerful LLMs have become at document processing tasks - we’re here to help unlock these capabilities.
How it works
UiForm allows you to easily create document processing automations. Here is the general workflow:
General philosophy
Our goal is to :
Document Processing
Helping you leverage OpenAI API to do document processing tasks with structured generations
Automation
Create custom mailboxes and links connected to your webhooks to process documents at scale
Optimization
Identify the most used automations and help you finetune models to reduce costs and improve performance
We currently support OpenAI, Anthropic, Gemini and xAI models.
You come with your own API key from your favorite AI provider, and we handle the rest.
Quickstart
Setup the Python SDK
Install the UiForm Python SDK and configure your API keys to start processing documents with your preferred AI provider
Create your JSON schema
Define the structure of the data you want to extract from your documents using our schema format with custom prompting capabilities
Create your FastAPI server with a webhook
Set up an endpoint that will receive the structured data extracted from your documents after processing
Create your automation
Configure an automation (mailbox or link) that will automatically process incoming documents using your schema and send results to your webhook
Test your automation
Validate your setup by sending test documents through your automation and verify the extracted data matches your requirements
Step 1: Setup the Python SDK
To get started, install the uiform
package using pip:
Then, create your API key on uiform.com and populate your env
variables:
Then, as we will use your API key to make requests to OpenAI on your behalf within an automation, you need to store your API key in the UiForm secrets manager:
Process your first document
Here is how to process your first document with the create_messages method:
Step 2 : Create your JSON Schema
We use a standard JSON Schema with custom annotations (X-SystemPrompt
, X-FieldPrompt
, and X-ReasoningPrompt
) as a prompt-engineering framework for the extraction process.
These annotations help guide the LLM’s behavior and improve extraction accuracy. You can learn more about these in our JSON Schema documentation.
Step 3: Create your FastAPI server with a webhook
Next, set up a FastAPI route that will handle incoming webhook POST requests. Below is an example of a simple FastAPI application with a webhook endpoint:
You can test the webhook endpoint locally with a tool like curl or Postman. For example, using curl:
Step 4: Create your automation
Finally, integrate the webhook with your automation system using the uiform
client. This example demonstrates how to create an automation that triggers the webhook when a matching event occurs:
At any email sent to invoices@mailbox.uiform.com
, the automation will send a POST request to your FastAPI webhook endpoint, where the payload can be processed.
You can see the automation you just created on your dashboard !
Step 5: Test your automation
Finally, you can test the automation rapidly with the test functions of the sdk:
That’s it! You can start processing documents at scale. You have 1000 free requests to get started, and you can subscribe to the pro plan to get more.
But this minimalistic example is just the beginning. Continue reading to learn more about how to use UiForm to its full potential.
Go further
- Prompt Engineering Guide
- General Concepts
- Create mailboxes
- Create links
- Finetuning (coming soon)
- Prompt optimization (coming soon)
- Data-Labelling with our AI-powered annotator (coming soon)
Jupyter Notebooks
You can view minimal notebooks that demonstrate how to use UiForm to process documents:
- Mailbox creation quickstart
- Upload Links creation quickstart
- Document Extractions quickstart
- Document Extractions quickstart - Async
Community
Let’s create the future of document processing together!
Join our discord community to share tips, discuss best practices, and showcase what you build. Or just tweet at us.
We can’t wait to see how you’ll use UiForm.
Roadmap
We share our roadmap publicly on Github
Among the features we’re working on:
[ ] Node.js SDK [ ] Finetuning [ ] Prompt optimization [ ] Data-Labelling platform