Google AI āϏā§āĻā§āĻĄāĻŋāĻāϤ⧠āϏāĻžāĻāύ āĻāύ āĻāϰā§āύ āĻāĻŦāĻ Get API āĻā§ āĻŦā§āϤāĻžāĻŽā§ āĻā§āϞāĻŋāĻ āĻāϰ⧠āĻāĻāĻāĻŋ āĻā§ āĻĒāĻžāύāĨ¤
[[["āϏāĻšāĻā§ āĻŦā§āĻāĻž āϝāĻžā§","easyToUnderstand","thumb-up"],["āĻāĻŽāĻžāϰ āϏāĻŽāϏā§āϝāĻžāϰ āϏāĻŽāĻžāϧāĻžāύ āĻšā§ā§āĻā§","solvedMyProblem","thumb-up"],["āĻ āύā§āϝāĻžāύā§āϝ","otherUp","thumb-up"]],[["āĻāϤ⧠āĻāĻŽāĻžāϰ āĻĒā§āϰā§ā§āĻāύā§ā§ āϤāĻĨā§āϝ āύā§āĻ","missingTheInformationINeed","thumb-down"],["āĻā§āĻŦ āĻāĻāĻŋāϞ / āĻ āύā§āĻ āϧāĻžāĻĒ","tooComplicatedTooManySteps","thumb-down"],["āĻĒā§āϰāύā§","outOfDate","thumb-down"],["āĻ āύā§āĻŦāĻžāĻĻ āϏāĻāĻā§āϰāĻžāύā§āϤ āϏāĻŽāϏā§āϝāĻž","translationIssue","thumb-down"],["āύāĻŽā§āύāĻž / āĻā§āĻĄ āϏāĻāĻā§āϰāĻžāύā§āϤ āϏāĻŽāϏā§āϝāĻž","samplesCodeIssue","thumb-down"],["āĻ āύā§āϝāĻžāύā§āϝ","otherDown","thumb-down"]],["2025-07-31 UTC-āϤ⧠āĻļā§āώāĻŦāĻžāϰ āĻāĻĒāĻĄā§āĻ āĻāϰāĻž āĻšā§ā§āĻā§āĨ¤"],[],[],null,["# Add your own Gemini API key\n\n| **Note:** The ability to add your own API key is only applicable if you're using Gemini's free tier; business users have access to Gemini 2.5 Pro by default.\n\nThe default Agent mode in Android Studio has a no-cost daily quota with a\nlimited context window. To expand the context window, you can add your own\nGemini API key to take advantage of up to 1 million tokens with Gemini 2.5 Pro. \n\nA larger context window lets you send more instructions, code, and attachments\nto Gemini, leading to even higher quality responses. This is especially useful\nwhen working with agents because the larger context provides Gemini 2.5 Pro with\nthe ability to reason about complex or long-running tasks.\n\nTo get an API key:\n\n1. Sign in to [Google AI Studio](https://aistudio.google.com/) and get a key by clicking on the Get API key button.\n2. In Android Studio, go to **File (Android Studio** on macOS) **\\\u003e Settings \\\u003e\n Tools \\\u003e Gemini** to enter your Gemini API key.\n3. Relaunch Gemini in Android Studio and get even better responses from Agent mode.\n\nBe sure to safeguard your Gemini API key because\n[additional charges](https://ai.google.dev/gemini-api/docs/pricing) apply for\nGemini API usage associated with a personal API key. You can monitor your Gemini\nAPI key usage in AI Studio through **Get API Key \\\u003e Usage \\& Billing**."]]