How to Call 3D Slicer API Methods in My Code?

Hello,

Is there a way to call 3D Slicer API methods directly from my code? If so, what are the recommended approaches or best practices for interacting with the API?

Thanks!

“I just found the WebServer module, but I’m not sure how to start the module and the server in the script.py.”

These instructions should help:

https://slicer.readthedocs.io/en/5.0/user_guide/modules/webserver.html