The job batch object

Any jobs you create with a single request are grouped into a batch. When you create the jobs, we return a batch_id in the response. The batch_id allows you to retrieve the batch object, which contains information on the current status of the batch. You can also retrieve the IDs for all the jobs in the batch.

The job batch object can be inspected using Get job batch.

Job batch object attributes

AttributeTypeDescription
app_uuidstringUnique identifier for the data program for which this batch was created
batch_idstringUnique identifier for the job batch
batch_totalintegerThe total number of jobs included in the batch
createdISO 8601 dateUTC timestamp of batch creation
invalid_indexintegerThe position within the array of inputs where the first invalid input appears
total_processedintegerThe total number of jobs within the batch that have been processed
valid_countintegerThe total number of jobs within the batch that have passed validation and are available for labeling
batch_processedbooleanWhether the entire batch has been processed or not
error_messagestringAn indication of what caused the first input to fail during processing
errors_with_filenamelist[string]List of CSV tuples containing "{filename}, {errror_message}"
{
  "app_uuid": "123abc45-6789-01de-f2g3-45h67ijk8901",
  "batch_id": "a1b23456-7890-1234-c56d-7890123e4f56",
  "batch_total": 6,
  "created": "2020-06-08T14:27:36.862Z",
  "invalid_index": 0,
  "total_processed": 0,
  "valid_count": 0,
  "batch_processed": true,
  "error_message": "string",
  "errors_with_file": [
        "\"https://cdn.super.ai/non_existing_file.pdf\",\"Error occurred while fetching the document:https://cdn.super.ai/non_existing_file.pdf, maximum retries exceeded.\""
    ],

Sample Error Messages

In case you exceeded the maximum payload size:

Document size exceeds the maximum size allowed: {doc_size} > 50 MB

In case you exceeded the maximum number of pages:

The number of pages in the document exceeds the maximum number of pages allowed: {num_pages} > 100

File specific error messages

Sometimes only a subset of documents in a batch is containing errors. In those cases, the rest of the documents get submitted as usual (when using non-strict mode). To debug the issues with the remaining files, the API returns file specific rejection reasons in the errors_with_filename field. The format of that field is a list[str] where each string object is a comma separated tuple with {filename}, {error_message}.