ML Kit의 GenAI API는 Gemini Nano의 기능을 활용하여 앱이 작업을 실행하도록 지원합니다. 이러한 API는 고수준 인터페이스를 통해 인기 있는 사용 사례에 즉시 사용할 수 있는 품질을 제공합니다. ML Kit GenAI API는 AICore를 기반으로 빌드됩니다. AICore는 Android 시스템 서비스로, 생성형 AI 기반 모델의 기기 내 실행을 지원하여 로컬에서 데이터를 처리함으로써 향상된 앱 기능과 개선된 사용자 개인 정보 보호와 같은 기능을 지원합니다.
기존 ML Kit 기능과 마찬가지로 GenAI API는 완전히 온디바이스로 실행되므로 다음과 같은 이점을 제공합니다.
입력, 추론, 출력 데이터가 로컬에서 처리됨
안정적인 인터넷 연결이 없어도 기능은 동일하게 유지됨
API 호출당 추가 서버 비용이 발생하지 않음
또한 생성형 AI API는 AICore를 기반으로 빌드되고 Gemini Nano로 구동되므로 모든 앱이 기기에 있는 공유 Gemini Nano 모델을 사용할 수 있습니다. 이렇게 하면 모델이 기기에 이미 있는 경우 모델이 다운로드될 때까지 기다릴 필요가 없으므로 저장공간이 절약됩니다. AICore가 개인 정보를 보호하기 위해 요청을 격리하는 방법 자세히 알아보기
스트리밍과 비스트리밍의 차이
ML Kit GenAI API는 결과를 수신하기 위한 스트리밍 및 비스트리밍 옵션을 모두 제공합니다. 스트리밍 API는 응답이 생성될 때마다 점진적으로 응답을 전송하여 데이터의 연속적인 흐름을 제공합니다. 반면 스트리밍되지 않는 API는 전체 응답이 완료될 때까지 기다린 후 단일 블록으로 반환합니다.
긴 응답에는 스트리밍 API를 선택하세요. 초기 피드백을 더 빠르게 받을 수 있습니다. 비 스트리밍 API는 짧은 응답에 더 적합하거나 결과를 일괄 처리할 때 더 적합합니다.
기기 지원
ML Kit GenAI API는 다음 기기에서 사용할 수 있으며, 지원 기기를 추가로 확대할 계획입니다.
Google: Pixel 10, Pixel 10 Pro, Pixel 10 Pro XL, Pixel 10 Pro Fold, Pixel 9, Pixel 9 Pro, Pixel 9 Pro XL, Pixel 9 Pro Fold
[[["이해하기 쉬움","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-08-20(UTC)"],[],[],null,["| This API is offered in beta, and is not subject to any SLA or deprecation policy. Changes may be made to this API that break backward compatibility.\n\nML Kit's GenAI APIs harness the power of [Gemini Nano](https://developer.android.com/ai/gemini-nano/) to help your apps\nperform tasks. These APIs provide out-of-the-box quality for popular use cases\nthrough a high-level interface. The ML Kit GenAI APIs are built on top of\n[AICore](https://android-developers.googleblog.com/2023/12/a-new-foundation-for-ai-on-android.html), an Android system service that enables on-device execution of GenAI\nfoundation models to facilitate features such as enhanced app functionality and\nimproved user privacy by processing data locally.\n\nThe ML Kit GenAI APIs support the following features:\n\n- [**Summarization**](/ml-kit/genai/summarization/android): Summarize articles or chat conversations as a bulleted list.\n- [**Proofreading**](/ml-kit/genai/proofreading/android): Polish short content by refining grammar and fixing spelling errors.\n- [**Rewriting**](/ml-kit/genai/rewriting/android): Rewrite short messages in different tones or styles.\n- [**Image description**](/ml-kit/genai/image-description/android): Generate a short description of a given image.\n\nBenefits of GenAI APIs\n\nSimilar to other existing ML Kit features, GenAI APIs run entirely on-device and\nthus provide the following benefits:\n\n- Input, inference, and output data is processed locally\n- Functionality remains the same without reliable internet connection\n- No additional server cost incurred for each API call\n\nIn addition, since GenAI APIs are built on top of AICore and powered by Gemini\nNano, every app is able to use the shared Gemini Nano model that is on the\ndevice. This avoids the need to have to wait for a model to be downloaded if it\nalready exists on a device, and in turn conserves storage space. Learn [more\nabout how AICore isolates requests to protect privacy](https://android-developers.googleblog.com/2024/10/introduction-to-privacy-and-safety-gemini-nano.html).\n\nStreaming versus non-streaming\n\nML Kit GenAI APIs offer both streaming and non-streaming options for receiving\nresults. The streaming API delivers responses incrementally as they are\ngenerated, providing a continuous flow of data. In contrast, the non-streaming\nAPI waits until the entire response is complete before returning it as a single\nblock.\n\nChoose the streaming API for lengthy responses, as it allows for quicker initial\nfeedback. The non-streaming API is more suitable for short responses or when\nprocessing results in batches.\n\nDevice support\n\nThe ML Kit GenAI APIs are available on the following devices, with\nplans to expand support to additional devices:\n\n- Google: Pixel 9, Pixel 9 Pro, Pixel 9 Pro XL, Pixel 9 Pro Fold\n- Honor: Magic 7 Pro, Magic 7\n- iQOO: iQOO 13\n- Motorola: Razr 60 Ultra\n- OnePlus: OnePlus 13, OnePlus 13s\n- OPPO: Find N5, Find X8, Find X8 Pro\n- POCO: POCO F7 Ultra\n- realme: realme GT 7 Pro\n- Samsung: Galaxy S25, Galaxy S25+, Galaxy S25 Ultra\n- vivo: vivo X200, vivo X200 Pro\n- Xiaomi: Xiaomi 15 Ultra, Xiaomi 15\n\nAvailability of specific language support may vary depending on the particular\ndevice's configuration and the models that have been downloaded to the device.\n\nQuota per application\n\nAICore enforces an inference quota per app. This means that making too many\nGenAI API requests in a short period will result in an `ErrorCode.BUSY`\nresponse. When receiving such an error, consider using exponential backoff to\nretry the request.\n\nBackground usage\n\nGenAI API inference is permitted only when the app is the top foreground\napplication. Using the API when the app is not in the foreground, including\nusing a foreground service, will result in an `ErrorCode.BUSY` response due to\nthe current lack of background usage quota.\n\nSample code\n\nTo get this code, check out the following samples:\n\n- [ML Kit GenAI Samples](https://github.com/googlesamples/mlkit/tree/master/android/genai)\n- [Android AI Catalog Sample](https://github.com/android/ai-samples/tree/main/ai-catalog)"]]