Updated on 2024-04-30 GMT+08:00

Accessing a Real-Time Service

If a real-time service is in the Running status, the real-time service has been deployed successfully. This service provides a standard RESTful API for you to call. Before integrating the API to the production environment, commission the API.

By default, APIs of real-time services are accessed using HTTPS. WebSocket-based access is also supported. If you select WebSocket during real-time service deployment, the API URL is a WebSocket address after the service is deployed. For details, see Accessing a Real-Time Service Through WebSocket.

ModelArts supports the following authentication methods for accessing real-time services (HTTPS requests are used as an example):

ModelArts allows you to call APIs to access real-time services in the following ways:

When you call an API to access a real-time service, the size of the prediction request body and the prediction time are subject to the following limitations:
  • The size of a request body cannot exceed 12 MB. Otherwise, the request will fail.
  • Due to the limitation of API Gateway, the prediction duration of each request does not exceed 40 seconds.