REALTIME API Access in the playground But Not in the API in Python Code

Hello,

I have access to the Playground real-time API, but I am having trouble connecting to it via WebSocket using Python or Node.js. Despite trying various approaches, I haven’t been able to successfully access the API through my code.

Is there any tutorial, example, or resource available that could help me debug the issue or guide me through the process of connecting via WebSocket with either Python or Node.js?

Any help or suggestions would be greatly appreciated!

Thank you.

1 Like

I’m also having trouble getting the real-time API to work in python. I’m connected to the websocket, but when I try to generate a response, I get a model_not_found error.

1 Like

I was able to check using the documentation https://platform.openai.com/docs/api-reference/models/list?lang=curl , and it seems that my account has access to the REALTIME API. Here’s the image:

However, for some reason, I am not able to access it via code and keep getting a 404 error. Here’s the image showing the error:

Has anyone been able to connect to it via code? Can I get some guidance on setting this up?

You have to use a user key. I just tested this and it works. Don’t use a project key :smiling_face_with_tear:

1 Like

Hi guys, same problem here.

I have a python script to connect to the Real time API (Twilio connection) but although the connection open and the stream starts, I get this error:

invalid_request_error', 'code': 'model_not_found', 'message': 'The model gpt-4o-realtime-preview-2024-10-01 does not exist or you do not have access to it.

The name of the model is right as you can see.
I have checked in the “usage” screen of the openai platteform to be sure that i have acces to that model through the playground and I have charges on the usage screen.
I have created a new user APIKey but nothing changes.

Any idea to solve the problem?