Does Azure Open AI Charge for Ratelimit error or any other 40x error?

CarelleD 20 Reputation points
2024-03-26T15:09:15.0266667+00:00

Does Azure OpenAI charges cost, even when request failed, for example because of rate limit or token limit?

I am trying to implement exponential backlog to mitigate the problem of rate limit, which means some request may sometimes fail if the rate limit or Request per Minutes/ Token Per Minute limit is exceeded.

So the question is: If I retry 10 times and the request still fail, will I be charged for these 10 time trail or only for the trial which succeeded.

Thanks!

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,106 questions
{count} votes

Accepted answer
  1. VasaviLankipalle-MSFT 17,281 Reputation points
    2024-03-27T21:56:43.54+00:00

    Hello @CarelleD , Thank you again for your time and patience throughout this issue.

    The charges are applied depending on the error type. In general, calls that resulted in a 200 or 400 code should contribute towards the billed token count.  None of the calls which caused a 429 error should not contribute to the billed tokens. 

    Regarding your question about 429 errors, these are triggered when the requests exceed your limit of Requests per Minute or Tokens per Minute and do not incur any charges. Since Azure OpenAI generates no response and the input tokens are not used, you are not billed for these errors.

    I hope this helps.

    Regards,

    Vasavi

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.