Translation API for an app i'm building

Hi Google community

I’m trying to use the Gemini API for a small personal project and I’m finding the documentation a bit difficult to navigate. Could anyone help me with:

  1. Where do I create an API key for the Gemini API? I’m using another platform to create an app and I’d like to offer the ability for the user to toggle across a few languages for limited amount of text.

  2. What are the current costs for basic text/translation usage? How can I control or cap this?

Thank you!

  1. Do you want to use Translation API, or Gemini API (Sending a prompt to LLMs)
  • In Google Cloud Console / Search Bar / APIs & Services / Credentials / Create Credentials / API Key!
  • Restrict the API Key to Generative Language API, and don’t share it locally!

This is translation api pricing-> Pricing  |  Cloud Translation  |  Google Cloud
This is gemini api pricing → https://ai.google.dev/gemini-api/docs/pricing

i’d recommend gemini 2.5 flash for this task.