For the complete documentation index, see llms.txt. This page is also available as Markdown.

DIS APIs

This page contains the API endpoints for all document intelligence services.

Extract text from a document

post

Upload a document (digital or scanned) in Base64 format and extract its text. Returns a file_id to track processing status.

Body
file_contentstringRequired

Base64 encoded input document

Example: JVBERi0xLjUKJ...
languagestring · enumRequired

Language of the input document

Example: englishPossible values:
file_typestring · enumRequired

Type of input document

Example: DigitalPossible values:
Responses
200

Text extraction initiated successfully

application/json
codeintegerOptionalExample: 200
http_statusstringOptionalExample: OK
timestampintegerOptional

Unix timestamp

Example: 1728887901
statusstringOptionalExample: success
post/v1/document/extract_text
curl --location 'https://cloud.olakrutrim.com/v1/document/extract_text'               -H 'Content-Type: application/json'               -d '{
    "file_content": "JVBERi0xLjUKJ...",
    "language": "english",
    "file_type": "Digital"
  }'
{
  "code": 200,
  "data": {
    "file_id": "2e3343b2-62ba-4275-866d-cac95738060d",
    "action": "extract_text",
    "file_status": "in-progress",
    "output_type": "URL"
  },
  "http_status": "OK",
  "timestamp": 1728887901,
  "status": "success"
}

Extract structured information from a document

post

Upload a document (digital or scanned) in Base64 format and extract entities such as PII, NER, or key-value pairs. Optionally specify custom keys to extract.

Body
file_contentstringRequired

Base64 encoded input document

Example: JVBERi0xLjUKJ...
languagestring · enumRequired

Language of the input document

Example: englishPossible values:
file_typestring · enumRequired

Type of input document

Example: DigitalPossible values:
keys_to_extractstring[]Optional

Optional list of specific keys to extract

Example: ["Name","Position"]
Responses
200

Information extraction initiated successfully

application/json
codeintegerOptionalExample: 200
http_statusstringOptionalExample: OK
timestampintegerOptional

Unix timestamp

Example: 1728900386
statusstringOptionalExample: success
post/v1/document/extract_information
curl --location 'https://cloud.olakrutrim.com/v1/document/extract_information'               -H 'Content-Type: application/json'               -d '{
    "file_content": "JVBERi0xLjUKJ...",
    "language": "english",
    "entities": ["PII", "NER", "key_value"],
    "file_type": "Digital",
    "keys_to_extract": ["Name", "Position"]
  }'
{
  "code": 200,
  "data": {
    "file_id": "c6605e15-1e00-4ff3-ae13-dcaf7db3a5b6",
    "action": "extract_information",
    "file_status": "in-progress",
    "output_type": "URL"
  },
  "http_status": "OK",
  "timestamp": 1728900386,
  "status": "success"
}

Summarize a document

post

Upload a document (digital or scanned) in Base64 format and generate a summarized version according to the specified word count.

Body
file_contentstringRequired

Base64 encoded input document

Example: JVBERi0xLjUKJ...
languagestring · enumRequired

Language of the input document

Example: englishPossible values:
file_typestring · enumRequired

Type of input document

Example: DigitalPossible values:
word_count_for_summarizationintegerRequired

Target word count for summarization

Example: 400
Responses
200

Document summarization initiated successfully

application/json
codeintegerOptionalExample: 200
http_statusstringOptionalExample: OK
timestampintegerOptional

Unix timestamp

Example: 1729177264
statusstringOptionalExample: success
post/v1/document/doc_summarization
curl --location 'https://cloud.olakrutrim.com/v1/document/doc_summarization'               -H 'Content-Type: application/json'               -d '{
    "file_content": "JVBERi0xLjUKJ...",
    "language": "english",
    "file_type": "Digital",
    "word_count_for_summarization": 400
  }'
{
  "code": 200,
  "data": {
    "file_id": "275ebec1-732b-4f60-92ad-2a6776ec8359",
    "action": "doc_summarization",
    "file_status": "in-progress",
    "output_type": "URL"
  },
  "http_status": "OK",
  "timestamp": 1729177264,
  "status": "success"
}

Mask Personally Identifiable Information in a document

post

Upload a document (digital or scanned) in Base64 format and mask sensitive fields like names, positions, and other specified keys.

Body
file_contentstringRequired

Base64 encoded input document

Example: JVBERi0xLjUKJ...
languagestring · enumRequired

Language of the input document

Example: englishPossible values:
file_typestring · enumRequired

Type of input document

Example: DigitalPossible values:
keys_to_maskstring[]Required

List of keys/fields to be masked in the document

Example: ["Name","Position"]
Responses
200

PII masking initiated successfully

application/json
codeintegerOptionalExample: 200
http_statusstringOptionalExample: OK
timestampintegerOptional

Unix timestamp

Example: 1728900444
statusstringOptionalExample: success
post/v1/document/PII_masking
curl --location 'https://cloud.olakrutrim.com/v1/document/PII_masking'               -H 'Content-Type: application/json'               -d '{
    "file_content": "JVBERi0xLjUKJ...",
    "language": "english",
    "file_type": "Digital",
    "keys_to_mask": ["Name", "Position"]
  }'
{
  "code": 200,
  "data": {
    "file_id": "6b48dc49-2db8-45c5-b34f-8e8c675b7f32",
    "action": "PII_masking",
    "file_status": "in-progress",
    "output_type": "URL"
  },
  "http_status": "OK",
  "timestamp": 1728900444,
  "status": "success"
}

Get document status

get

Retrieve the status of a document processing request using its file_id.

Query parameters
file_idstringRequired

The unique ID of the uploaded document.

Responses
200

Status retrieved successfully

application/json
get/v1/document/status
curl --location 'https://cloud.olakrutrim.com/v1/document/status?file_id=ff0da790-46a0-4a37-a8a8-82765aff5733'
{
  "code": 200,
  "data": {
    "file_id": "ff0da790-46a0-4a37-a8a8-82765aff5733",
    "output_file": "https://blr1.kos.olakrutrimsvc.com/document-intelligence-service/048142d3-6eb4-4b62-be69-d8134a8045eb/ff0da790-46a0-4a37-a8a8-82765aff5733_85E3UIIG562I-output?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...",
    "file_status": "success",
    "output_type": "URL"
  },
  "http_status": "OK",
  "timestamp": 1729177465,
  "status": "success"
}

Last updated

Was this helpful?