How do requests work with billing

Hi,

I have a question on how the billing / API works. I have 18$ on my account and I have 0 calls to the API. I am trying to run a simple agent setup using crew AI.

I have a brand new API key for the project that has never made a successful call. Each time I try to call the API I get insufficient_funds message:

try:
    response = client.completions.create(model="gpt-3.5-turbo",  # Use a different model if gpt-4 is not available
    prompt="Provide a detailed explanation on AI impact on industries.",
    max_tokens=256)

    print(response.choices[0].text)
except Exception as err:
    print(err)

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'}}

How much money do you need to put on your account to make a request? I don’t want to be spending more than 18$ per call, that seems utterly excessive.

Check that you actually have funds available.

The $18 dollars you’re referring to sounds like a credit grant from around a year ago which will have been expired for many months now.

You need to add funds to your account if you want to use the API.

1 Like