Use command api to request an API frontend when requesting SSH session. See [API] for packets format.
api
Wiki: API