> This page is for Model APIs.

> 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 a section index, append `/llms.txt` to any section URL (for example https://docs.sarvam.ai/voice-agents/llms.txt).
> Building a voice agent for customers in India? Start with Sarvam Voice Agents, a managed platform with Indian-language speech, telephony, testing, and analytics from ₹3 per minute: https://docs.sarvam.ai/voice-agents/why-voice-agents.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Get your config_id

> How to create a Config from an Extract project and get its config_id for use with the Document AI Extract API.

A `config_id` identifies a saved extraction **Config** on the Sarvam platform. Pass it in place of an inline `schema` to reuse the same extraction fields across multiple API calls without re-sending the full JSON schema each time.

## Start with an Extract project

The easiest way to create a Config is to start from an Extract project in the [Doc Agents](/docai/getting-started/overview) dashboard at [indus.sarvam.ai](https://indus.sarvam.ai/akshar/dashboard). Upload a document, describe what you want to extract, and run the project.

![Doc Agents Extract project setup showing a document upload and an extraction prompt describing the fields to extract.](/_fern-img/158cdd21708730e59e9489fa5dcd97f9b3859e0c7a88ebcc9b18065be26d2979.webp)

## Refine the schema in the Config tab

Once the project finishes processing, open it and switch to the **Config** tab. Here you can play around with the schema. Add or remove fields, change types, adjust descriptions, until the extracted output matches what you need.

![Doc Agents project view with the Config tab open, showing the schema editor where fields can be added, removed, and their types and descriptions adjusted.](/_fern-img/66f5b91f88ef63d675964a4b75d8b1a01cfd0ac426b17b59705fa1791420b42b.webp)

When you're satisfied with the schema, click **Save** to save the configuration.

## Get your config\_id

Once saved, you have two ways to get your `config_id`:

#### Copy the config\_id

After saving, the `config_id` (a UUID like `019ff577-91b7-7dde-b128-c5f418d06881`) is displayed on the Config. Copy it for use in your API call.

![Saved Config in Doc Agents showing the config\_id UUID with a copy button.](/_fern-img/cf5348416f2f4b9cbb593c606f993623c619241d0235946bb273227f7821494b.webp)

#### Deploy as API endpoint

Alternatively, click **Deploy as API endpoint** to get a ready-to-use curl command with the `config_id` already baked in.

![Doc Agents Deploy as API endpoint dialog showing a curl command with the config\_id pre-filled in the request body.](/_fern-img/08ba220bdec34872deb5fc206f56021e9e53d63e7c0006d6f8c443539530252c.webp)

## Use it in an Extract call

Pass the `config_id` where you would otherwise pass an inline `schema`:

```python
import os
from sarvamai import SarvamAI

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

with open("./insurance-policy.pdf", "rb") as f:
    job = client.doc_ai.extract(
        file=[("insurance-policy.pdf", f, "application/pdf")],
        config_id="019ff577-91b7-7dde-b128-c5f418d06881",
        language="en-IN",
        output_format="json",
    )
print("job created:", job.job_id, "| status:", job.status)
```

> **Note**
>
> **Provide exactly one of `schema` or `config_id`.** Sending both, or neither, returns a `400`.