Skip to main content
Analyze a document with a language model

Authorizations

token
string
query
required

Standard authorization for most API calls. This token identifies the logged-in user and their permissions. It is obtained either as a temporary token after a successful login or as a long-term API key.

Path Parameters

id
string
required

Identifier of the document to analyze.

Minimum string length: 1
Pattern: ^[A-Za-z0-9_-]+$
Example:

"a0d01c9d-f72f-4c57-af11-e26bda19cc59"

Body

application/json
extractTermDates
boolean | null
default:false

Whether to also detect the contract's term - its expiration date, its renewal with the renewal period, notice and limits, and the notice of a contract that runs until it is terminated - and return every value found as a suggestion together with the passage it was read from and where that passage is printed. The term is read straight from the document's PDF, so it does not depend on the text extraction the other results come from. Nothing of it is written to the document. It cannot be asked for together with language or summaryOnly. Asking for it requires the right to use the document term (use_document_terms) and edit access to this document.

Example:

false

language
string | null

Language to write the summary and its key points in - one of the tenant's active languages that the caller's settings do not disable. Asking for a language narrows the answer to the summary section and never stores the summary on the document. Without it the summary is written in the caller's account language, then in the language of the caller's settings, then in English.

Minimum string length: 1
Pattern: ^[a-z][a-z-]+$
Example:

"en"

summaryOnly
boolean | null
default:false

Whether to narrow the answer to the summary section, for a view that only reads the document, such as the Sign View. Such a summary is never stored on the document, whatever the language and even for a caller who may edit the document.

Example:

false

Response

Returns what the model extracted - empty results when the document has no extracted text - and the term suggestions when they were asked for.

analysisError
object | null

Why the summary, category, sensitivity, personal data and tags are unavailable, when the term was asked for and their analysis failed; null otherwise.

category
object

Proposed classification of the document by subject. Left out of the summary section, which language or summaryOnly asks for.

labels
object

Tags proposed for the document. Left out of the summary section, which language or summaryOnly asks for.

language
string

Language the summary and its key points are written in - the one asked for, otherwise the caller's account language, then the language of the caller's settings, then English.

Example:

"en"

pii
object

Personal data recognized in the document.

sensitivity
object

Proposed sensitivity classification of the document. Left out of the summary section, which language or summaryOnly asks for.

summary
object

Summary of the document.

summaryStored
boolean

Whether this call stored the summary as the document's own summary, which advances the document's version - an edit prepared before the call then needs the document read again.

termSuggestions
object | null

The contract term detected in the document's PDF, when extractTermDates asked for it; null otherwise.