88 < meta content ="Bikeshed version 0ef803fdf, updated Tue Jan 6 11:59:39 2026 -0800 " name ="generator ">
99 < link href ="https://webmachinelearning.github.io/prompt-api " rel ="canonical ">
1010 < link href ="https://www.w3.org/2008/site/images/favicon.ico " rel ="icon ">
11- < meta content ="7ff8e9431d4816d946b9591b16e52245b205cc69 " name ="revision ">
11+ < meta content ="509a2d80cb0844bd5f34be9e5863270ea1c79f8d " name ="revision ">
1212 < meta content ="dark light " name ="color-scheme ">
1313 < link href ="https://www.w3.org/StyleSheets/TR/2021/dark.css " media ="(prefers-color-scheme: dark) " rel ="stylesheet " type ="text/css ">
1414< style > /* Boilerplate: style-autolinks */
743743</ p >
744744 < h1 class ="no-ref p-name " id ="title "> Prompt API</ h1 >
745745 < p id ="w3c-state "> < a href ="https://www.w3.org/standards/types/#CG-DRAFT "> Draft Community Group Report</ a > ,
746- < time class ="dt-updated " datetime ="2026-03-19 " > 19 March 2026</ time > </ p >
746+ < time class ="dt-updated " datetime ="2026-03-28 " > 28 March 2026</ time > </ p >
747747 < details open >
748748 < summary > More details about this document</ summary >
749749 < div data-fill-with ="spec-metadata ">
@@ -825,7 +825,7 @@ <h2 class="heading settled" data-level="3" id="api"><span class="secno">3. </spa
825825< c- b > interface</ c- > < dfn class ="dfn-paneled idl-code " data-dfn-type ="interface " data-export id ="languagemodel "> < code > < c- g > LanguageModel</ c- > </ code > </ dfn > : < a data-link-type ="idl-name " href ="https://dom.spec.whatwg.org/#eventtarget " id ="ref-for-eventtarget "> < c- n > EventTarget</ c- > </ a > {
826826 < c- b > static</ c- > < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-promise " id ="ref-for-idl-promise "> < c- b > Promise</ c- > </ a > << a data-link-type ="idl-name " href ="#languagemodel " id ="ref-for-languagemodel "> < c- n > LanguageModel</ c- > </ a > > < dfn class ="dfn-paneled idl-code " data-dfn-for ="LanguageModel " data-dfn-type ="method " data-export data-lt ="create(options)|create() " id ="dom-languagemodel-create "> < code > < c- g > create</ c- > </ code > </ dfn > (< c- b > optional</ c- > < a data-link-type ="idl-name " href ="#dictdef-languagemodelcreateoptions " id ="ref-for-dictdef-languagemodelcreateoptions "> < c- n > LanguageModelCreateOptions</ c- > </ a > < dfn class ="dfn-paneled idl-code " data-dfn-for ="LanguageModel/create(options), LanguageModel/create() " data-dfn-type ="argument " data-export id ="dom-languagemodel-create-options-options "> < code > < c- g > options</ c- > </ code > </ dfn > = {});
827827 < c- b > static</ c- > < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-promise " id ="ref-for-idl-promise① "> < c- b > Promise</ c- > </ a > << a data-link-type ="idl-name " href ="https://webmachinelearning.github.io/writing-assistance-apis/#enumdef-availability " id ="ref-for-enumdef-availability "> < c- n > Availability</ c- > </ a > > < dfn class ="dfn-paneled idl-code " data-dfn-for ="LanguageModel " data-dfn-type ="method " data-export data-lt ="availability(options)|availability() " id ="dom-languagemodel-availability "> < code > < c- g > availability</ c- > </ code > </ dfn > (< c- b > optional</ c- > < a data-link-type ="idl-name " href ="#dictdef-languagemodelcreatecoreoptions " id ="ref-for-dictdef-languagemodelcreatecoreoptions "> < c- n > LanguageModelCreateCoreOptions</ c- > </ a > < dfn class ="dfn-paneled idl-code " data-dfn-for ="LanguageModel/availability(options), LanguageModel/availability() " data-dfn-type ="argument " data-export id ="dom-languagemodel-availability-options-options "> < code > < c- g > options</ c- > </ code > </ dfn > = {});
828- // **DEPRECATED **: This method is only available in extension contexts.
828+ // **EXPERIMENTAL **: Only available in extension and experimental contexts.
829829 < c- b > static</ c- > < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-promise " id ="ref-for-idl-promise② "> < c- b > Promise</ c- > </ a > << a data-link-type ="idl-name " href ="#languagemodelparams " id ="ref-for-languagemodelparams "> < c- n > LanguageModelParams</ c- > </ a > ?> < dfn class ="dfn-paneled idl-code " data-dfn-for ="LanguageModel " data-dfn-type ="method " data-export data-lt ="params() " id ="dom-languagemodel-params "> < code > < c- g > params</ c- > </ code > </ dfn > ();
830830
831831 // These will throw "NotSupportedError" DOMExceptions if role = "system"
@@ -863,16 +863,16 @@ <h2 class="heading settled" data-level="3" id="api"><span class="secno">3. </spa
863863 // **DEPRECATED**: This attribute is only available in extension contexts.
864864 < c- b > attribute</ c- > < a data-link-type ="idl-name " href ="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler " id ="ref-for-eventhandler① "> < c- n > EventHandler</ c- > </ a > < dfn class ="dfn-paneled idl-code " data-dfn-for ="LanguageModel " data-dfn-type ="attribute " data-export data-type ="EventHandler " id ="dom-languagemodel-onquotaoverflow "> < code > < c- g > onquotaoverflow</ c- > </ code > </ dfn > ;
865865
866- // **DEPRECATED **: This attribute is only available in extension contexts.
866+ // **EXPERIMENTAL **: Only available in extension and experimental contexts.
867867 < c- b > readonly</ c- > < c- b > attribute</ c- > < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-unsigned-long " id ="ref-for-idl-unsigned-long "> < c- b > unsigned</ c- > < c- b > long</ c- > </ a > < dfn class ="dfn-paneled idl-code " data-dfn-for ="LanguageModel " data-dfn-type ="attribute " data-export data-readonly data-type ="unsigned long " id ="dom-languagemodel-topk "> < code > < c- g > topK</ c- > </ code > </ dfn > ;
868- // **DEPRECATED **: This attribute is only available in extension contexts.
868+ // **EXPERIMENTAL **: Only available in extension and experimental contexts.
869869 < c- b > readonly</ c- > < c- b > attribute</ c- > < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-float " id ="ref-for-idl-float "> < c- b > float</ c- > </ a > < dfn class ="dfn-paneled idl-code " data-dfn-for ="LanguageModel " data-dfn-type ="attribute " data-export data-readonly data-type ="float " id ="dom-languagemodel-temperature "> < code > < c- g > temperature</ c- > </ code > </ dfn > ;
870870
871871 < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-promise " id ="ref-for-idl-promise⑦ "> < c- b > Promise</ c- > </ a > << a data-link-type ="idl-name " href ="#languagemodel " id ="ref-for-languagemodel① "> < c- n > LanguageModel</ c- > </ a > > < dfn class ="dfn-paneled idl-code " data-dfn-for ="LanguageModel " data-dfn-type ="method " data-export data-lt ="clone(options)|clone() " id ="dom-languagemodel-clone "> < code > < c- g > clone</ c- > </ code > </ dfn > (< c- b > optional</ c- > < a data-link-type ="idl-name " href ="#dictdef-languagemodelcloneoptions " id ="ref-for-dictdef-languagemodelcloneoptions "> < c- n > LanguageModelCloneOptions</ c- > </ a > < dfn class ="dfn-paneled idl-code " data-dfn-for ="LanguageModel/clone(options), LanguageModel/clone() " data-dfn-type ="argument " data-export id ="dom-languagemodel-clone-options-options "> < code > < c- g > options</ c- > </ code > </ dfn > = {});
872872 < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-undefined " id ="ref-for-idl-undefined① "> < c- b > undefined</ c- > </ a > < dfn class ="dfn-paneled idl-code " data-dfn-for ="LanguageModel " data-dfn-type ="method " data-export data-lt ="destroy() " id ="dom-languagemodel-destroy "> < code > < c- g > destroy</ c- > </ code > </ dfn > ();
873873};
874874
875- // **DEPRECATED **: This interface and its attributes are only available in extension contexts.
875+ // **EXPERIMENTAL **: Only available in extension and experimental contexts.
876876[< a class ="idl-code " data-link-type ="extended-attribute " href ="https://webidl.spec.whatwg.org/#Exposed " id ="ref-for-Exposed① "> < c- g > Exposed</ c- > </ a > =< c- n > Window</ c- > , < a class ="idl-code " data-link-type ="extended-attribute " href ="https://webidl.spec.whatwg.org/#SecureContext " id ="ref-for-SecureContext① "> < c- g > SecureContext</ c- > </ a > ]
877877< c- b > interface</ c- > < dfn class ="dfn-paneled idl-code " data-dfn-type ="interface " data-export id ="languagemodelparams "> < code > < c- g > LanguageModelParams</ c- > </ code > </ dfn > {
878878 < c- b > readonly</ c- > < c- b > attribute</ c- > < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-unsigned-long " id ="ref-for-idl-unsigned-long① "> < c- b > unsigned</ c- > < c- b > long</ c- > </ a > < dfn class ="dfn-paneled idl-code " data-dfn-for ="LanguageModelParams " data-dfn-type ="attribute " data-export data-readonly data-type ="unsigned long " id ="dom-languagemodelparams-defaulttopk "> < code > < c- g > defaultTopK</ c- > </ code > </ dfn > ;
@@ -897,9 +897,9 @@ <h2 class="heading settled" data-level="3" id="api"><span class="secno">3. </spa
897897< c- b > dictionary</ c- > < dfn class ="dfn-paneled idl-code " data-dfn-type ="dictionary " data-export id ="dictdef-languagemodelcreatecoreoptions "> < code > < c- g > LanguageModelCreateCoreOptions</ c- > </ code > </ dfn > {
898898 // Note: these two have custom out-of-range handling behavior, not in the IDL layer.
899899 // They are unrestricted double so as to allow +Infinity without failing.
900- // **DEPRECATED **: This option is only allowed in extension contexts.
900+ // **EXPERIMENTAL **: Only available in extension and experimental contexts.
901901 < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-unrestricted-double " id ="ref-for-idl-unrestricted-double② "> < c- b > unrestricted</ c- > < c- b > double</ c- > </ a > < dfn class ="dfn-paneled idl-code " data-dfn-for ="LanguageModelCreateCoreOptions " data-dfn-type ="dict-member " data-export data-type ="unrestricted double " id ="dom-languagemodelcreatecoreoptions-topk "> < code > < c- g > topK</ c- > </ code > </ dfn > ;
902- // **DEPRECATED **: This option is only allowed in extension contexts.
902+ // **EXPERIMENTAL **: Only available in extension and experimental contexts.
903903 < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-unrestricted-double " id ="ref-for-idl-unrestricted-double③ "> < c- b > unrestricted</ c- > < c- b > double</ c- > </ a > < dfn class ="dfn-paneled idl-code " data-dfn-for ="LanguageModelCreateCoreOptions " data-dfn-type ="dict-member " data-export data-type ="unrestricted double " id ="dom-languagemodelcreatecoreoptions-temperature "> < code > < c- g > temperature</ c- > </ code > </ dfn > ;
904904
905905 < a data-link-type ="dfn " href ="https://webidl.spec.whatwg.org/#idl-sequence " id ="ref-for-idl-sequence "> < c- b > sequence</ c- > </ a > << a data-link-type ="idl-name " href ="#dictdef-languagemodelexpected " id ="ref-for-dictdef-languagemodelexpected "> < c- n > LanguageModelExpected</ c- > </ a > > < dfn class ="dfn-paneled idl-code " data-dfn-for ="LanguageModelCreateCoreOptions " data-dfn-type ="dict-member " data-export data-type ="sequence<LanguageModelExpected> " id ="dom-languagemodelcreatecoreoptions-expectedinputs "> < code > < c- g > expectedInputs</ c- > </ code > </ dfn > ;
@@ -1314,7 +1314,7 @@ <h2 class="heading no-num no-ref settled" id="idl-index"><span class="content">I
13141314< c- b > interface</ c- > < a href ="#languagemodel "> < code > < c- g > LanguageModel</ c- > </ code > </ a > : < a data-link-type ="idl-name " href ="https://dom.spec.whatwg.org/#eventtarget "> < c- n > EventTarget</ c- > </ a > {
13151315 < c- b > static</ c- > < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-promise "> < c- b > Promise</ c- > </ a > << a data-link-type ="idl-name " href ="#languagemodel "> < c- n > LanguageModel</ c- > </ a > > < a href ="#dom-languagemodel-create "> < code > < c- g > create</ c- > </ code > </ a > (< c- b > optional</ c- > < a data-link-type ="idl-name " href ="#dictdef-languagemodelcreateoptions "> < c- n > LanguageModelCreateOptions</ c- > </ a > < a href ="#dom-languagemodel-create-options-options "> < code > < c- g > options</ c- > </ code > </ a > = {});
13161316 < c- b > static</ c- > < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-promise "> < c- b > Promise</ c- > </ a > << a data-link-type ="idl-name " href ="https://webmachinelearning.github.io/writing-assistance-apis/#enumdef-availability "> < c- n > Availability</ c- > </ a > > < a href ="#dom-languagemodel-availability "> < code > < c- g > availability</ c- > </ code > </ a > (< c- b > optional</ c- > < a data-link-type ="idl-name " href ="#dictdef-languagemodelcreatecoreoptions "> < c- n > LanguageModelCreateCoreOptions</ c- > </ a > < a href ="#dom-languagemodel-availability-options-options "> < code > < c- g > options</ c- > </ code > </ a > = {});
1317- // **DEPRECATED **: This method is only available in extension contexts.
1317+ // **EXPERIMENTAL **: Only available in extension and experimental contexts.
13181318 < c- b > static</ c- > < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-promise "> < c- b > Promise</ c- > </ a > << a data-link-type ="idl-name " href ="#languagemodelparams "> < c- n > LanguageModelParams</ c- > </ a > ?> < a href ="#dom-languagemodel-params "> < code > < c- g > params</ c- > </ code > </ a > ();
13191319
13201320 // These will throw "NotSupportedError" DOMExceptions if role = "system"
@@ -1352,16 +1352,16 @@ <h2 class="heading no-num no-ref settled" id="idl-index"><span class="content">I
13521352 // **DEPRECATED**: This attribute is only available in extension contexts.
13531353 < c- b > attribute</ c- > < a data-link-type ="idl-name " href ="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler "> < c- n > EventHandler</ c- > </ a > < a data-type ="EventHandler " href ="#dom-languagemodel-onquotaoverflow "> < code > < c- g > onquotaoverflow</ c- > </ code > </ a > ;
13541354
1355- // **DEPRECATED **: This attribute is only available in extension contexts.
1355+ // **EXPERIMENTAL **: Only available in extension and experimental contexts.
13561356 < c- b > readonly</ c- > < c- b > attribute</ c- > < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-unsigned-long "> < c- b > unsigned</ c- > < c- b > long</ c- > </ a > < a data-readonly data-type ="unsigned long " href ="#dom-languagemodel-topk "> < code > < c- g > topK</ c- > </ code > </ a > ;
1357- // **DEPRECATED **: This attribute is only available in extension contexts.
1357+ // **EXPERIMENTAL **: Only available in extension and experimental contexts.
13581358 < c- b > readonly</ c- > < c- b > attribute</ c- > < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-float "> < c- b > float</ c- > </ a > < a data-readonly data-type ="float " href ="#dom-languagemodel-temperature "> < code > < c- g > temperature</ c- > </ code > </ a > ;
13591359
13601360 < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-promise "> < c- b > Promise</ c- > </ a > << a data-link-type ="idl-name " href ="#languagemodel "> < c- n > LanguageModel</ c- > </ a > > < a href ="#dom-languagemodel-clone "> < code > < c- g > clone</ c- > </ code > </ a > (< c- b > optional</ c- > < a data-link-type ="idl-name " href ="#dictdef-languagemodelcloneoptions "> < c- n > LanguageModelCloneOptions</ c- > </ a > < a href ="#dom-languagemodel-clone-options-options "> < code > < c- g > options</ c- > </ code > </ a > = {});
13611361 < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-undefined "> < c- b > undefined</ c- > </ a > < a href ="#dom-languagemodel-destroy "> < code > < c- g > destroy</ c- > </ code > </ a > ();
13621362};
13631363
1364- // **DEPRECATED **: This interface and its attributes are only available in extension contexts.
1364+ // **EXPERIMENTAL **: Only available in extension and experimental contexts.
13651365[< a class ="idl-code " data-link-type ="extended-attribute " href ="https://webidl.spec.whatwg.org/#Exposed "> < c- g > Exposed</ c- > </ a > =< c- n > Window</ c- > , < a class ="idl-code " data-link-type ="extended-attribute " href ="https://webidl.spec.whatwg.org/#SecureContext "> < c- g > SecureContext</ c- > </ a > ]
13661366< c- b > interface</ c- > < a href ="#languagemodelparams "> < code > < c- g > LanguageModelParams</ c- > </ code > </ a > {
13671367 < c- b > readonly</ c- > < c- b > attribute</ c- > < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-unsigned-long "> < c- b > unsigned</ c- > < c- b > long</ c- > </ a > < a data-readonly data-type ="unsigned long " href ="#dom-languagemodelparams-defaulttopk "> < code > < c- g > defaultTopK</ c- > </ code > </ a > ;
@@ -1386,9 +1386,9 @@ <h2 class="heading no-num no-ref settled" id="idl-index"><span class="content">I
13861386< c- b > dictionary</ c- > < a href ="#dictdef-languagemodelcreatecoreoptions "> < code > < c- g > LanguageModelCreateCoreOptions</ c- > </ code > </ a > {
13871387 // Note: these two have custom out-of-range handling behavior, not in the IDL layer.
13881388 // They are unrestricted double so as to allow +Infinity without failing.
1389- // **DEPRECATED **: This option is only allowed in extension contexts.
1389+ // **EXPERIMENTAL **: Only available in extension and experimental contexts.
13901390 < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-unrestricted-double "> < c- b > unrestricted</ c- > < c- b > double</ c- > </ a > < a data-type ="unrestricted double " href ="#dom-languagemodelcreatecoreoptions-topk "> < code > < c- g > topK</ c- > </ code > </ a > ;
1391- // **DEPRECATED **: This option is only allowed in extension contexts.
1391+ // **EXPERIMENTAL **: Only available in extension and experimental contexts.
13921392 < a class ="idl-code " data-link-type ="interface " href ="https://webidl.spec.whatwg.org/#idl-unrestricted-double "> < c- b > unrestricted</ c- > < c- b > double</ c- > </ a > < a data-type ="unrestricted double " href ="#dom-languagemodelcreatecoreoptions-temperature "> < code > < c- g > temperature</ c- > </ code > </ a > ;
13931393
13941394 < a data-link-type ="dfn " href ="https://webidl.spec.whatwg.org/#idl-sequence "> < c- b > sequence</ c- > </ a > << a data-link-type ="idl-name " href ="#dictdef-languagemodelexpected "> < c- n > LanguageModelExpected</ c- > </ a > > < a data-type ="sequence<LanguageModelExpected> " href ="#dom-languagemodelcreatecoreoptions-expectedinputs "> < code > < c- g > expectedInputs</ c- > </ code > </ a > ;
0 commit comments