# Document intelligence like you trained your own OCR model

URL: https://interfaze.ai/ocr

Backed by

![Y Combinator](https://interfaze.ai/yc_logo.svg)

Combinator

Extract text and objects from PDFs, scanned documents, and images with per-word bounding boxes and confidence scores. 100+ languages, layout-aware, and structured output.

[Try the demo ->](https://interfaze.ai/ocr#demo)[OCR docs ->](https://interfaze.ai/docs/vision/ocr)

## Free OCR demo

This is a limited preview and does not reflect the full model's capabilities. [Sign up](https://interfaze.ai/dashboard/playground) to access the full experience.

## What you get

-   Per-word and per-line bounding boxes with confidence scores
-   100+ languages including mixed-language documents
-   Layout-aware: tables, multi-column, headers & footers
-   Native PDF and image support (PNG, JPEG, WebP, TIFF)
-   Structured output extraction with any JSON schema
-   Precontext metadata: raw OCR data alongside model responses
-   Old scans, handwriting, math equations, degraded documents
-   <5s latency for single-page OCR tasks

## Works with any AI SDK

[

full docs ->

](https://interfaze.ai/docs/vision/ocr)

OpenAI-compatible chat completion API — drop in your existing SDK.

**OpenAI SDK · typescript**

```typescript
import OpenAI from "openai";
import { z } from "zod";
import { zodResponseFormat } from "openai/helpers/zod";

const interfaze = new OpenAI({
    baseURL: "https://api.interfaze.ai/v1",
    apiKey: "<your-api-key>"
});

const InvoiceSchema = z.object({
    vendor: z.string(),
    date: z.string(),
    items: z.array(z.object({
        description: z.string(),
        amount: z.string()
    })),
    total: z.string(),
});

const response = await interfaze.chat.completions.create({
    model: "interfaze-beta",
    messages: [{
        role: "user",
        content: [
            { type: "text", text: "Extract the invoice details" },
            { type: "image_url", image_url: { url: "https://example.com/invoice.pdf" } },
        ],
    }],
    response_format: zodResponseFormat(InvoiceSchema, "invoice"),
});

console.log(response.choices[0].message.content);
```

**Vercel AI SDK · typescript**

```typescript
import { createOpenAI } from "@ai-sdk/openai";
import { generateText, Output } from "ai";
import { z } from "zod";

const interfaze = createOpenAI({
    baseURL: "https://api.interfaze.ai/v1",
    apiKey: "<your-api-key>"
});

const InvoiceSchema = z.object({
    vendor: z.string(),
    date: z.string(),
    items: z.array(z.object({
        description: z.string(),
        amount: z.string()
    })),
    total: z.string(),
});

const { output } = await generateText({
    model: interfaze.chat("interfaze-beta"),
    output: Output.object({ schema: InvoiceSchema }),
    messages: [{
        role: "user",
        content: [
            { type: "text", text: "Extract the invoice details" },
            {
                type: "image",
                mediaType: "image/jpeg",
                image: "https://example.com/invoice.pdf",
            },
        ],
    }],
});

console.log(output);
```

**LangChain SDK · typescript**

```typescript
import { ChatOpenAI } from "@langchain/openai";
import { z } from "zod";

const interfaze = new ChatOpenAI({
    configuration: { baseURL: "https://api.interfaze.ai/v1" },
    apiKey: "<your-api-key>",
    model: "interfaze-beta",
});

const InvoiceSchema = z.object({
    vendor: z.string(),
    date: z.string(),
    items: z.array(z.object({
        description: z.string(),
        amount: z.string()
    })),
    total: z.string(),
});

const structuredModel = interfaze.withStructuredOutput(InvoiceSchema);

const response = await structuredModel.invoke([{
    role: "user",
    content: [
        { type: "text", text: "Extract the invoice details" },
        {
            type: "image_url",
            image_url: { url: "https://example.com/invoice.pdf" },
        },
    ],
}]);

console.log(response);
```

**OpenAI SDK · python**

```python
import openai
from pydantic import BaseModel, Field
from typing import List

interfaze = openai.OpenAI(
    base_url="https://api.interfaze.ai/v1",
    api_key="<your-api-key>"
)

class InvoiceItem(BaseModel):
    description: str
    amount: str

class InvoiceSchema(BaseModel):
    vendor: str
    date: str
    items: List[InvoiceItem]
    total: str

response = interfaze.chat.completions.create(
    model="interfaze-beta",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "Extract the invoice details"},
            {"type": "image_url", "image_url": {"url": "https://example.com/invoice.pdf"}},
        ],
    }],
    response_format={
        "type": "json_schema",
        "json_schema": {
            "name": "invoice",
            "schema": InvoiceSchema.model_json_schema(),
        }
    },
)

print(response.choices[0].message.content)
```

**LangChain SDK · python**

```python
from langchain_openai import ChatOpenAI
from langchain_core.messages import HumanMessage
from pydantic import BaseModel
from typing import List

interfaze = ChatOpenAI(
    base_url="https://api.interfaze.ai/v1",
    api_key="<your-api-key>",
    model="interfaze-beta"
)

class InvoiceItem(BaseModel):
    description: str
    amount: str

class InvoiceSchema(BaseModel):
    vendor: str
    date: str
    items: List[InvoiceItem]
    total: str

structured_llm = interfaze.with_structured_output(InvoiceSchema)

response = structured_llm.invoke([
    HumanMessage(content=[
        {"type": "text", "text": "Extract the invoice details"},
        {"type": "image_url", "image_url": {"url": "https://example.com/invoice.pdf"}},
    ])
])

print(response)
```

Setup with agents

## Use cases

Invoices & receipts

Line items, totals, tax, vendor details

IDs & passports

Names, DOB, document numbers, photos

Forms & applications

Field-level extraction with labels

Contracts & legal

Clauses, parties, dates, signatures

Academic papers

Equations, citations, figures, tables

Historical scans

Degraded text, old typefaces, handwriting

## Run task mode

[

run tasks docs ->

](https://interfaze.ai/docs/run-tasks)

Skip the full model and run OCR directly — faster, cheaper, and returns raw bounding boxes with confidence scores.

```
// System prompt triggers raw OCR mode
{ role: "system", content: "<task>ocr</task>" }

// Returns sections with bounding boxes:
{
  "extracted_text": "California\nDRIVER LICENSE\n...",
  "sections": [{
    "lines": [{
      "text": "California",
      "bounds": { "top_left": { "x": 63, "y": 89 }, ... },
      "average_confidence": 0.99,
      "words": [{ "text": "California", "confidence": 0.99 }]
    }]
  }],
  "width": 698,
  "height": 525
}
```

## OCR benchmarks

[

full breakdown ->

](https://interfaze.ai/leaderboards/olmocr)

Interfaze leads on olmOCR with 85.7% overall accuracy across tables, old scans, math, multi-column, and more.

| Model | olmOCR | OCRBench V2 |
| --- | --- | --- |
| Interfaze | 85.7% | 70.7% |
| Gemini-3-Flash | 75.3% | 55.8% |
| Gemini-3.5-Flash | 82.3% | 63.9% |
| Claude-Sonnet-4.6 | 73.9% | 54.7% |
| Claude-Sonnet-5 | 83.5% | 59.2% |
| GPT-5.4-Mini | 80.1% | 52.7% |
| Grok-4.3 | 81.9% | 54.7% |

[

olmOCR breakdown ->

](https://interfaze.ai/leaderboards/olmocr)[

OCRBench V2 breakdown ->

](https://interfaze.ai/leaderboards/ocrbench-v2)

## Pricing

[

pricing details ->

](https://interfaze.ai/pricing)

Input tokens

$1.50 / MTok

Output tokens

$3.50 / MTok

Caching

Included

## FAQs

[

all faqs ->

](https://interfaze.ai/docs/faqs)

What are the rate limits?

You can make 50 requests per second. If you need more, please contact us at support@interfaze.ai

How do I track my usage?

You can track your usage on the dashboard. We'll be adding more detailed metrics and analytics in the future.

Are my messages/prompts stored?

We don't store or log any messages or prompts by default. When we do offer observability and logging in the future, you will have the option to allow or disallow storage.

How do I report bugs?

We do expect many bugs and issues. Please report them to us at support@interfaze.ai

How do I get in contact with the team for other inquiries?

Please email us at support@interfaze.ai or reach out to Yoeven on X: https://x.com/yoeven

## Start extracting text from documents

Free tier available. No credit card required.

[Get started ->](https://interfaze.ai/dashboard/playground)[Talk to sales](https://interfaze.ai/sales)

Setup with agents
