Microsoft Edge has unveiled its new Prompt and Writing Assistance APIs, designed to simplify AI integration for web developers. These experimental APIs, featuring the Phi-4-mini language model, enable users to perform tasks like text generation, summarization, and sentiment analysis with minimal coding. Available in Edge Canary and Dev channels, they promise enhanced privacy and reduced costs by utilizing local AI models.

Simplified AI Access in Microsoft Edge
Microsoft Edge has just made a significant leap in AI accessibility with the introduction of the Prompt and Writing Assistance APIs. These experimental web APIs are now available in Edge Canary and Dev channels, making it easier for developers to integrate AI into their web applications.
What’s New?
The new Prompt API and Writing Assistance APIs allow web developers to utilize a built-in small language model called Phi-4-mini. This model is designed for various tasks like text generation, summarization, and sentiment analysis.
“These APIs are built to simplify AI integration for web developers.”
Major Updates
With the release of Edge 138, developers can access the Prompt API with just a few lines of JavaScript. This makes it incredibly user-friendly. For example, you can prompt the model to analyze feedback by simply using:
const session = await LanguageModel.create();
const result = await session.prompt("Score this feedback into a rating between 0-5: 'The food was delicious, service was excellent.'");
Additionally, the Writing Assistance APIs include the Summarizer, Writer, and Rewriter. Each of these APIs is optimized for specific writing tasks, making them incredibly versatile.
What’s Important to Know?
The Phi-4-mini model operates locally, meaning no cloud calls and no per-token costs. This setup not only enhances privacy but also reduces latency. The model is downloaded the first time a website or extension uses any of the APIs, and Edge manages caching and updates seamlessly.
“Phi-4-mini excels at text-based tasks, providing high accuracy in a compact form.”
Try It Out!
Developers are encouraged to experiment with these new APIs. Microsoft is eager to hear your feedback on use cases and challenges. This could lead to further enhancements and optimizations of the APIs.
In summary, Microsoft Edge is making strides in AI integration. With the Prompt and Writing Assistance APIs, developers can now create more intelligent and responsive web applications with ease. Dive in and explore the possibilities!
From the Windows Blog