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?