> 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.

# 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.

<img src="https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sarvam-api-docs.docs.buildwithfern.com/158cdd21708730e59e9489fa5dcd97f9b3859e0c7a88ebcc9b18065be26d2979/api-reference-docs/document-intelligence/images/extract-project-start.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260814%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260814T115851Z&X-Amz-Expires=604800&X-Amz-Signature=8ae5cd8e25570d8312cf689d175fc9901fceec2ca96daa5bb13bec88f558bd28&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject" alt="Doc Agents Extract project setup showing a document upload and an extraction prompt describing the fields to extract." />

## 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.

<img src="https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sarvam-api-docs.docs.buildwithfern.com/66f5b91f88ef63d675964a4b75d8b1a01cfd0ac426b17b59705fa1791420b42b/api-reference-docs/document-intelligence/images/extract-project-config-tab.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260814%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260814T115851Z&X-Amz-Expires=604800&X-Amz-Signature=93fcb6b42cdf15134c5d8b328a858d4009df64faf19b179abe7a88f1811a93d1&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject" alt="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." />

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.

<img src="https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sarvam-api-docs.docs.buildwithfern.com/cf5348416f2f4b9cbb593c606f993623c619241d0235946bb273227f7821494b/api-reference-docs/document-intelligence/images/config-id-copy.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260814%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260814T115851Z&X-Amz-Expires=604800&X-Amz-Signature=cdf1a7690aad504e06039af6e816434ac19a60b71014eea850e286b1e55a34b6&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject" alt="Saved Config in Doc Agents showing the config_id UUID with a copy button." />

#### 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.

<img src="https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sarvam-api-docs.docs.buildwithfern.com/08ba220bdec34872deb5fc206f56021e9e53d63e7c0006d6f8c443539530252c/api-reference-docs/document-intelligence/images/deploy-as-api-endpoint.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260814%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260814T115851Z&X-Amz-Expires=604800&X-Amz-Signature=425f4cabc0c6ff4a03add077eae1bd6ccc50aa950464a1740c92f26ec5c9b633&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject" alt="Doc Agents Deploy as API endpoint dialog showing a curl command with the config_id pre-filled in the request body." />

## 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)
```

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