I have implemented this solution for my needs, because code from their site does not work for me
-
Install some deflate capable npm library
-
Get input data like: @startuml Bob -> Alice : hello @enduml
-
Use compress function to generate compressed URL for API call to plant UML server from input
You can change compress function return URL string to your needs