Azure openai assistant 404

Hi, is the assistant api in azure supported yet? It looks like it should be here:

but I still get the 404 resource not found with the above example?

If it is supported what api version should I be using please? My code works fine with the OPENAI client just not the Azure OPENAI client (I am passing in api key, and endpoint and version)

I have tried versions :

model = “gpt-4”

openai python SDK 1.12.0


have you tried updating openai? the current version is > 1.13.3

here’s the official docs How to create Assistants with Azure OpenAI Service - Azure OpenAI | Microsoft Learn

REST is also not working I get always a 401. The Endpoint in the documentation is: POST but it does not work
“statusCode”: 401,
“message”: “Unauthorized. Access token is missing, invalid, audience is incorrect (, or have expired.” The Java Client is working

I havent tested it in a while but the rest endpoint was screwed up, you need a double slash

{your resource}

OpenAI Azure OpenAI Service + OpenAI AI Assistant API - #4 by Diet

it’s possible that they’re still working on it/ changing stuff. it’s in preview, after all.

I have already tried that out, I get the same 401 error…

are you sending the correct header/ using the correct key?

headers = {
    "Content-Type": "application/json",
    "api-key": f"{azure_openai_api_key}",
    "OpenAI-Beta": "assistants=v1"

maybe there’s some other config set up for your resource :thinking:

1 Like

Oh man, it works! I have never found those headers config anywhere in the documentation. My next question is how you’re uploading any file to Azure OpenAI, I know that it is working for OpenAI via REST API but is it the same with the Azure Service.

I’d have to dig through their code again, but it’s possible that it’s just the schema above applied to the oai endpoint.

if you have the chance, could you try and report back?

1 Like

I have reported right now, would be very nice to have a lot better REST Description

As I also searching in the swagger documentation for the Upload of PDF’s to the Azure Assistants api, there is no Multipart Header possibility or any reference to that…

Hi i readed you post and i wanna ask you. Are azure assistant more stable than OpenAI assistants ? Right now some days works some days not , today for example, lot of time delayed on runs, most runs executions fail or just expiring

Hi, thanks for your reply.
Unless I am barking up the wrong tree I found three issues:

  • You were right - my open ai python sdk was out of date - I updated to latest as advised

  • I followed the create assistant link - my code v. similar. I now get the “Invalid url POST /v1/assistants” error documented elsewhere on the site (I dont think I can post links)

  • I also came across an mslearn link detailing that as assistants are in preview, they are only avaliable in certain regions - uk generally isnt one of them…

I guess at this point I will carry on in openai, wait for updates from MS and then port my code I think.


Hi, any updates on this? I also get the same error even though I have the latest openai version of “1.21.1” and have tried multiple "api_version"s. In addition, I have chosen the region as Australia that the assistant APIs are availabile in there. Would appreciate any help with this