It is possible to control Otii from another application using the Otii TCP Server API.
Using this API you can control Otii from any application that includes support for standard TCP sockets.
Otii server is available in both the Otii 3 Desktop App and in the Otii Server application. You can not run both at the same time on the same computer.
At Qoitech's Github page you will also find wrappers for a few popular languages like Python, C#, Java & Matlab.