### ❓ Issue: "HTTP 422 - Empty file sent" when using `Base64Input` with Mindee V2 SDK
Hi Mindee team 👋
I’m integrating the Mindee OCR API inside a NestJS backend (running in Docker),
and I’m getting a consistent HTTP 422 - Empty file sent error when using Base64Input with the V2 client.
🧩 Code example
this.client = new mindee.ClientV2({
apiKey: config.apiKey,
});
async parseReceipt(imageBase64: string): Promise<OCRResult> {
const inputSource = new mindee.Base64Input({
inputString: imageBase64,
filename: 'receipt.jpg',
});
// I also tried manually initializing:
// await inputSource.init();
// The Buffer is correctly filled here.
const apiResponse = await this.client.enqueueAndGetInference(
inputSource,
{
modelId: this.modelId,
rawText: true,
}
);
return {};
}
⚙️ Context
SDK:
mindee(latest, ClientV2)Environment: NestJS (Node 20, Docker)
Model:
<model_uuid_in_model_config>Input: Base64-encoded JPEG
(I confirmed it’s valid and decodes properly)
🧠 What I noticed
Even when I manually run await inputSource.init(),
the inputSource.buffer is correctly filled with the decoded image data.
However, as soon as I call:
await this.client.enqueueAndGetInference(inputSource, { modelId: this.modelId })
the SDK still throws:
MindeeHttpErrorV2: HTTP 422 - Empty file sent.
🙏 Question
Is there something I’m missing when using Base64Input with ClientV2?
Does it need a specific encoding format or initialization step before sending?
Thanks for your help!
Log in to comment and vote
Comments4
Ianaré Sévi
Oct 8, 2025
Hi, thank you for the feedback. We are looking into it, can you share which version of the client you’re using?
Folly Epiphane AVLAH
Oct 8, 2025
hi thanks for the reply.
"mindee": "^4.30.0",Ianaré Sévi
Oct 8, 2025
There was a problem with initializing sources which was causing empty data to be sent.
This has been fixed and released in version 4.31.1
https://github.com/mindee/mindee-api-nodejs/releases/tag/v4.31.1
Let us know if the issue persists.
Folly Epiphane AVLAH
Oct 8, 2025
Okay, thank you! I’ll get back to you if the issue persists.