Skip to main content

Image formats

All endpoints accept jpg/jpeg and png formats. The resolution of the image should be at least 1080p (1920×1080 px). Smaller resolutions are accepted, but won't provide optimal results. Larger resolutions are also accepted, but won't improve the scanning process significantly. There is no need to downscale your images before sending them to the API.

Keep in mind that the API is optimized for images taken with mobile phone cameras. Images taken with web cameras, which usually have much lower resolutions, might not perform as well.

Providing images

Every recognition endpoint accepts an ImageSource object for each image parameter (for example, image on /blinkid-single-side, or imageFirstSide and imageSecondSide on /blinkid-multi-side). An ImageSource has two fields:

  • imageUrl: a publicly accessible URL pointing to the image.
  • imageBase64: the image encoded as a Base64 string.

Using a URL

Pass the URL of the image in the imageUrl field. The API will fetch the image from the provided URL.

curl --json '{"image": {"imageUrl": "https://example.com/document-front.jpg"}}' --header "mb-api-key: {your_api_key}" http://localhost:8080/blinkid-single-side

Using Base64

Pass the Base64-encoded image in the imageBase64 field.

curl --json '{"image": {"imageBase64": "/9j/4AAQSkZJRgAB..."}}' --header "mb-api-key: {your_api_key}" http://localhost:8080/blinkid-single-side

Multi-side documents

For endpoints that scan both sides of a document, provide a separate ImageSource for each side. The example below uses URLs for both sides:

curl --json '{"imageFirstSide": {"imageUrl": "https://example.com/document-front.jpg"}, "imageSecondSide": {"imageUrl": "https://example.com/document-back.jpg"}}' --header "mb-api-key: {your_api_key}" http://localhost:8080/blinkid-multi-side