Error Management

Mindee REST API Status and Error Codes

To indicate successful execution or when error occur, we utilize standard HTTP codes. In the case of errors, the response will contain extra information about the error with an error code.

Response Codes

Mindee REST APIs return either 200 (OK) or 201 (Created) when an API request successfully runs to completion. Status codes in the 400-500 range indicate failures.

Successful Execution

Those operations that complete successfully will return 2xx status codes in addition to the API response status information in the response body.

The table below shows the typical response codes supported by Mindee API.

Operation
Response code
HTTP status code
Possible response

GET

OK

200

Request succeeds

POST

Success

201

Resource created

Error Handling

If an error occurs when calling Mindee's REST API because of an issue with the client's input (such as incorrect data), the standard error code 4xx is used. If an operation fails because of an issue with the Mindee server, a 5xx error code will be returned.

Errors happening can be split in two main parts:

4xx Errors - Client Errors

Error Code
HTTP Status
Possible Reasons

BadRequest

400

Wrong file type: file types allowed: png, jpg, webp, heic, tiff, pdf. Missing input file Too many pages in PDF File is too big

Unauthorized

401

Bad token: you didn’t provide the authentication header or the token is wrong.

Forbidden

403

Inference is blocked: your API access has been blocked.

PlanLimitReached

403

Plan limit reached: you have reached your maximum number of requests.

NotFound

404

Wrong endpoint: provided endpoint doesn't match any product. Wrong version: wrong version in base URL. No subscription found: you need to have an active subscription on the associated product

TooManyRequests

429

Too high frequency: number of requests over time is limited. See Technical limitations documentation.

5xx Errors - Server Errors

Error Code
HTTP Status
Possible Reasons

ServerError

500

An unknown error occurred during the processing of your request. Either the server is overloaded or there is an error in the application.

RequestTimeout

504

The request takes too much time to be processed.

Last updated

Was this helpful?