handshake-simpleManual Integration

Manual integration - reference only.

circle-exclamation
circle-check

If you would like to download the OpenAPI specification directly, it is available here: https://api-v2.mindee.net/openapi.jsonarrow-up-right

Send a file for an extraction product inference.

post

Send a file to the asynchronous processing queue for an extraction inference.

Results can be retrieved in two ways:

  • Loop on the polling_url endpoint in the response until the status is Processed or Failed (polling).

  • Use a webhook to be notified when the inference is finished. Webhooks can be configured on the platform on a per-model basis.

Inferences taking longer than 590 seconds will time out.

Authorizations
AuthorizationstringRequired
Body

Form to enqueue an inference for extraction models.

model_idstring · uuid4Required

Model ID to use for the inference.

fileany ofOptional

Upload a file as bytes. Required if url is not provided.

string · binaryOptional
or
nullOptional
urlany ofOptional

Download the file from a URL, must be secure (HTTPS) and publicly available. Required if file is not provided.

string · uri · min: 1 · max: 2048Optional
or
nullOptional
file_base64any ofOptional

Upload a file as a base 64 string. Used as an alternative to file. Not recommended, for specific use only.

Example: Base64String==
string · min: 15Optional
or
nullOptional
webhook_idsstring · uuid4[]Optional

Webhook IDs to call after all processing is finished. If empty, no webhooks will be used.

aliasany ofOptional

Use an alias to link the file to your own DB. If empty, no alias will be used.

Example: my_file_alias
stringOptional
or
nullOptional
raw_textany ofOptional

Extract the entire text from the document as strings, and fill the raw_text attribute.

booleanOptional
or
nullOptional
polygonany ofOptional

Calculate bounding box polygons for values, and fill the locations attribute of fields

booleanOptional
or
nullOptional
confidenceany ofOptional

Calculate confidence scores for values, and fill the confidence attribute of fields. Useful for automation.

booleanOptional
or
nullOptional
ragany ofOptional

Use Retrieval-Augmented Generation during inference.

booleanOptional
or
nullOptional
text_contextany ofOptional

Pass additional context for use by the model, for this inference.

Example: This document is a receipt from a grocery store.
stringOptional
or
nullOptional
data_schemaany ofOptional

Dynamically change the data schema of the model, for this inference.

stringOptional
or
nullOptional
Responses
post
/v2/products/extraction/enqueue

Here is a working example of the built-in test client:

Extraction Processed

When an extraction inference is processed, this payload is sent to the specified webhooks.

Webhooks are specified in the webhooks_ids parameter when enqueuing an extraction inference.

Payload

Response for an extraction inference.

Responses
chevron-right
200

Successful Response

application/json
anyOptional

Payload

Get the status of a file's processing.

get

Get the status of an inference that was previously enqueued.

If you are using webhooks there is no need to call this route.

When the job status is Processing or Failed the return code will be HTTP 200.

When the job status is Processed the return code will be HTTP 302.

The processing result can then be retrieved in two ways:

  • Recommended: Using a GET on the URL specified in the result_url field of the response

  • Allowing your client to redirect on the Location header of the response

Note: set the redirect parameter to false to disable the redirection behavior, and always return HTTP 200.

Authorizations
AuthorizationstringRequired
Path parameters
job_idstring · uuid4Required

UUID of the job to retrieve

Query parameters
redirectbooleanOptional

Automatically redirect to the result URL

Default: true
Responses
chevron-right
200

Successful Response

application/json

Response for a Job.

get
/v2/jobs/{job_id}

Get the result of a completed extraction product inference.

get

Get the result of an extraction inference that was previously enqueued.

The inference will only be available after it has finished processing.

If you are using webhooks there is no need to call this route. However, the JSON payload described here is what will be sent to each specified webhook's URL.

If you activated the "Delete extracted data when fetched" option for the model, the inference will be deleted after this route completes. Any further requests to the same inference ID will return a 404.

Authorizations
AuthorizationstringRequired
Path parameters
inference_idstring · uuid4Required

UUID of the inference to retrieve

Responses
chevron-right
200

Successful Response

application/json

Response for an extraction inference.

get
/v2/products/extraction/results/{inference_id}

Last updated

Was this helpful?