Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The CreateMonitor interface provides information on the progress of an AI model download or some fine-tuning data for the model.
It can be used via:
Inherits events from its parent, EventTarget.
downloadprogress Experimental
Fired when progress is made on the AI model download.
CreateMonitor usageA CreateMonitor instance is used via the monitor property of an AI API's create() method (Summarizer.create() is shown below). The monitor property takes a callback function as a value, the argument of which is the CreateMonitor instance. You can then monitor download progress via the instance's downloadprogress event.
const summarizer = await Summarizer.create({
sharedContext:
"A general summary to help a user decide if the text is worth reading",
monitor(monitor) {
monitor.addEventListener("downloadprogress", (e) => {
console.log(`download progress: ${e.loaded}/${e.total}`);
});
},
});
const summary = await summarizer.summarize(myText);
| Specification |
|---|
| Writing Assistance APIs> # createmonitor> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
CreateMonitor |
138Availability may be subject to geographical restrictions. |
138 | No | 122Availability may be subject to geographical restrictions. |
No | No | No | No | No | No | No | No |
downloadprogress_event |
138Availability may be subject to geographical restrictions. |
138 | No | 122Availability may be subject to geographical restrictions. |
No | No | No | No | No | No | No | No |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/CreateMonitor