This document describes the status of the current implementation of the Prompt API for Chrome extensions, and how to verify.
The implementation generally intends to follow the explainer.
The API can be enabled by participating in the extension origin trial named AIPromptAPIForExtension
. After obtaining the trial token, the extension authors need to configure it in the manifest.json
together with the aiLanguageModelOriginTrial
permission.
{ "permissions": ["aiLanguageModelOriginTrial"], "trial_tokens": [<GENERATED_TOKEN>], }
The extension authors can verify if the API is available by checking for the presence of LanguageModel
or chrome.aiOriginTrial.languageModel
entrypoints from extension window and worker scripts. If the object is defined, the authors can follow the explainer and developer docs to check availability and test the APIs usage.