window.ai
Learn how to use the JigsawStack Javascript SDK on your browser.
The new window.ai
Chrome API (currently available only in Chrome Canary) introduces native AI models that run locally and completely offline within the web environment.
However, it’s not yet widely available or compatible across different devices and browsers, and it currently supports only a small language model, which limits its use cases. Despite these limitations, the potential for this technology is significant.
JigsawStack enhances this by integrating a suite of powerful AI utilities into the window.ai
object. Here’s how you can use it:
Prerequisites
To get the most out of this guide, you’ll need to:
- Set up an account
- Create and retrieve your Public key
We recommend using your public key
for client-side access. To enhance
security and control, you can further restrict the public key
to specific
APIs. For more information,
visit
Installation
Usage
- For typescript projects, you can add JigsawStack types to
window.ai
by doing the following:
Was this page helpful?