Skip to main content

Unexpected Token

Encountering the Unexpected token error when initiating a chat with OpenAI models mainly caused by either your OpenAI key or where you access your OpenAI from. This issue can be solved through the following steps:

  1. Obtain an OpenAI API key from OpenAI's developer platform and integrate it into your application.

  2. Trying a VPN could potentially solve the issue, especially if it's related to region locking for accessing OpenAI services. By connecting through a VPN, you may bypass such restrictions and successfully initiate chats with OpenAI models.