Issue calling realtime or o1 API models enabled for tier 1

Hi community,

I’m encountering an issue when trying to call the o1 models enabled in Tier 1 or the realtime API, it does not allow me to make calls. All other available models work perfectly fine when called, but whenever I try to interact with o1 or realtime, I get the following error message:

{
    "error": {
        "message": "You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth (i.e. Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.",
        "type": "invalid_request_error",
        "param": null,
        "code": null
    }
}

I’ve ensured that my API key is correctly configured, and I can confirm that the other models (e.g., gpt-4, gpt-3.5) work without any issues from Unity. This problem seems to occur exclusively with the o1-preview and realtime models.

Has anyone else encountered this issue when using Unity or knows how to resolve it? Any help or suggestions would be greatly appreciated.

Thanks in advance!

Check your environment variables, it seems that the environment you’re trying to use the Realtime API on doesn’t have an API key variable.

Cheers. :hugs:

It does have an API key because it works with other AI models.

The only difference is what I choose in this switch. The top line works the bottom one does not (The same for realtime).

Interesting.
Could you try calling the API with a hardcoded plain key just to test if the key is the issue? (Do test all three: o1, 4o-mini and realtime API).

1 Like