API_KEY IS NOT WORKIN
I use java-sdk. It is pretty simple isn’t it. And this is your sample: MindeeClient mindeeClient = new MindeeClient(apiKey); // Load a file from disk LocalInputSource inputSource = new LocalInputSource(filePath); // Parse the file PredictResponse<InvoiceV4> response = mindeeClient.parse(InvoiceV4.class, inputSource); // Print a summary of the response System.out.println(response.toString()); And the result is:
Exception in thread "main" com.mindee.http.MindeeHttpException: Authorization required - HTTP 401 - Invalid token provided at com.mindee.http.MindeeHttpApi.getHttpError(MindeeHttpApi.java:360) at com.mindee.http.MindeeHttpApi.lambda$predictPost$5(MindeeHttpApi.java:226) at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:247) at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:188) at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:162)
Log in to comment and vote
Comments3
Ianaré Sévi
Jul 1, 2025
Hi, thanks for bringing this to our attention.
To better help you, could you tell us where you created the Invoice model?
Was it
here: https://app.mindee.com
or here: https://platform.mindee.com/
?
The Java client is currently only compatible with the Invoice product on https://platform.mindee.com/
Thank you.
computart
Jul 1, 2025
I was using https://app.mindee.com. Which one is newer?
Ianaré Sévi
Jul 1, 2025
app.mindee.com is newer (v2).
Unfortunately, right now we don’t have built-in Java support. It’s coming soon!
In the meantime, you can use the OpenAPI specification and the API reference to build a Java client for the API.
https://api-v2.mindee.net/openapi.json
https://docs.mindee.com/integrations/api-reference
HTH