API Overview
This document describes the APIs supported by MaaS, including model APIs (Text Generation) and management plane APIs (such as Endpoint and MaaS Call Statistics).
Text Generation
| API | Description |
|---|---|
| Introduces the call specifications for the chat API, provides detailed descriptions of input and output parameters, and shows usage examples. | |
| Allows calling models via an OpenAI-compatible chat API. Provides detailed descriptions of input and output parameters and shows usage examples. | |
| Allows calling models via an Anthropic-compatible chat API. Provides detailed descriptions of input and output parameters and shows usage examples. | |
| Introduces the call specifications for the chat API (applicable to select legacy models), provides detailed descriptions of input and output parameters, and shows usage examples. This API is no longer evolving; prioritize the use of MaaS Standard API V2. |
Endpoint
| API | Description |
|---|---|
| This API is used to establish independent call entry points, set rate-limiting rules, and achieve precise fee tracking based on endpoint names. This assists you in effectively managing inference service resources and optimizing usage costs. | |
| This API is used to edit the throttling settings, content guard switch, endpoint name, and endpoint description of a specified endpoint. | |
| This API is used to query the endpoint list. | |
| This API is used to delete a specified endpoint based on the input custom_endpoint_id. | |
| This API is used to enable or disable an endpoint based on the input project-id and custom_endpoint_id. |
Querying ModelArts Real-Time Services
| API | Description |
|---|---|
| Used to obtain the region information of ModelArts real-time services. When source is set to custom_from_modelarts_v2 during the creation of a custom endpoint, the region parameter in the request is obtained. | |
| Used to obtain the workspace information of ModelArts real-time services. When source is set to custom_from_modelarts_v2 during the creation of a custom endpoint, the infer_service_id is obtained. | |
| Used to obtain the workspace information of ModelArts real-time services. When source is set to custom_from_modelarts_v2 during the creation of a custom endpoint, the inference service information is obtained. | |
| Used to obtain the content guard disclaimer of MaaS real-time inference. If moderation is set to false when you create an endpoint, you must sign the disclaimer of the latest version. |
MaaS Call Statistics
| API | Description |
|---|---|
| Used to query the aggregated call data of real-time inference services, including: total calls, total failed calls, total tokens, input tokens, output tokens, etc. Data is retained for 30 days only. | |
| Used to retrieve statistics on two types of services: subscribed built-in services and created endpoints. It displays metrics for each service, such as call count, failure rate, total tokens, input tokens, output tokens, and E2E latency. Data is retained for 30 days only. | |
| Used to retrieve granular metric data for a service. This allows viewing chronological trends for metrics such as call count, failure rate, token volume, input token size, output token size, E2E latency, TPM, RPM, QPS, and average generation time. Data is retained for 30 days only. | |
| Used to retrieve detailed error data for services to review failure information, such as error codes, occurrences, and error messages. Data is retained for 30 days only. | |
| Used to retrieve the service name corresponding to a specific service ID. | |
| Used to retrieve IP addresses. | |
| Used to query the resource monitoring metrics for the "My Services" category within the MaaS real-time inference module. Data is retained for 30 days only. | |
| Used to query all versions of a service and their corresponding monitoring metric data. Data is retained for 30 days only. | |
| Used to retrieve the list of supported metrics corresponding to a specific service model type. | |
| Used to display the chronological distribution of service error code statistics. Data is retained for 30 days only. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot