Skip to content

Gemini API

The Gemini Developer API lets an app send requests to Google’s Gemini models using a Google Cloud project.

Visit Gemini API

What do you need besides access to the Gemini chat app?

Your app needs Gemini Developer API access in a Google Cloud project. Use the project and key shown in Google AI Studio. Paid API usage goes through Cloud Billing for that project. A personal Gemini app subscription has its own terms and benefits.

Google requires developers to be 18 or older and to use the service from an available region. Its terms prohibit integrating the API into a product aimed at or likely to be used by anyone under 18. Check the project your key belongs to and keep the regular key on a trusted server. If you have an older project, check Google’s current key requirements before reusing a key. Plan which app or environment will make requests and who is responsible for its bill.

How can your app use a result without trusting every word?

Choose a supported model for the task. A workshop app could ask for a short draft heading and a category using structured output, which gives the response a shape your code can read. Check that the heading and category make sense before displaying them.

If you want to send a picture, check the selected model’s supported inputs and price first. Keep a manual path for missing, incorrect or unhelpful results. A field that fits the format can still contain the wrong answer.

How can a free or paid project run out of capacity?

Google documents a free tier for selected models and features, and separate paid API pricing. Check the model’s input and output prices per million tokens and any separate charges for features such as caching or grounding, which connects a response to external information.

Quotas can count requests per minute, input tokens per minute or requests per day. Google applies rate limits per project, so another key on the same project does not give you another quota. Google calls its project spend caps experimental. Spend caps are unavailable for invoiced or offline billing accounts. You may still go over a project cap when billing data is delayed or work is still running. Keep your own limits for retries and usage.

How can you plan a small test without sending any data?

Draw an exercise that drafts a heading from made-up workshop details. Keep the input, output and budget on paper. Leave keys, Cloud projects and real text untouched.

  1. Choose what the model needs
    Write a fictional workshop title and subject. Exclude the attendee list and contact details. Write which field a human should confirm before publishing the draft.
  2. Count a busy minute
    Imagine 30 requests in a minute. Write the input and output token estimates for one request, then multiply each by 30. Check the projected requests and input tokens against the project’s separate limits. Keep both token counts for the budget.
  3. Plan the budget and fallback
    On paper, multiply expected monthly input and output by the chosen rates. Leave room for retries and any extra feature charges. If the daily quota or planned spend is reached, leave the workshop title for manual editing.

What should you check before sending customer information?

Google says Unpaid Services can use prompts and replies to improve its products and asks users to keep sensitive, confidential and personal information out. Paid Services have different data terms, including limited logging for specified purposes. Check the terms for the project, feature and region before sending real data.

Google applies its Paid Services data-use terms to all services if you are in the EEA, Switzerland or the UK. A separate provision requires Paid Services when you make an API client available to users in those places. Review both conditions before offering the feature. Save your own test cases and field definitions so you can recheck the output if the model changes.