If the API request encounters an unrecoverable error during parsing (either from the client-side or server-side), the library includes an errors field in the final result for the affected pages.

Each error contains the error message, error_code, and corresponding page number.

Error Message: Illegal header value b’Basic ’

You might get the error message below if the API key isn’t set correctly:

[error  ] Error parsing document 'File name: file_namePage: #:#]' due to: Illegal header value b'Basic ' [agentic_doc.parse] (parse.py:246)

To resolve this error, make sure that you have an API key and have set it correctly.

If using the library, set the API key as an environment variable. If calling the API directly, include the API key in the header.