Realtime API uses 4o instead of 4o-mini

Hello everyone,

Yesterday’s announcement about the price reduction and the addition of 4o-mini was great news for me.

However, I am having trouble using 4o-mini.

Even though I pass the model parameter, the usage dashboard still shows that I’m using 4o, and the cost remains around ~$2 per 4-minute call.

How can I correctly switch to using 4o-mini?

Here is my code snippet:

function connectToOpenAI() {
    return new WebSocket(
        'wss://api.openai.com/v1/realtime?model=gpt-4o-mini-realtime-preview',
        {
            headers: {
                Authorization: `Bearer ${OPENAI_API_KEY}`,
                'OpenAI-Beta': 'realtime=v1',
            },
        },
    );
}
1 Like

Hi @petru.trimbitas and welcome to the community!

Have you tried setting the model to the specific mini checkpoint, i.e. gpt-4o-mini-realtime-preview-2024-12-17?

3 Likes

I’m also having the same issue and specifying the checkpoint didn’t seem to work. Is anyone else having a similar problem?

1 Like

Same problem. I changed every instance where the model is mentioned in the realtime-console repository and that changes nothing whatsoever apparently. I can say model = “definitelynot4o” and 4o is used.

1 Like

This model will be available starting from the 9th of January, so it has not been released yet.

2 Likes

Is it now working for you?

1 Like

I think this might be an issue from the OpenAI’s API side

1 Like

Model won’t change if you are using library from openai-realtime-console. They hardcoded model in relay server, so the only way how you can change that is to download node_module and hardcode needed model in openai package