Getting Incorrect API key Error in NODE.JS

error: {
message: ‘Incorrect API key provided: sk-bUBrM***************************************HQsj. You can find your API key at’,
type: ‘invalid_request_error’,
param: null,
code: ‘invalid_api_key’


Did you check your API keys on the OpenAI website?

Yes, Checked. but now getting error: {
message: ‘You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs:’,
type: ‘insufficient_quota’,
param: null,
code: ‘insufficient_quota’

The pink on the right shows an account with only expired free trial credits in pink. You’ll need to fund the API account by adding a payment method and purchasing a credit.

thanks for your help, but when I am generating the key, it is showing the pink color. i never use the key

The free trial expires three months after you first created an OpenAI account, such as to use ChatGPT.

1 Like