TorchServe uses a RESTful API for both inference and management calls. The API is compliant with the OpenAPI specification 3.0. You can easily generate client side code for Java, Scala, C#, or Javascript by using swagger codegen.
When TorchServe starts, it starts two web services:
By default, TorchServe listens on port 8080 for the Inference API and 8081 for the Management API. Both APIs are accessible only from localhost by default. To enable access from a remote host, see TorchServe Configuration.