Scripts using the Web API can be run from any computer that can connect to the ePO - On-prem server. For security reasons, they should not be run on the same computer as the ePO - On-prem server itself.
The Web API is used primarily for two purposes:
Scripting sequences of tasks
Performing simple tasks without using the user interface