Getting 404 error when trying to access custom classification model in new Document Intelligence Studio
I've created a custom classification model in the new Azure Document Intelligence Studio and I have trained it with my relevant documents. I am now trying to access this trained model in my c# service but I am getting a 404 resource not found when using my custom model with the following code
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", _docIntelligenceConfig.ApiKey);
var url = $"{_docIntelligenceConfig.Endpoint}documentintelligence/documentModels/{_docIntelligenceConfig.ModelId}:analyze?api-version=2024-11-30";
var fileBytes = await File.ReadAllBytesAsync(filePath);
var content = new ByteArrayContent(fileBytes);
content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/pdf");
var response = await client.PostAsync(url, content);
With the endpoint coming from my connected azure portal resource
And I've double checked my model id by running an analysis on a document with the trained model and going to the results tab once the analysis has completed
In addition to this I have double checked my endpoint works as expected as I have updated the code to an example model, which succeeds :
var modelId = "prebuilt-document"; // test with a prebuilt model
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", _docIntelligenceConfig.ApiKey);
// Use formrecognizer route
var url = $"{_docIntelligenceConfig.Endpoint}formrecognizer/documentModels/{modelId}:analyze?api-version=2023-07-31";
var fileBytes = await File.ReadAllBytesAsync(filePath);
var content = new ByteArrayContent(fileBytes);
content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/pdf");
var response = await client.PostAsync(url, content);
I have also tried simply plugging in my model in place of the "prebuilt-document" model and ensuring that I retrain the model in the same api version as the example but this still comes back with the 404 error.
I am unsure what to try next, any recommendations?
Full Error :
{StatusCode: 404, ReasonPhrase: 'Not Found', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:
{
ms-azure-ai-errorcode: NotFound
x-ms-error-code: NotFound
x-envoy-upstream-service-time: 23
apim-request-id: id here
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
X-Content-Type-Options: nosniff
x-ms-region: UK South
Date: Fri, 17 Oct 2025 12:22:50 GMT
Content-Length: 146
Content-Type: application/json; charset=utf-8
}}