1) I don't think the -decodeurl option is designed to output a diagram as well - I think it purely converts your encoded text in to plain text.
2) You can pipe the -decodeurl output into a second java command that is using -pipe. e.g. java -jar plantuml-1.2024.6.jar -decodeurl Syp9J4vLqBLJSCfFib9mB2t9ICqhoKnEBCdCprC8IYqiJIqkuGBAAUW2rJY256DHLLoGdrUS2W00 | java -jar plantuml-1.2024.6.jar -pipe > mypng.png
3) The difference between Syp9J4vLqBLJSCfFib9mB2t9ICqhoKnEBCdCprC8IYqiJIqkuGBAAUW2rJY256DHLLoGdrUS2W00 and SoWkIImgAStDuNBCoKnELT2rKt3AJx9IS2mjoKZDAybCJYp9pCzJ24ejB4qjBk42oYde0jM05MDHLLoGdrUSokMGcfS2D1C0 is that the latter includes the @startuml/@enduml and the former does not - note the online server will add the @startuml/@enduml for you (Try visiting https://www.plantuml.com/plantuml/umla/Syp9J4vLqBLJSCfFib9mB2t9ICqhoKnEBCdCprC8IYqiJIqkuGBAAUW2rJY256DHLLoGdrUS2W00 and compare the browser address bar with the page's 'decode url' bar).
4) The @startuml/@enduml are added in for you by -decodeurl. But there's a bug that generates it twice. It doesn't actually matter though - plantuml will remove the extra pair if you use the text hence the -pipe above works fine. If anyone is interested about the bug - in https://github.com/plantuml/plantuml/blob/master/src/net/sourceforge/plantuml/Run.java procedure processArgs, it does these 6 lines:
if (option.isDecodeurl()) {
error.goOk();
final Transcoder transcoder = TranscoderUtil.getDefaultTranscoder();
System.out.println("@startuml");
System.out.println(transcoder.decode(s));
System.out.println("@enduml");Where you can see it outputs the @startuml/@enduml. But I think transcoder.decode adds another pair via https://github.com/plantuml/plantuml/blob/master/src/net/sourceforge/plantuml/code/ArobaseStringCompressor.java procedure "decompress". (ArobaseStringCompressor is called from https://github.com/plantuml/plantuml/blob/master/src/net/sourceforge/plantuml/code/TranscoderSmart.java zlib object). But it's just me trying to follow the code manually, I haven't debugged, so I could be in the wrong procs.