googleapis / googleapis/python-genai

Programmatic Way to Retrieve Token Pricing for Gemini Models?

Open
#1,200 8 comments 9 reactions 1 assignee Claimed by @Venkaiahbabuneelam View on GitHub
priority: p3 type: feature request
Dominant language
Python
Stars
4k
Forks
1k
Avg merge
2d 11h
Merged PRs (30d)
40

Description

**Is there a supported API call (or SDK method) to fetch the current pricing for each Gemini model?**
If not, are there any recommended best practices for keeping pricing up-to-date within applications?
Are there plans to provide such a feature in the future?

**Use case:**
I’d like to avoid hard-coding pricing information, to reduce maintenance and prevent discrepancies if Google updates prices.

Thanks in advance!

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.