Skip to content

Gemina:
Document APIs for extraction, search and chat

We built Gemina, AI document APIs that extract and classify files, then let products search them and chat with them, with citations to the source.

Client: GeminaIndustry: SaaS & TechnologyService: AI & Automation

Live at:
Extract, search and total, or ask
3 ways
MCP tools for AI agents
16
SDKs, plus a REST API
5

Overview

Project
at a glance

Industry
SaaSDeveloper APIs for document processing, used by products that handle invoices, contracts, forms and similar files.
How we worked
Product engineering teamOur product engineering team worked across the document pipeline, the developer APIs and the chat experience.
Goal
Answers, not only textTake a product from an uploaded document to structured data, search, totals and cited answers through one API.
What we built
Document AI APIsAPIs for extraction, classification, search and document chat, available by REST, SDK, MCP or a drop-in chat component.

Client

Who we
built it for

Gemina

Document AI APIs for product teams and SaaS platforms

About the client
Developer APIs for document processing, used by products that handle invoices, contracts, forms and similar files.
What they needed
Take a product from an uploaded document to structured data, search, totals and cited answers through one API.
Where they were
Plain OCR only returns text. A product team still has to work out which number is the invoice total, store the result, make it searchable and answer questions about it.

Engagement snapshot

Industry
SaaS
Service
AI & Automation
Engagement
Product engineering team
Delivered
Document AI APIs
Headline result
3 ways · Extract, search and total, or ask

The challenge

What was getting
in the way

Plain OCR only returns text. A product team still has to work out which number is the invoice total, store the result, make it searchable and answer questions about it.

Calling a language model directly helps with single answers, but it leaves storage, search and security to build. Asking a model to add up figures also carries a risk, because a total can look right and still be wrong.

  • Text without structure

    Raw OCR output cannot feed an accounting system or a workflow until someone maps it to fields.

  • Estimated numbers

    Totals generated by a model, rather than calculated, are hard to trust in finance work.

  • Answers with no source

    A chat reply that cannot point back to a document leaves users checking it by hand.

The solution

What
we built

  1. 01

    Typed extraction

    We built extraction that returns document fields as typed JSON, including headers, line items and custom schemas, with a confidence score on each field.

    Output
    Typed JSON
    Models
    Invictus, Praetorian, Velox
    Templates
    AI-suggested, editable
  2. 02

    Search and exact totals

    Documents can be found by meaning or by field, and sums, averages and counts run as database queries over the extracted data.

    Search
    Meaning or field
    Totals
    Computed in the database
    Currencies
    Grouped, never mixed
  3. 03

    Chat with citations

    Users ask questions in plain language, and each answer links back to the documents it came from.

    Embed
    React component
    Sessions
    Scoped tokens
    Agents
    Hosted MCP server

Key features

What made it
useful

  • Templates

    Smart Templates

    Upload a sample and AI suggests the fields to extract. Teams can then add, remove or rename them and call the template by ID.

    Business impact

    Your own schema

  • Classification

    FileTag

    FileTag labels PDFs and images with metadata such as vendor, date, type and total, suggests filenames and offers an enriched copy to download.

    Business impact

    1,500 free tags a month

  • Review

    Human verification step

    Teams can embed the source document beside editable fields, and reviewers focus on the uncertain values.

    Business impact

    Audited corrections

Before and after

How the work
changed

Extraction

Before

OCR text to clean up

The usual route gives a block of text that still has to be mapped to fields by custom code.

After

Fields as typed JSON

Vendor, dates, totals and line items come back named and typed, each with its own confidence.

Totals

Before

Spreadsheets or model guesses

Spend figures are normally added up by hand or requested from a model that estimates them.

After

Database queries

Totals are calculated by the database, and the response says when missing data would undercount a figure.

Questions

Before

Opening each file

Finding a clause or an amount usually means searching for the file and then reading it.

After

Cited answers

Users ask directly and follow a citation to the source document.

Results

The business
difference

  1. Data

    Typed JSON output

    Documents become usable data

    A product can send in a document and receive fields it can store, filter and pass to other systems.

    Before: Plain textAfter: Typed fields

  2. Accuracy of method

    Database-computed totals

    Totals calculated, not estimated

    Sums run in the database, and a request across currencies returns separate groups instead of one mixed figure.

    Before: EstimatedAfter: Computed

  3. Access

    REST, SDKs, MCP, chat UI

    Several ways to integrate

    Developers can use REST or an SDK, connect an agent by MCP, or place the chat component inside their own product.

    Before: Custom pipelineAfter: One API

Trust and control

How we kept it
safe and reliable

  • 01

    Low-confidence flags

    Uncertain fields are flagged for review, so people can check them before the data is used.

    Flagged for review
  • 02

    Control over retention

    Customers set retention periods and can delete documents through the API or let purge dates remove them.

    Retention settings
  • 03

    Keys stay on the server

    The embedded chat uses scoped session tokens, so the customer's API key does not reach the browser.

    Scoped tokens
  • 04

    Clear about missing data

    When a number would undercount because data is missing, the response says so.

    Stated gaps

Faster delivery

Built on tested foundations

All four modules work from the same uploaded document, through the same API.

  • Extraction

    Reads documents and returns headers, line items and template fields.

  • Document intelligence

    Indexes documents for search and runs aggregations over extracted fields.

  • Chat

    Produces grounded answers that cite the source documents.

  • Agent access

    Exposes extraction, tagging, search and aggregation as MCP tools on one hosted server.

FAQ

Straight
answers

Have a different question? Ask it on a 30-minute call.

Ask us on a call

Gemina turns an uploaded document into typed JSON, including headers, line items and custom fields, with a confidence score on each field. The same document can then be searched, included in calculated totals and queried through chat. Each chat answer links back to the documents it came from, so users can check it.

Add document intelligence to your product

If your users still type figures out of invoices, contracts or forms, we can help you build AI that reads those files and shows its sources.