Invalid content source: Could not read build content from document intellingence npm

Vijay Madireddy 0 Reputation points
2025-06-26T13:39:33.2166667+00:00

error : {code: "InvalidArgument", message: "Invalid argument.", details: [,…]} code : "InvalidArgument" details : [,…] 0 : {code: "InvalidContentSourceFormat", message: "Invalid content source: Could not read build content."} code : "InvalidContentSourceFormat" message : "Invalid content source: Could not read build content."

when

when i train a classifier, i created 2 containers from azure porta, uplaoded images from the portal itself, called correct api, with 2 doc types, still why?

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,685 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Pavankumar Purilla 8,820 Reputation points Microsoft External Staff Moderator
    2025-06-27T02:20:18.1033333+00:00

    Hi Vijay Madireddy,

    The error message you're seeing – "InvalidContentSourceFormat: Invalid content source: Could not read build content" – typically indicates that Azure Document Intelligence is unable to access or interpret the training content from the specified storage location. This can happen due to a few common reasons. Please ensure that the container structure follows the expected format, where each document type is placed inside its own subfolder (e.g., invoice/, receipt/), and that these subfolders contain at least one supported file format such as JPEG, PNG, TIFF, or PDF. Files should not be placed directly in the root of the container. Also, confirm that the SAS URL you’re using is correct and includes the necessary permissions — specifically, Read (r) and List (l) access. The names of the subfolders should exactly match the document types specified in your classifier training request. Additionally, check that the files are not corrupted or empty, and that the API call is correctly configured with the right endpoint and parameters. Verifying these details should help resolve the issue. Reference thread: https://learn.microsoft.com/en-us/answers/questions/1422925/invalidcontentsourceformat-invalid-content-source

    For more information: Build and train a custom classification model


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.