I have a problem consuming the api, it's my first time and I get error 429:

I have a problem consuming the api, it’s my first time and I get error 429:
{message: ‘You exceeded your current quota, please check your plan and billing details.’,
type: ‘insufficient_quota’,
}

my code:

const { Configuration, OpenAIApi } = require(“openai”);

const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY,
});
const openai = new OpenAIApi(configuration);

const completion = await openai.createCompletion({
model: “text-davinci-003”,
prompt: “Hello world”,
});
console.log(completion.data.choices[0].text);

1 Like

Have you set up a card to be billed yet? If so, have you checked that you haven’t reached your limit?

1 Like