openai / openai-quickstart-node

Node.js example app from the OpenAI API quickstart tutorial
https://platform.openai.com/docs/quickstart?context=node
MIT License
2.54k stars 1.99k forks source link

429 Error #39

Closed henry2304 closed 1 year ago

henry2304 commented 1 year ago

Describe the bug

Hi, I tried to follow the steps described in the readme to run the example app, but I get a 429 error as shown below. The API key I generated and put into the .env file doesn't have any usage, so I thought the request should go through. Is it just that the OpenAI API is at capacity, or is there anything further I should try to do to resolve the issue? Thanks for the help!

Error message below:

[~/code/app/openai-quickstart-node]$ npm run dev

> openai-quickstart-node@0.1.0 dev
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Loaded env from /Users/henry/Documents/code/app/openai-quickstart-node/.env
wait  - compiling...
event - compiled client and server successfully in 2.3s (113 modules)
Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
wait  - compiling / (client and server)...
wait  - compiling...
event - compiled client and server successfully in 2.4s (132 modules)
wait  - compiling /api/generate...
wait  - compiling...
event - compiled client and server successfully in 536 ms (142 modules)
wait  - compiling /_error (client and server)...
wait  - compiling...
error - Error: Request failed with status code 429
event - compiled client and server successfully in 101 ms (143 modules)
error - Error: Request failed with status code 429
error - Error: Request failed with status code 429

To Reproduce

Follow the 7 steps shown in the readme below, and tried to generate names on http://localhost:3000/ https://github.com/openai/openai-quickstart-node

OS

macOS

Node version

Node.js v18.13.0

henry2304 commented 1 year ago

Just a brief update that I signed up for a paid account to try to resolve this issue. It didn't seem to fix it at first yesterday, but when I re-tried this morning, it appears to be working now. Not sure if this was a temporary issue, but if no one else is experiencing this issue anymore, I'll close this issue. Thanks!