Method
getTextFromDocument POST
Copy POST

Generate text from a document

Arguments:

REQUIRED KEY TYPE DESCRIPTION
Yes deploymentToken str Authentication token to access created deployments. This token is only authorized to predict on deployments in the current project, and can be safely embedded in an application or website.
Yes deploymentId str Unique identifier of a deployment created under the project.
No document bytes Input document which can be an image, pdf, or word document (Some formats might not be supported yet)
No adjustDocOrientation bool (Optional) whether to detect the document page orientation and rotate it if needed.
No savePredictedPdf bool (Optional) If True, will save the predicted pdf bytes so that they can be fetched using the prediction docId. Default is False.
No saveExtractedFeatures bool (Optional) If True, will save extracted features (i.e. page tokens) so that they can be fetched using the prediction docId. Default is False.
Note: The arguments for the API methods follow camelCase but for Python SDK underscore_case is followed.

Response:

KEY TYPE DESCRIPTION
success Boolean true if the call succeeded, false if there was an error
Prediction

Exceptions:

TYPE WHEN
DataNotFoundError

deploymentId is not found.

Language: