Errors
A request that fails costs nothing. The answer carries an errorCode, a code your system can handle, and a message that says what to do: in English or, with the Accept-Language: pt-BR header, in Portuguese.
Change the request
Sending it again as it is will not help: do what the message says and send a new request.
IMAGE_MISSING
Status: 422
In English: No image was sent. Send the certificate image in imageUrl or imageBase64.
In Portuguese: Nenhuma imagem foi enviada. Envie a imagem da certidão em imageUrl ou imageBase64.
IMAGE_BASE64_INVALID
Status: 422
In English: The content of imageBase64 is not valid base64. Send the image encoded in base64, for example data:image/jpeg;base64,/9j/4AAQ...
In Portuguese: O conteúdo de imageBase64 não é um base64 válido. Envie a imagem codificada em base64, por exemplo data:image/jpeg;base64,/9j/4AAQ...
IMAGE_TOO_LARGE
Status: 413 or 422
In English: The image is larger than 10 MB. Send a smaller image, for example a JPG with lower resolution or quality.
In Portuguese: A imagem tem mais de 10 MB. Envie uma imagem menor, por exemplo um JPG com menos resolução ou qualidade.
IMAGE_TOO_MANY_PIXELS
Status: 422
In English: The image has more than 120 megapixels. Reduce its resolution and send it again.
In Portuguese: A imagem tem mais de 120 megapixels. Reduza a resolução e envie de novo.
IMAGE_FORMAT_UNSUPPORTED
Status: 422
In English: The file is not in one of these formats: PDF, JPG, PNG, WebP or GIF. Convert it to one of them and send it again.
In Portuguese: O arquivo não está em um destes formatos: PDF, JPG, PNG, WebP ou GIF. Converta para um deles e envie de novo.
IMAGE_UNREADABLE
Status: 422
In English: The image could not be read: the file seems damaged or incomplete. Photograph or export the certificate again and send the new file.
In Portuguese: Não foi possível ler a imagem: o arquivo parece corrompido ou incompleto. Fotografe ou exporte a certidão de novo e envie o novo arquivo.
IMAGE_URL_NOT_ALLOWED
Status: 422
In English: The imageUrl cannot be used: it points to a private or local address. Use a public link to the image, or send it in imageBase64.
In Portuguese: O imageUrl não pode ser usado: ele aponta para um endereço privado ou local. Use um link público para a imagem ou envie-a em imageBase64.
IMAGE_RESOLUTION_TOO_LOW
Status: 422
In English: The image is smaller than our standard of 1,344 to 2,048 px on the long side. Send a photo with more resolution, or set resizeImage: true to have it enlarged (1 extra credit).
In Portuguese: A imagem é menor que o nosso padrão de 1.344 a 2.048 px no lado maior. Envie uma foto com mais resolução ou use resizeImage: true para ampliá-la (1 crédito a mais).
IMAGE_RESOLUTION_TOO_HIGH
Status: 422
In English: The image is larger than our standard of 1,344 to 2,048 px on the long side. Reduce it to at most 2,048 px on the long side, or set resizeImage: true to have it reduced (1 extra credit).
In Portuguese: A imagem é maior que o nosso padrão de 1.344 a 2.048 px no lado maior. Reduza-a para no máximo 2.048 px no lado maior ou use resizeImage: true para reduzi-la (1 crédito a mais).
IMAGE_INVALID
Status: 422
In English: The image could not be used. Send a PDF, JPG, PNG, WebP or GIF file of up to 10 MB.
In Portuguese: A imagem não pôde ser usada. Envie um arquivo PDF, JPG, PNG, WebP ou GIF de até 10 MB.
PDF_PASSWORD_PROTECTED
Status: 422
In English: The PDF is password-protected. Send the file without a password.
In Portuguese: O PDF está protegido por senha. Envie o arquivo sem senha.
PDF_UNREADABLE
Status: 422
In English: The PDF could not be read: the file seems damaged. Export it again, or send the certificate's first page as a JPG, PNG, WebP or GIF image.
In Portuguese: Não foi possível ler o PDF: o arquivo parece corrompido. Exporte-o de novo ou envie a primeira página da certidão como imagem JPG, PNG, WebP ou GIF.
PDF_TOO_MANY_PAGES
Status: 422
In English: The PDF has more than 20 pages. Send only the certificate: we read its first page.
In Portuguese: O PDF tem mais de 20 páginas. Envie só a certidão: lemos a primeira página.
IMAGE_DOWNLOAD_FAILED
Status: 422
In English: We could not download the image from imageUrl: the download failed. Use a public, direct link to a PDF, JPG, PNG, WebP or GIF file that opens without a login, or send the image as imageBase64.
In Portuguese: Não conseguimos baixar a imagem de imageUrl: o download falhou. Use um link público e direto para um arquivo PDF, JPG, PNG, WebP ou GIF que abra sem login, ou envie a imagem em imageBase64.
IMAGE_NOT_PROCESSABLE
Status: 201 with success: false
In English: The image passed our checks but could not be processed. Send a sharper photo of the whole certificate, as a JPG or PNG. No credit was charged.
In Portuguese: A imagem passou pelas nossas verificações, mas não pôde ser processada. Envie uma foto mais nítida da certidão inteira, em JPG ou PNG. Nenhum crédito foi cobrado.
DOCUMENT_NOT_RECOGNIZED
Status: 201 with success: false
In English: The document could not be processed. Check that the image shows a birth certificate. No credit was charged.
In Portuguese: Não foi possível processar o documento. Verifique se a imagem mostra uma certidão de nascimento. Nenhum crédito foi cobrado.
Send it again later
No engine could answer just now. The same request, with the same requestId, may pass later.
EXTRACTION_TIMEOUT
Status: 201 with success: false
In English: The extraction took too long. Please retry; a sharper or smaller image helps. No credit was charged.
In Portuguese: A extração demorou demais. Tente novamente; uma imagem mais nítida ou menor ajuda. Nenhum crédito foi cobrado.
EXTRACTION_BUSY
Status: 201 with success: false
In English: The extraction service is busy. Please retry in a few moments. No credit was charged.
In Portuguese: O serviço de extração está ocupado. Tente novamente em alguns instantes. Nenhum crédito foi cobrado.
EXTRACTION_UNAVAILABLE
Status: 201 with success: false
In English: The extraction service is temporarily unavailable. Please retry in a few moments. No credit was charged.
In Portuguese: O serviço de extração está temporariamente indisponível. Tente novamente em alguns instantes. Nenhum crédito foi cobrado.
Wait, then send it again
The same request is still running. Wait the seconds of the Retry-After header and send it again: you get its answer, at no charge.
REQUEST_IN_PROGRESS
Status: 409
In English: A request with this requestId and the same content is still being processed. Try again in a few seconds to get its answer, at no charge.
In Portuguese: Uma requisição com este requestId e o mesmo conteúdo ainda está em processamento. Tente de novo em alguns segundos para receber a resposta, sem custo.
Add credits
The balance cannot pay the request, and nothing ran. Buy credits or change your plan in the panel.
NOT_ENOUGH_CREDITS
Status: 402
In English: This request costs 1 credit, and the available balance is 0 credits. Buy credits or upgrade your plan to continue.
In Portuguese: Esta requisição custa 1 crédito, e o saldo disponível é de 0 crédito. Compre créditos ou faça upgrade do plano para continuar.
Answers without an errorCode
These answers of the extraction carry no errorCode; the reference shows each one with its example.
400
The body is not valid: message lists what to fix. Nothing was charged.
401
The API key is missing, malformed, unknown, revoked or expired.
429
Over one of your plan's limits. retryAfter says how many seconds to wait; there is no Retry-After header. A limit per day resets at midnight UTC.
503
The service is restarting: the proxy answers with an HTML page, and may answer 502 or 504 the same way. Send the same request again after a few seconds, with the same requestId, so it is never charged twice.