๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๊ฐœ๋ฐœ/AI

(AI) openai.error.RateLimitError: 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.

by gomdeng 2025. 1. 31.

๐Ÿถ ์—๋Ÿฌ

โœ”๏ธ ์ž‘์—… ํ™˜๊ฒฝ
  - Window (PowerShell)
  - VSCode
  - Python 3.10

โœ”๏ธ ์ž‘์—… ๋‚ด์šฉ (OpenAI API ํ…Œ์ŠคํŠธ)
   1. API Key ์ƒ์„ฑ
   2. ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์„ค์ •
setx OPENAI_API_KEY "your_api_key_here"

   3. OpenAI API ์„ค์น˜
pip install openaiโ€‹

   4. ์†Œ์Šค ์ฝ”๋“œ ์ž‘์„ฑ (text_example.py)
from openai import OpenAI
client = OpenAI()

completion = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {
            "role": "user",
            "content": "Write a haiku about recursion in programming."
        }
    ]
)

print(completion.choices[0].message)โ€‹

   5. ์‹คํ–‰
python text_example.py .โ€‹

   6. ์—๋Ÿฌ ๋ฐœ์ƒ
openai.error.RateLimitError: 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.

 

๐Ÿถ ์กฐ์น˜

โœ”๏ธ ๋‚ด์šฉ
๋‚ด API ํ‚ค ํ• ๋‹น๋Ÿ‰์„ ์ดˆ๊ณผํ–ˆ๋‹ค๋Š” ์—๋Ÿฌ๋‹ค.
๊ทผ๋ฐ ๋‚˜๋Š” ์ด๊ฒŒ ์ฒ˜์Œ์œผ๋กœ ํ•˜๋Š”๋ฐ ๋ญ”์†Œ๋ฆฌ์ธ์ง€..
๋Œ€์‹œ๋ณด๋“œ ๊ฐ€์„œ ์‚ฌ์šฉ๋Ÿ‰์„ ํ™•์ธํ•ด์„œ ๋” ์ดํ•ด๊ฐ€ ๊ฐ€์ง€ ์•Š์•˜๋‹ค.

 

โœ”๏ธ ๊ฒฐ๋ก 

์ด๋Ÿฐ ์ €๋Ÿฐ ํ™•์ธ ์ž‘์—…์ด ์žˆ๊ธด ํ–ˆ์ง€๋งŒ ๊ทธ๋ƒฅ ๊ฒฐ๋ก ์€ API๋Š” Paid User๋งŒ ์ด์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.
์ด๋Ÿฐ๊ฑฐ์— ์‹œ๊ฐ„ ๋Œ๋ฆฌ๋ฉด ๋„ˆ๋ฌด ์†์ด ์“ฐ๋ฆฌ๋‹ค.. ํ•˜์ง€๋งŒ, ํ•˜๋‚˜ ์•Œ์•„์„œ ๋‹คํ–‰

๋ 

 

 

[ChatGPT] openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details.

ChatGPT API๋Š” credit card๋ฅผ ๋“ฑ๋กํ•œ paid ์œ ์ €๋งŒ ์‚ฌ์šฉ๊ฐ€๋Šฅํ•˜๋‹ค!์—๋Ÿฌ ๋กœ๊ทธ๋ฅผ ์ฝ๊ณ  ํ˜„์žฌ ๋‚ด๊ฐ€ ๊ฐ–๊ณ  ์žˆ๋Š” API์˜ ํ”Œ๋žœ์ด๋‚˜ Billing Option์— ํ•ด๋‹นํ•˜๋Š” ํ˜ธ์ถœ์„ ์ „๋ถ€ ์‚ฌ์šฉํ•ด ๋ฐœ์ƒํ•˜๋Š” ๋ฌธ์ œ๋ผ๊ณ  ํŒ๋‹จํ–ˆ๋‹ค. ๋”ฐ๋ผ์„œ

velog.io