Android 스튜디오의 기본 에이전트 모드에는 제한된 컨텍스트 창이 있는 무료 일일 할당량이 있습니다. 컨텍스트 윈도우를 확장하려면 자체 Gemini API 키를 추가하여 Gemini 2.5 Pro로 최대 100만 개의 토큰을 활용하면 됩니다.
컨텍스트 윈도우가 클수록 Gemini에 더 많은 안내, 코드, 첨부파일을 보낼 수 있으므로 대답의 품질이 더욱 높아집니다. 이는 에이전트와 함께 작업할 때 특히 유용합니다. 컨텍스트가 클수록 Gemini 2.5 Pro가 복잡하거나 장기 실행되는 작업을 추론할 수 있기 때문입니다.
Android 스튜디오에서 File (macOS의 경우 Android 스튜디오) > Settings > Tools > Gemini로 이동하여 Gemini API 키를 입력합니다.
Android 스튜디오에서 Gemini를 다시 실행하고 에이전트 모드에서 훨씬 더 나은 대답을 받아보세요.
개인 API 키와 연결된 Gemini API 사용에는 추가 요금이 부과되므로 Gemini API 키를 안전하게 보호하세요. AI Studio에서 API 키 가져오기 > 사용량 및 결제를 통해 Gemini API 키 사용량을 모니터링할 수 있습니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-31(UTC)
[[["이해하기 쉬움","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**."]]