> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt.
> For full documentation content in one file, see https://docs.sarvam.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Sarvam Vision

> Sarvam Vision - A 3B parameter multimodal model delivering world-class Document Intelligence and visual understanding with unmatched accuracy for 23 languages (22 Indian + English).

**Sarvam Vision** is a 3B parameter state-space Vision Language Model (VLM) purpose-built for high-accuracy Document Intelligence. It powers our Document Intelligence pipeline.

## At a Glance

|                       |                                                                                                           |
| --------------------- | --------------------------------------------------------------------------------------------------------- |
| **Model ID**          | `sarvam-vision`                                                                                           |
| **What it does**      | Document intelligence — text extraction, table conversion, and structure preservation from PDFs and scans |
| **Languages**         | 23 (22 Indian + English) — [full list](#supported-languages)                                              |
| **APIs**              | [Document AI](/api/api-guides-tutorials/document-intelligence/overview) — Digitise and Extract            |
| **Input limits**      | 10 pages per PDF, 200 MB per file — [all limits](#limits)                                                 |
| **Pricing**           | [Pricing page](/api/getting-started/pricing)                                                              |
| **Best for**          | Digitizing scanned archives, Indic OCR, table-heavy documents                                             |
| **Known limitations** | 10-page cap per job — split larger PDFs before uploading                                                  |

## Why Sarvam Vision?

One of the most challenging problems in vision AI today is accurate document intelligence for Indian languages. Much of India's knowledge—historical texts, government records, academic papers, and cultural archives—remains locked in libraries, scanned collections, and legacy documents. Unlocking this vast repository is essential for preserving cultural heritage and making knowledge accessible.

While frontier Vision Language Models have set a high bar for processing modern English documents, a significant gap remains: most global models treat Indian languages as secondary, often resulting in lower accuracy for regional scripts. **Sarvam Vision bridges this gap** with native support for 22 Indian languages, delivering world-class accuracy where others fall short.

Want to learn more about how we built Sarvam Vision? Check out our [blog post](https://www.sarvam.ai/blogs).

---

## What You Can Do

* **Text Extraction**: Extract text from PDFs and scanned documents in 23 languages (22 Indian + English)
* **Tables**: Convert complex tables to HTML or Markdown
* **Structure Preservation**: Maintain document layout, reading order, and hierarchies

---

## Supported Languages

All 22 official Indian languages plus English:

| Language  | Code    | Language | Code     | Language | Code     |
| --------- | ------- | -------- | -------- | -------- | -------- |
| Hindi     | `hi-IN` | Assamese | `as-IN`  | Konkani  | `kok-IN` |
| Bengali   | `bn-IN` | Urdu     | `ur-IN`  | Maithili | `mai-IN` |
| Tamil     | `ta-IN` | Sanskrit | `sa-IN`  | Sindhi   | `sd-IN`  |
| Telugu    | `te-IN` | Nepali   | `ne-IN`  | Kashmiri | `ks-IN`  |
| Marathi   | `mr-IN` | Dogri    | `doi-IN` | Manipuri | `mni-IN` |
| Gujarati  | `gu-IN` | Bodo     | `brx-IN` | Santali  | `sat-IN` |
| Kannada   | `kn-IN` | Punjabi  | `pa-IN`  | English  | `en-IN`  |
| Malayalam | `ml-IN` | Odia     | `od-IN`  |          |          |

---

## Capabilities

#### Text Extraction

<h3>
  High-Fidelity Document Intelligence
</h3>

<p>
  Sarvam Vision extracts text from documents with exceptional accuracy, preserving the original structure and reading order across 23 languages (22 Indian + English).
</p>

**Features:**

* High-accuracy text extraction from PDFs and scanned documents
* Preserves document layout and reading order
* Native support for all Indian scripts
* Outputs clean HTML or Markdown

#### Tables

<h3>
  Mastering Complex Tables
</h3>

<p>
  Financial reports and scientific papers are notorious for complex tables—merged cells, multi-level headers, and invisible borders. Where traditional tools scramble this data into a jumbled mess, Sarvam Vision understands the spatial relationships.
</p>

**Features:**

* Preserves row/column structure perfectly
* Handles merged cells and multi-level headers
* Supports invisible borders and complex layouts
* Outputs clean HTML or Markdown tables

#### Multilingual

<h3>
  End-to-End Indic Support
</h3>

<p>
  Unlike other models that force translation to English, Sarvam Vision supports both input and output in all 23 languages (22 Indian + English).
</p>

**Examples:**

* Marathi financial report → Structured Marathi content
* Tamil official document → Tamil structured output
* Bengali textbook → Full Bengali structured output

---

## Quick Start

Get started with Document AI for high-fidelity text extraction across all supported languages. Create the job in one call, poll until it reaches a terminal state, then fetch the output.

#### Python

```python
import os, time
from sarvamai import SarvamAI

client = SarvamAI(api_subscription_key=os.environ["SARVAM_API_KEY"])

# Create and submit a digitise job in one call
with open("document.pdf", "rb") as f:
    job = client.doc_ai.digitise(
        file=[("document.pdf", f, "application/pdf")],
        language="hi-IN",
        output_format="md",   # "html" (default) or "md"
    )
print("job created:", job.job_id, "| status:", job.status)

# Poll until the job reaches a terminal state
TERMINAL = {"completed", "partially_completed", "failed", "rejected"}
while True:
    st = client.doc_ai.get_status(job_id=job.job_id)
    print(f"status={st.status} pages={st.usage.pages_processed}/{st.usage.pages_total}")
    if st.status.lower() in TERMINAL:
        break
    time.sleep(5)

# Fetch the output (a ZIP holding the .md plus page-level JSON)
if st.status.lower() in ("completed", "partially_completed"):
    dl = client.doc_ai.get_download_url(job_id=job.job_id)
    print("download:", dl.method, dl.url)
```

#### JavaScript

```javascript
import fs from "fs";
import { SarvamAIClient } from "sarvamai";

const client = new SarvamAIClient({ apiSubscriptionKey: process.env.SARVAM_API_KEY });

async function main() {
  // Create and submit a digitise job in one call
  const job = await client.docAi.digitise({
    file: [fs.createReadStream("document.pdf")],
    language: "hi-IN",
    output_format: "md",   // "html" (default) or "md"
  });
  console.log("job created:", job.job_id, "| status:", job.status);

  // Poll until the job reaches a terminal state
  const TERMINAL = new Set(["completed", "partially_completed", "failed", "rejected"]);
  let st;
  while (true) {
    st = await client.docAi.getStatus(job.job_id);
    console.log(`status=${st.status} pages=${st.usage.pages_processed}/${st.usage.pages_total}`);
    if (TERMINAL.has(st.status.toLowerCase())) break;
    await new Promise((resolve) => setTimeout(resolve, 5000));
  }

  // Fetch the output (a ZIP holding the .md plus page-level JSON)
  if (["completed", "partially_completed"].includes(st.status.toLowerCase())) {
    const dl = await client.docAi.getDownloadUrl(job.job_id);
    console.log("download:", dl.method, dl.url);
  }
}

main();
```

See the [Document AI overview](/api/api-guides-tutorials/document-intelligence/overview) for schema-based **Extract**, output formats, and the full job lifecycle.

#### Legacy: the document\_intelligence job API

Superseded by `doc_ai` above. The older Document Digitization API used a multi-step
job flow (create → upload → start → poll → download) and is still supported for
existing integrations. New integrations should use `doc_ai`.

#### Python

```python
from sarvamai import SarvamAI

client = SarvamAI(
    api_subscription_key="YOUR_SARVAM_API_KEY"
)

# Create a document intelligence job
job = client.document_intelligence.create_job(
    language="hi-IN",
    output_format="md"
)
print(f"Job created: {job.job_id}")

# Upload document
job.upload_file("document.pdf")
print("File uploaded")

# Start processing
job.start()
print("Job started")

# Wait for completion
status = job.wait_until_complete()
print(f"Job completed with state: {status.job_state}")

# Get processing metrics
metrics = job.get_page_metrics()
print(f"Page metrics: {metrics}")

# Download output (ZIP file containing the processed document)
job.download_output("./output.zip")
print("Output saved to ./output.zip")
```

#### JavaScript

```javascript
import { SarvamAIClient } from "sarvamai";

const client = new SarvamAIClient({
    apiSubscriptionKey: "YOUR_SARVAM_API_KEY"
});

async function main() {
    // Create a document intelligence job
    const job = await client.documentIntelligence.createJob({
        language: "hi-IN",
        outputFormat: "md"
    });
    console.log(`Job created: ${job.jobId}`);

    // Upload document
    await job.uploadFile("document.pdf");
    console.log("File uploaded");

    // Start processing
    await job.start();
    console.log("Job started");

    // Wait for completion
    const status = await job.waitUntilComplete();
    console.log(`Job completed with state: ${status.job_state}`);

    // Get processing metrics
    const metrics = job.getPageMetrics();
    console.log("Page metrics:", metrics);

    // Download output (ZIP file containing the processed document)
    await job.downloadOutput("./output.zip");
    console.log("Output saved to ./output.zip");
}

main();
```

---

## Model Specifications

#### Technical Specifications

<ul>
  <li>
    <strong>Model Size</strong>

    : 3B parameters
  </li>

  <li>
    <strong>Supported Input Formats</strong>

    : PDF, PNG, JPG, ZIP (flat archive with JPG/PNG document pages)
  </li>

  <li>
    <strong>Output Formats</strong>

    : HTML, Markdown (md) (delivered as ZIP file). JSON with structured page-level data is always included by default, regardless of the chosen output format.
  </li>

  <li>
    <strong>Languages</strong>

    : 23 languages (22 Indian + English)
  </li>
</ul>

---

## Limits

| Limit                   | Value                                                                               |
| ----------------------- | ----------------------------------------------------------------------------------- |
| Max pages per PDF       | 10 (`400 invalid_request_error` if exceeded)                                        |
| Max images per ZIP      | 10                                                                                  |
| Max file size           | 200 MB                                                                              |
| Supported input formats | PDF, PNG, JPG, ZIP                                                                  |
| Rate limit              | 10 requests/minute (all plans) — see [Rate Limits](/api/getting-started/ratelimits) |

---

## Next Steps

#### [Developer Quickstart](/api/api-guides-tutorials/document-intelligence/overview)

Learn how to integrate Document Intelligence into your application.

#### [API Reference](/api/api-guides-tutorials/document-intelligence/overview)

Complete API documentation for Document Intelligence endpoints.

#### [Try in API Dashboard](https://dashboard.sarvam.ai)

Get your API key and start processing documents.