Is there a Gemini API that I can use for building my own cost/credits calculator based on tokens used. A google API which returns exactly the number of tokens used and its cost for a given video, image or text analysis.
I am trying this – https://ai.google.dev/gemini-api/docs/tokens but then I need to map it to the exact cost per token ( which varies with the model used). If there a direct API which can give me exact cost and tokens both for a given query and model.
vishalini paliwal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.