Hi there, I’ve been playing around with the GPT-4 API and am confused by the rate-limiting headers.
Here are the header responses from three sequential requests, all with about 20~ seconds of loading time.
x-ratelimit-limit-requests: 200
x-ratelimit-remaining-requests: 419
x-ratelimit-reset-requests: 125.82
Then on the next request:
x-ratelimit-limit-requests: 200
x-ratelimit-remaining-requests: 199
x-ratelimit-reset-requests: 59.70
Then again, on the request after
x-ratelimit-limit-requests: 200
x-ratelimit-remaining-requests: 362
x-ratelimit-reset-requests: 108.64
My questions are:
- Why is it showing an almost random number for the
x-ratelimit-remaining-requests
I’d imagine it would decrement by 1 on every request. - How can my
x-ratelimit-limit-requests
be higher than myx-ratelimit-remaining-requests
? - What does
x-ratelimit-reset-requests
even mean? Is that the amount of seconds/minutes until the ratelimit resets? Again, why does that value feel random? How can it possible be fluxuating like that.
Not sure if it’s a bug, but it’s very strange and confusing.
Thanks for accepting me to the API!