Skip to main content
Version: 1.0.0

AI Large Model Integration

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 https://docs.cloudbase.net/http-api/basic/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 https://docs.cloudbase.net/error-code/service

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_REQUEST_FAILEDThe request to the model failed
AI_MODEL_DISABLEDThe model has been disabled. Check whether it is enabled in the console or try again in two minutes.
AI_MODEL_NOT_FOUNDThe specified model 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 token quota for the large model has been exhausted. Purchase a resource pack to increase the quota.

Authentication

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

Security Scheme Type:http
HTTP Authorization Scheme:bearer

License

Apache 2.0