OCR API with language=cht failed

I was using the OCR API POST endpoint:

const { data } = await axios.post(
  "https://api.ocr.space/parse/image",
  {
    url,
    language: 'cht',
    OCREngine: 2,
    isTable: "true",
  },
  {
    headers: {
      "Content-Type": "multipart/form-data",
      "apiKey": `${Env.OCRSPACE_API_KEY}`,
    },
  }
);

But I got the following error response data:

{
  OCRExitCode: 99,
  IsErroredOnProcessing: true,
  ErrorMessage: [ "E201: Value for parameter 'language' is invalid" ],
  ProcessingTimeInMilliseconds: '281'
}

If I removed the language parameter, it works well. However, the β€œcht” language is said to be supported in OCR Engine 2 in the API document. Does anyone know why this issue occurs?

Ouch. This was caused by a recent update on the free OCR API endpoint. Thank you for reporting this! The issue is fixed now.

1 Like