Skip to main content
Version: 1.0.0

AI 大模型接入

Feature Introduction

This series of open APIs provides a unified way to connect to multiple large models. You can quickly integrate different models by configuring the required model tokens (or any other authentication methods required by the model) in the CloudBase environment. These APIs support responses in the SSE format.

Access Guide

Calling the following APIs requires an AccessToken in the format Authorization: Bearer <token>. For how to obtain the token, refer to Access Token

HTTP Status Codes

Depending on the response result, status codes 2xx, 4xx, or 5xx may appear. Some large models return error information in the response body while still responding with a 200 status code; handle these cases accordingly.

Error Codes

The following table lists the error codes specific to this series of APIs. For the complete list, refer to Server Error Codes

Error CodeDescription
AI_MODEL_CONFIG_MISSINGMissing essential configuration such as the API key that is required to call the model
AI_MODEL_PARAM_INVALIDInvalid parameters were provided when calling the model
AI_MODEL_DISABLEDThe model has been disabled. Check whether it is enabled in the console or try again in two minutes.
AI_MODEL_NOT_SUPPORTEDThe specific model is not supported. Please check whether the model parameter in the request body is correct. When calling the cloudbase group, make sure the model has been enabled in the console.
AI_MODEL_PARAM_REQUIREDThe required model parameter is missing from the request body. Please check the request parameters.
AI_MODEL_NOT_FOUNDThe specified model group was not found
EXCEED_CONCURRENT_REQUEST_LIMITThe concurrent request limit has been exceeded. Please retry later or submit a ticket to request a higher limit.
EXCEED_TOKEN_QUOTA_LIMITThe large model Token usage has exceeded the quota or the current model group quota is unavailable. Purchase a resource pack or adjust the model group configuration before retrying.

Authentication

Token for the environment ID, obtained via login authentication (v2)

Security Scheme Type:

http

HTTP Authorization Scheme:

bearer

License

Apache 2.0