Getting 429 error when calling OpenAI API despite unused key

I’m running into a weird issue with the OpenAI API in my Node.js application. Every time I try to make a request, I get a 429 error saying too many requests, but my API key shows zero usage in the dashboard.

import { Configuration, OpenAIApi } from "openai";

const config = new Configuration({
    organization: "org-ABC123DEF456GHI789JKL012",
    apiKey: "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
});
const client = new OpenAIApi(config);

async function makeRequest() {
    try {
        const result = await client.createCompletion({
            model: "text-davinci-003",
            prompt: "Hello world test",
            max_tokens: 2000,
            temperature: 0.5,
        });
        
        console.log(result.data.choices[0].text);
    } catch (error) {
        console.error(error);
    }
}

makeRequest();

What I’ve checked so far:

  • API key is definitely valid
  • Dashboard shows the key has never been used
  • Already tried adding retry logic with delays

Anyone know why this might be happening when I haven’t even made successful requests yet?

check if your ip is getting blocked maybe? sometimes openai blocks certain regions or vpn traffic. try switching networks or disabling vpn if ur using one. also that model is old af, davinci-003 got shut down i think

Had this exact problem a few months ago - it was my billing setup. Even with zero API usage, OpenAI was blocking my requests because I hadn’t added a payment method. The 429 error is misleading here since it’s not really about rate limits, just account verification. Go check your billing section in the OpenAI dashboard and add a valid payment method, even if you’re staying in the free tier. Also, text-davinci-003 is deprecated now. Switch to gpt-3.5-turbo-instruct or a newer model - that might fix it completely.