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',
},
},
);
}