#Using OpenAI API without API key

1 messages · Page 1 of 1 (latest)

wary harbor
#

For some reason I am able to use chatgpt api and I dont have an API key, so how is it working? However, it is still charging me on the OpenAI website as I have used a key before but I stopped using it in my code. How does it authenticate me?

mild helmBOT
#

Hi @wary harbor. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

The OpenAI API uses API keys for authentication. If you're using the API, it's likely that you're still using an API key, even if you're not aware of it. The key could be stored in your environment variables or in your code. You should check your code and your environment variables to ensure that you're not unintentionally using an API key. If you're being charged, it means that your API key is still being used.

You can monitor your API key usage on the Usage page (https://platform.openai.com/usage) once tracking is enabled. If you are using an API key generated prior to Dec 20, 2023 tracking will not be enabled by default. You can enable tracking going forward on the API key management dashboard (https://platform.openai.com/api-keys). All API keys generated past Dec 20, 2023 have tracking enabled. Any previous untracked usage will be displayed as Untracked in the dashboard.

Remember to secure your API keys and avoid exposing them in your code or in public repositories. Instead, store them in a secure location and expose them to your application using environment variables or a secret management service.

Please note that the ChatGPT Plus subscription does not include access to the ChatGPT API and are billed separately. The API has its own pricing, which can be found at <https://openai.com/pricing.> The ChatGPT Plus subscription covers usage on chat.openai.com only and costs $20/month.

Sources:


Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@wary harbor kapa.ai is still learning and improving, please let us know how it did by reacting below