Hello,
I’m working on integrating the Prompt API in my Chrome Extension. Despite following the documentation and registering the appropriate origin trial tokens, I receive the error:
"Prompt API is unavailable. Ensure tokens and permissions are correct."
Here is what i did so far:
1) Registered and added the correct trial_tokens in the manifest.json
2) Included the aiLanguageModelOriginTrial permission in the manifest.
3)
Verified my Chrome version is 131+
4)
Enabled the required Chrome flags (#optimization-guide-on-device-model).
5)Checked the API status using chrome.ai.languageModel.capabilities().
So, API remains unavailable, and the available field consistently indicates the model is inaccessible.
Is there any steps I missed any requirements for the
environment that prevents the model from being
initialized
?
manifest:
{
"manifest_version": 3,
"name": "XYZ",
"version": "1.0",
"permissions": [
"activeTab",
"scripting",
"storage",
"aiLanguageModelOriginTrial"
],
"background": { "service_worker": "background.js" },
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["content.js"]
}
],
"action": {
"default_popup": "popup.html"
},
"trial_tokens": [
"token_1_summarizer",
"token_2_prompt",
"token_3_languageDetector",
"token_4_translator"
]
}
--
You received this message because you are subscribed to the Google Groups "Chrome Built-in AI Early Preview Program Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chrome-ai-dev-previe...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chrome-ai-dev-preview-discuss/38b248a9-0eb4-4b21-a61d-6a372e8b781fn%40chromium.org.