How to superscript text in code?

Can’t find anything in the docs about superscripting or subsripting text using api. I want to subscript text from my plugin

There is currently no such API, so you won’t be able to apply superscript/subscript.