Get your config_id

View as Markdown

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 dashboard at indus.sarvam.ai. 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.
Start an Extract project: upload a document and describe what you want 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.

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.
Open the processed project and switch to the Config tab to refine the extraction schema.

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:

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.
The saved Config showing the config_id ready to copy.

Use it in an Extract call

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

1import os
2from sarvamai import SarvamAI
3
4client = SarvamAI(api_subscription_key=os.environ["SARVAM_API_KEY"])
5
6with open("./insurance-policy.pdf", "rb") as f:
7 job = client.doc_ai.extract(
8 file=[("insurance-policy.pdf", f, "application/pdf")],
9 config_id="019ff577-91b7-7dde-b128-c5f418d06881",
10 language="en-IN",
11 output_format="json",
12 )
13print("job created:", job.job_id, "| status:", job.status)

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