doc-ai
Document AI — Sarvam Vision
Live in-chat document work → sarvam-mcp (
sarvam_tools_vision_parse/_extract/_classify/_split). This skill = SDK code.
Deciding yes/no, a label or a score about text you already have (not a file)? → prism (
client.decisions.create).doc_ai.classify()here is for PDF/image files.
Translating a document into another language? → translate/document — a different API (
client.document_translation.*), not this one.
SDK floor for the code below: Python
sarvamai>=0.1.40, JSsarvamai@>=1.1.13. Older versions havedoc_ai.digitise()instead ofparse()and noclassify()/split().
[!IMPORTANT] Auth:
api-subscription-keyheader — NOTAuthorization: Bearer. Base URL:https://api.sarvam.ai(NOT/v1— that prefix is only for the OpenAI-compatible chat endpoint)
What this API does
Sarvam Vision is a 3B-parameter document-intelligence model, exposed through the Document AI API (SDK group: doc_ai / docAi). Four job types share one lifecycle (create → poll → fetch):