Errors with free OCR API key

I am developing a system in C# for a customer who needs to read order numbers from scanned PDF documents. The customer intends to purchase a pro key for the OCR API, but I am using a free key to develop and test the system.

The system worked well for several days, but then all requests started to fail with a variety of error messages. The most recent erro is “Error:E570: Send only one file or url per request,details:Unexpected field”.

I have not exceeded the sending limits and I have sent test requests with your C# sample code using PDF files and images which previously worked perfectly, but all have failed.

I have not been able to continue with the development of the system, so I will need to use another OCR system unless I can find a solution to the problem. I would therefore apprecaite any help to find the cause of the problem. I have included further details of one of the errors below.

MulterError: Unexpected field at wrappedFileFilter

Hi,
I have an app that I’ve been using for a while that worked perfectly, but now I’m getting the same error.
“error”:“E570: Send only one file or url per request”,
“details”:“Unexpected field”
I do not understand why.
Can You help me
Thank You
Marco

Thanks for the two error reports, both are related to our recent API update. The new version includes more strict syntax checks.

The OCR API only accepts a file field named exactly file. If you send the file under any other field name (e.g. image, document, photo, attachment), this throws Unexpected field.

Common causes:

  • You send the file as image or document instead of file
  • You sends two file fields

Solution: Today’s update improves the error message. Now:

  • If you send the file as image, i123 or document instead of file it continues to accept it (like before the update). This solves the backward compatibility issue reported by @CliveMerritt
  • You sends two file fields, the error message now clearly tells you what those two file fields are, so you can update your code quickly. This solves the issue reported by @Marco_Perrone:

Example:

ThankYou for reply.
My problem was that I was using “imgFile” as the fieldName.
Now I simply use “file” and it works again.
Best regards
Marco

1 Like

Thanks for the quick reply and the solution. Everything is working fine again.