•   8 months ago

Api

Hi,

I’ve been experimenting with the new Prompt API in Chrome Canary (with flags #enable-experimental-web-platform-features and #prompt-api-for-gemini-nano enabled). However, I’m still seeing window.ai as undefined on my test domain, and the APIs like canCreateTextSession() aren’t available.

I noticed that the documentation mentions an Origin Trial for the Prompt API. Does this mean the API is only accessible with a valid Origin Trial token at the moment, and not just via Canary + flags?

If so, could you confirm whether developers need to register for the Origin Trial to get access right now, or if there’s any Chrome version / setup where the API should already be exposed without a token?

Thanks in advance!

  • 3 comments

  • Manager   •   8 months ago

    window.ai is the old way. Check out https://developer.chrome.com/docs/ai/prompt-api#use_the_prompt_api for the new shape.

    Re origin trial, it's accessible to you only if you enable flags on your machine and to everyone when adding a valid token.

  •   •   8 months ago

    Hello,

    I’m encountering an issue where Chrome.ai isn’t available in Spain. I tried a hybrid approach using Gemini.ai, but that didn’t work either. Would you recommend an alternative approach, or should I simply create a version that works for the U.S. market?

    Best regards,

    Phil

  • Manager   •   8 months ago

    What do you mean by "Chrome.ai isn’t available in Spain"?

Comments are closed.