CustomVisionTrainingClient.CreateImagesFromUrlsAsync returns Bad Request

Onyango, David 31 Reputation points
2025-08-04T23:00:14.9533333+00:00

I am using the method CreateImagesFromUrlsAsync(projectId, new ImageUrlCreateBatch { Images = imagesToUpload }); in the class CustomVisionTrainingClient to upload images from blob storage to azure custom vision AI for training. The projectid is valid and I am also testing to ensure that the there imagesToUpload has files before execution.

The same method works with an instance where both blob storage and custom vision ai are in eastus region. However, it is giving me Bad Request for a scenario where the blob storage is in South Africa North while custom vision is in eastus. I was unable to setup custom vision ai in South Africa North as apparently it is not available.

Any ideas will be appreciated.

Azure AI Custom Vision
Azure AI Custom Vision
An Azure artificial intelligence service and end-to-end platform for applying computer vision to specific domains.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Onyango, David 31 Reputation points
    2025-08-04T23:48:43.3233333+00:00

    I have just resolved the issue thanks to Copilot. It was an issue with batch size. The method can only process 64 images at a time.

    0 comments No comments

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.