Skip to navigation

Digitise Document

View as Markdown

Creates and starts a digitise job from files or pre-uploaded handles. Digitise converts documents into structured HTML, Markdown, or JSON while preserving layout.

Input: Exactly one of file and upload_ids must be provided. Use POST /doc-ai/v1/job/upload to obtain upload IDs.

Processing: the job runs asynchronously. Poll GET /doc-ai/v1/job/{job_id}/status until a terminal status (completed, partially_completed, failed, rejected), then fetch output via the results or download-url endpoints.

Digitise JSON results include blocks with text, tag and bounding box.

Authentication

api-subscription-keystring
API Key authentication via header

Request

This endpoint expects a multipart form with multiple files.
filefilesOptional

Document file(s) to digitise. Repeatable multipart part. Exactly one of file and upload_ids must be provided.

upload_idsstringOptional

Comma-separated upload IDs returned by POST /doc-ai/v1/job/upload. Exactly one of file and upload_ids must be provided.

languagestringOptionalDefaults to hi-IN

Language of the document in BCP-47 format (e.g. hi-IN, en-IN). Defaults to Indic: when omitted, the document is processed as an Indic-language document. To process an English document, set language to en-IN. Sarvam Vision supports 22 Indian languages plus English; see the Sarvam Vision model page for the full list.

content_typeenumOptionalDefaults to printed
Nature of the document content.
Allowed values:
modelstringOptionalDefaults to sarvam-vision-v1
Model to use for digitisation.

Response

Created
job_idstring
The unique identifier of the job.
statusstring
Current status of the job.
run_idstring
The unique identifier of the job run.

Errors

400
Bad Request Error
402
Payment Required Error
403
Forbidden Error
413
Content Too Large Error
429
Too Many Requests Error
503
Service Unavailable Error