Insufficient_quota bug when trying to use gpt api

I created my API key, I’m trying to make the first request using the JS code below:async function askQuestion(question, apiKey, apiUrl) {
const requestData = {
prompt: question,
max_tokens: 150, // Adjust max tokens as needed
temperature: 0.7, // Adjust temperature as needed
stop: ‘\n’,// Stop generation at new line
model: “gpt-3.5-turbo”
};

const response = await fetch(apiUrl, {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${apiKey}`
    },
    body: JSON.stringify(requestData)
});

and get the error below: “error”: {
“message”: “You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.”,
“type”: “insufficient_quota”,
“param”: null,
“code”: “insufficient_quota”
}
}

Have you come across this?

you likely need to upgrade to a paid plan and add a credit or debit card.

If following this step, make sure you generate a new token afterwards, as the old token will still be associated with the free plan.

hope this help!

I created the API KEY today, no free usage time?