티스토리 뷰

 

개요

요즘 OpenAI 사의 Chatgpt를 열심히 사용해 볼려고 하고 있다.

 

기본적은 세팅을 완료하였고 파이썬을 라이브러리를 이용하여 첫 OpenAI API request를 시도하였으나, 아래와 같은 오류메시지가 나온다.

 

openai.RateLimitError: Error code: 429 - {'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': None, 'code': 'insufficient_quota'}}

 

에러메시지의 URL을 따라 가면 429 - You exceeded your current quota, please check your plan and billing details 에러는 나의 credits을 소비하였거나, 최대 월간 소비량에 도달하였다는 의미이다.

 

 

OpenAI API는 신용카드를 등록한 유료사용자만 이용이 가능하고, 유료사용자는 월간 최대 사용요금을 설정할 수 있도록 되어 있다. 하지만 나의 경우에는 30$를 월간 최대사용요금을 설정해 놓았고 당연히 한번도 사용한 적이 없다.

 

429에러는 해외 사용자도 많이 겪는 문제인 듯하다.

 

https://stackoverflow.com/questions/75898276/openai-api-error-429-you-exceeded-your-current-quota-please-check-your-plan-a

 

OpenAI API error 429: "You exceeded your current quota, please check your plan and billing details"

I'm making a Python script to use OpenAI via its API. However, I'm getting this error: openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details My ...

stackoverflow.com

 

해결방법

 

OpenAI사에서 제시하고 있는 솔류션은 유료계정으로 전환하고, 신용카드 또는 직불카드를 등록한 다음, 새로운 API키를 생성하라고 한다. 

 

이리저리 찾아본 결과, 해결방법은 다양하다.

새로운 계정을 만들어 해결한 사람도 있고, 신용카드 등을 새롭게 등록하여 해결한 케이스도 있다.

 

나의 경우 Credits을 5$(세금포함 5.5$)를 충전하고 New API키를 생성하였더니 API request를 성공적을 완료하였다.