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 Code | Description |
| AI_MODEL_CONFIG_MISSING | Missing essential configuration such as the API key that is required to call the model |
| AI_MODEL_PARAM_INVALID | Invalid parameters were provided when calling the model |
| AI_MODEL_REQUEST_FAILED | The request to the model failed |
| AI_MODEL_DISABLED | The model has been disabled. Check whether it is enabled in the console or try again in two minutes. |
| AI_MODEL_NOT_FOUND | The specified model was not found |
| EXCEED_CONCURRENT_REQUEST_LIMIT | The concurrent request limit has been exceeded. Please retry later or submit a ticket to request a higher limit. |
| EXCEED_TOKEN_QUOTA_LIMIT | The token quota for the large model has been exhausted. Purchase a resource pack to increase the quota. |
Authentication
- HTTP: Bearer Auth
- API Key: APIKey
Token for the environment ID, obtained via login authentication (v2)
| Security Scheme Type: | http |
|---|---|
| HTTP Authorization Scheme: | bearer |
Tencent Cloud 3.0 signature that starts with TC3-HMAC-SHA256, with Timestamp and Token appended to the end of the signature
| Security Scheme Type: | apiKey |
|---|---|
| Header parameter name: | Authorization |