Generated API
Generated OCR Python
Quick-Start
from mindee import Client, PathInput, PredictResponse, product
# Init a new client
mindee_client = Client(api_key="my-api-key")
# Add the corresponding endpoint (document). Set the account_name to "mindee" if you are using OTS.
my_endpoint = mindee_client.create_endpoint(
account_name="my-account",
endpoint_name="my-endpoint",
version="my-version"
)
# Load a file from disk
input_doc = PathInput("/path/to/the/file.ext")
# Parse the file.
# The endpoint must be specified since it cannot be determined from the class.
result: PredictResponse = mindee_client.enqueue_and_parse(
product.GeneratedV1,
input_source,
endpoint=my_endpoint
)
# Print a brief summary of the parsed data
print(result.document)
# # Iterate over all the fields in the document
# for field_name, field_values in result.document.inference.prediction.fields.items():
# print(field_name, "=", field_values)Generated Endpoints
Field Types
Generated Fields
Generated List Field
Generated Object Field
StringField
Attributes
Fields
Nested fields
Last updated
Was this helpful?

