File Uploads

Upload Image to Book

Upload image files to a <glossary:Book>.


You can upload a file to this endpoint as a multipart/form-data encoded payload. To learn more, see multipart/form-data guide.

With the capability to classify images, you can upload a single image using this endpoint. To upload multiple images to the same <glossary:Book>, call this endpoint once for each image, and then call the Finalize image group endpoint to complete the <<glossary:Image group>>.

We support uploads of the images in the JPEG, PNG, BMP, and TIFF (Single-image files only) formats.

post/v1/book/upload/image

Request

  • Base URL
    https://api.ocrolus.com
  • URL
    https://api.ocrolus.com/v1/book/upload/image
  • Auth
    OAuth 2
    Client credentials
    Token URL: https://auth.ocrolus.com/oauth/token

Request body multipart/form-data

uploadstring binary required

The image file that you want to upload. The maximum file size is 200 MB.

book_uuidstring

Universally unique identifier (uuid) of the <glossary:Book> to which the uploaded images will be saved to. Mutually exlusive with pk.

pkinteger

Unique primary key (<glossary:PK>) of the <glossary:Book> to which the uploaded images will be saved to. Mutually exlusive with book_uuid.

return_image_pkboolean

Indicates if the response will include the PK of the uploaded image.

Example request

{
  "pk": 30219565,
  "book_uuid": "19aab921-25a5-4beb-a59e-ac72320061d6",
  "return_image_pk": true
}

Response

200

OR
OR

Example response

{
  "status": 200,
  "response": {
    "image_group_pk": 87479,
    "image_pk": 946005
  },
  "message": "Ok"
}

Changes

No recorded changes to this operation across all 1 revision of this API.