Manual Integration

Manual integration - reference only.

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

Send a file for an inference.

post

Send a file to the asynchronous processing queue for an 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 1200 seconds will time out.

Authorizations
AuthorizationstringRequired
Body

Form to enqueue an inference.

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.

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
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
text_contextany ofOptional

Additional text context used by the model during inference.

Example: This document is a receipt from a grocery store.
stringOptional
or
nullOptional
Responses
202

Successful Response

application/json
post
/v2/inferences/enqueue
POST /v2/inferences/enqueue HTTP/1.1
Host: api-v2.mindee.net
Authorization: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 267

{
  "model_id": "text",
  "file": "binary",
  "url": "https://example.com",
  "file_base64": "Base64String==",
  "webhook_ids": [
    "text"
  ],
  "raw_text": true,
  "polygon": true,
  "confidence": true,
  "rag": true,
  "alias": "my_file_alias",
  "text_context": "This document is a receipt from a grocery store."
}
{
  "job": {
    "id": "text",
    "model_id": "text",
    "filename": "file.jpg",
    "alias": "text",
    "created_at": "2025-11-20T10:25:26.026Z",
    "status": "Processing",
    "polling_url": "https://example.com",
    "result_url": "https://example.com",
    "webhooks": [
      {
        "id": "text",
        "created_at": "2025-11-20T10:25:26.026Z",
        "status": "Processing",
        "error": {
          "status": 404,
          "detail": "One or more fields failed validation.",
          "title": "Invalid fields in form",
          "code": "422-001",
          "errors": [
            {
              "pointer": "#/model_id",
              "detail": "'model_id' must be a valid UUID format"
            }
          ]
        }
      }
    ],
    "error": {
      "status": 404,
      "detail": "One or more fields failed validation.",
      "title": "Invalid fields in form",
      "code": "422-001",
      "errors": [
        {
          "pointer": "#/model_id",
          "detail": "'model_id' must be a valid UUID format"
        }
      ]
    }
  }
}

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

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

Authorizations
AuthorizationstringRequired
Path parameters
job_idstring · uuid4Required

UUID of the job to retrieve

Responses
get
/v2/jobs/{job_id}
GET /v2/jobs/{job_id} HTTP/1.1
Host: api-v2.mindee.net
Authorization: YOUR_API_KEY
Accept: */*
{
  "job": {
    "id": "text",
    "model_id": "text",
    "filename": "file.jpg",
    "alias": "text",
    "created_at": "2025-11-20T10:25:26.026Z",
    "status": "Processing",
    "polling_url": "https://example.com",
    "result_url": "https://example.com",
    "webhooks": [
      {
        "id": "text",
        "created_at": "2025-11-20T10:25:26.026Z",
        "status": "Processing",
        "error": {
          "status": 404,
          "detail": "One or more fields failed validation.",
          "title": "Invalid fields in form",
          "code": "422-001",
          "errors": [
            {
              "pointer": "#/model_id",
              "detail": "'model_id' must be a valid UUID format"
            }
          ]
        }
      }
    ],
    "error": {
      "status": 404,
      "detail": "One or more fields failed validation.",
      "title": "Invalid fields in form",
      "code": "422-001",
      "errors": [
        {
          "pointer": "#/model_id",
          "detail": "'model_id' must be a valid UUID format"
        }
      ]
    }
  }
}

Get the result of a completed inference.

get

Get the result of an 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
get
/v2/inferences/{inference_id}
GET /v2/inferences/{inference_id} HTTP/1.1
Host: api-v2.mindee.net
Authorization: YOUR_API_KEY
Accept: */*
{
  "inference": {
    "id": "text",
    "model": {
      "id": "text"
    },
    "file": {
      "name": "text",
      "alias": "text",
      "page_count": 1,
      "mime_type": "text"
    },
    "result": {
      "fields": {
        "ANY_ADDITIONAL_PROPERTY": {
          "locations": [
            {
              "polygon": [
                []
              ],
              "page": 1
            }
          ],
          "confidence": "Certain",
          "value": true
        }
      },
      "raw_text": {
        "pages": [
          {
            "content": "text"
          }
        ]
      },
      "rag": {
        "retrieved_document_id": "text"
      }
    },
    "active_options": {
      "raw_text": true,
      "polygon": true,
      "confidence": true,
      "rag": true
    }
  }
}

Inference Processed

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

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

Payload

Response for an inference.

Responses

Payload

{
  "inference": {
    "id": "text",
    "model": {
      "id": "text"
    },
    "file": {
      "name": "text",
      "alias": "text",
      "page_count": 1,
      "mime_type": "text"
    },
    "result": {
      "fields": {
        "ANY_ADDITIONAL_PROPERTY": {
          "locations": [
            {
              "polygon": [
                []
              ],
              "page": 1
            }
          ],
          "confidence": "Certain",
          "value": true
        }
      },
      "raw_text": {
        "pages": [
          {
            "content": "text"
          }
        ]
      },
      "rag": {
        "retrieved_document_id": "text"
      }
    },
    "active_options": {
      "raw_text": true,
      "polygon": true,
      "confidence": true,
      "rag": true
    }
  }
}

Last updated

Was this helpful?