googleapis / googleapis/python-genai

Return rate limits in the response header

Open
#1,721 1 comment 1 reaction 1 assignee Assigned to @kkorpal View on GitHub
api: gemini-api priority: p3 type: feature request
Dominant language
Python
Stars
4k
Forks
1k
Avg merge
2d 11h
Merged PRs (30d)
40

Description

**Is your feature request related to a problem? Please describe.**
It would be nice to know that rate limits the API key is subjected to.

I can see what [rate limits it can subjected to](https://ai.google.dev/gemini-api/docs/rate-limits#free-tier) but there's not way to know what the real rate limits of the API key apart from actually going to GCP (in the case of the company I work in, I don't have access to this information, I first need to ask another team to tell me which slows down the workflow).

**Describe the solution you'd like**
Something similar to what the [OpenAI Api does](https://platform.openai.com/docs/api-reference/debugging-requests), they return the rate limits in the HTTP response headers

**Describe alternatives you've considered**
None at the moment.

**Additional context**
None at the moment

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.