错误码
当您调用MaaS 通用API(自定义接入点、调用统计、以及查询AI开发平台相关接口)或模型API(视频生成)时,可能会出现接口错误;为了帮助您快速定位问题,通用API请参考表1,模型API请参考表2。
| HTTP状态码 | 错误码 | 错误信息 | 说明 | 处理措施 |
|---|---|---|---|---|
| 400 | ModelArts.0104 | CreateCustomEndpointReq.endpoint_name is a required field | 自定义接入点名称为必填字段。 | 请检查自定义接入点名称是否填写。 |
| 400 | ModelArts.6271 | Custom endpoint name has already been used (including deleted access points). To ensure billing uniqueness, please use a different name. | 自定义接入点名称已被使用过(包含已删除的接入点),为保证账单唯一性,请使用不同的名称。 | 请检查接入点名称是否已经被使用并更换。 |
| 400 | ModelArts.6274 | Custom endpoint name is invalid. Enter 1 to 64 characters, staring with a letter. Only letters, digits, point(.), underscores (_), and hyphens (-) are allowed | 自定义接入点名称命名无效。请输入1到64位只包含中英文、数字、下划线(_)、中划线(-)和英文半角句号(.)的名称。 | 请检查自定义接入点名称格式。 |
| 400 | ModelArts.6291 | CustomEndpointNotFound | 自定义接入点不存在。 | 请确认自定义接入点是否已创建。 |
| 400 | ModelArts.6297 | Custom endpoint number exceed quota | 自定义接入点数量超出配额。 | 请删除不用的自定义接入点再创建。 |
| 400 | ModelArts.6299 | Custom endpoint id is required | 缺少自定义接入点ID。 | 请检查自定义接入点ID是否正确。 |
| 400 | ModelArts.6613 | Operation failed. The online service status needs to have the 'Mount to MAAS Gateway' switch turned on or the authentication method set to 'No Authentication' in order to create a custom custom endpoint. | 操作失败,在线服务状态需要打开挂载到MaaS网关开关或认证方式为无认证时才可以创建自定义接入点。 |
|
| 401 | ModelArts.8503 | No permission to create modelarts custom endpoints | 没有创建AI开发平台ModelArts-在线服务自定义接入点的权限。 | 请检查账号权限是否满足。 |
| 400 | ModelArts.0104 | Invalid parameter, error: the end time cannot be earlier than the start time. | 参数无效,问题:结束时间不能早于开始时间。 | 请修改开始时间和结束时间。 |
| 400 | ModelArts.0104 | Invalid parameter, error: not supporting querying data exceeding 30 days. | 参数无效,问题:不支持查询间隔超过30天的数据。 | 请修改开始时间和结束时间,减小时间跨度。 |
| 400 | ModelArts.0104 | Invalid parameter, error: ip address validated failed. | 参数无效,问题:IP地址格式校验失败。 | 请检查并修改参数ips里不符合IP地址格式的IP。 |
| 400 | ModelArts.0104 | Invalid parameter, error: infer type validated failed. | 参数无效,问题:推理类型校验失败。 | 请修改推理类型参数以符合枚举值。 |
| 400 | ModelArts.0104 | Invalid parameter, error: apiKey validated failed. | 参数无效,问题:API Key校验失败。 | 请检查参数api_keys里的API Key标签是否都符合要求:长度 1-128 字符,仅支持大小写字母、数字、下划线(_)、短横线(-)。 |
| 400 | ModelArts.0104 | Invalid parameter, error: versionId validated failed. | 参数无效,问题:版本ID校验失败。 | 请检查参数version_id是否符合要求:长度 1-128 字符,仅支持大小写字母、数字、下划线(_)、短横线(-)。 |
| 400 | ModelArts.0104 | Invalid parameter, error: serviceId validated failed. | 参数无效,问题:服务ID校验失败。 | 请检查参数service_id是否符合要求:长度 1-128 字符,仅支持大小写字母、数字、下划线(_)、短横线(-)。 |
| 400 | ModelArts.0104 | Invalid parameter, error: the errorCodeType is invalid. | 参数无效,问题:无效错误码类型。 | 检查参数error_code_type类型是否符合取值范围要求。 |
| 400 | ModelArts.0104 | Invalid query parameter (offset), please enter a number greater than 0. | 非法的查询参数(offset),请输入大于0的值。 | 请修改offset数值以符合取值范围。 |
| 400 | ModelArts.0104 | Invalid query parameter (limit), please enter a number between 1 and 100. | 非法的查询参数(limit),请输入1到100之间的值。 | 请修改limit数值以符合取值范围。 |
| 400 | ModelArts.0104 | Invalid parameter, error: ListServicesRequest.limit must be a maximum of 100. | 参数无效,问题:获取服务统计信息列表请求体limit参数最大取到100。 | 请修改limit数值以符合取值范围。 |
| 400 | ModelArts.0104 | Invalid parameter, error: ListServicesRequest.offset must be at least 0. | 参数无效,问题:获取服务统计信息列表请求体offset参数最小为0。 | 请修改offset数值以符合取值范围。 |
| 400 | ModelArts.0104 | Invalid parameter, error: DetailRequest.time_granularity must be one of [1 2 3]. | 参数无效,问题:获取服务指标时间分布统计信息请求体时间粒度必须为1、2、3其中一个。 | 请修改时间粒度以符合枚举值。 |
| 400 | ModelArts.0104 | Invalid parameter, error: 0-2 days duration only supports 1(minute) or 2(hour) granularity. | 参数无效,问题:0-2天的查询时间跨度只支持1(分钟)或者2(小时)粒度。 | 请修改起始时间、结束时间和时间粒度以保证符合约束规则。 |
| 400 | ModelArts.2115 | Invalid JSON request body | 非法JSON请求体。 | 已依照错误信息修改非法请求体。 |
| 400 | ModelArts.6298 | Parameter (%s) security check failed, please check for special characters. | 参数(%s)安全校验失败,请检查特殊字符。 | 请检查您的参数是否存在不安全字符。 |
| HTTP状态码 | 错误码 | 错误信息 | 描述 | 处理措施 |
|---|---|---|---|---|
| 400 | ModelArts.81001 | Inference failed: Unknown error: Tokenizer encode failed. 示例:the prompt length 151499 must less than the maximum input length 129024.Request failed with status: 400 BAD_REQUEST. | 请求中的参数超出其取值范围。 | 请根据模型类型查看对应类型的视频生成中报错参数的取值范围,更改请求后重试。 |
| 400 | ModelArts.81001 | Failed to format request body, %s is empty. 示例:Failed to format request body, model is empty. | 请求缺少必要参数。 | 请查阅视频生成,更改请求后重试。 |
| 400 | ModelArts.81001 | Failed to format request body, %s is %s, not one of %s. 示例:Failed to format request body, messages[1].role is SYSTEM, not one of ['system', 'user', 'assistant', 'function', 'tool']. | 请求存在非法参数,不符合枚举值要求。 | 请查阅视频生成,更改请求后重试。 |
| 400 | ModelArts.81001 | Invalid request header x-span-id, max length is 64. | 请求头中的日志调用链(x-span-id),最大不能超过64位。 | 更改请求头日志调用链ID后重试。 |
| 400 | ModelArts.81002 | Failed to get the authorization header. | 请求头中authorization为空,或者authorization格式不是Bearer开头。 | 请查阅视频生成,在请求头中填入正确鉴权信息后重试。 |
| 401 | ModelArts.81003 | Invalid authorization header. | 请求头中的鉴权信息解析失败。 | 请查阅视频生成,在请求头中填入正确鉴权信息后重试。 |
| 401 | ModelArts.81015 | Invalid client ip %s, rejected by api key ip allowlist setting. | API Key解析后,校验来源IP白名单失败。 | 请在“API Key管理”页面,检查API Key权限设置。 |
| 401 | ModelArts.81015 | Invalid model %s, rejected by api key model allowlist setting. | API Key解析后,校验模型版本白名单失败。 | 请在“API Key管理”页面,检查API Key权限设置。 |
| 401 | ModelArts.81015 | Invalid custom endpoint %s, rejected by api key custom endpoint allowlist setting. | API Key解析后,校验自定义接入点白名单失败。 | 请在“API Key管理”页面,检查API Key权限设置。 |
| 403 | ModelArts.81004 | Invalid request because you do not have access to it. | 尚未开通调用的预置服务。 | 请先开通预置服务。 |
| 403 | ModelArts.81006 | The resource is frozen. | 预置服务处于冻结状态。 | 请检查账号状态是否正常,是否存在欠费等情况。 |
| 403 | ModelArts.81011 | May contain sensitive information, please try again. | 输入或输出内容可能包含敏感信息。 | 请更改请求后重试。 |
| 403 | ModelArts.81017 | The account is blocked for this model version | 账号被禁止调用该模型。 | 账号可能存在违规封禁,请提交工单处理。 |
| 403 | ModelArts.81109 | No permission query task %s. | 无权限查询该异步任务。 | 检查传入的task_id是否正确。 |
| 403 | ModelArts.81112 | The resource has remained in a frozen state beyond the retention period and has been permanently deleted. | 预置服务长时间处于冻结状态,超过保留期,已自动删除开通记录。 | 请检查账号状态是否正常,是否存在欠费等情况;如需继续使用,可尝试重新开通。 |
| 404 | ModelArts.81009 | Invalid model. | 不存在请求中的model参数指定的模型。 | 请查阅API文档,更改请求后重试。 |
| 404 | ModelArts.81016 | The model %s is not available with api url %s. | 请求调用的模型,未支持该API调用。 | 请查阅视频生成,不同的API支持的模型不同。 |
| 404 | ModelArts.81108 | Task %s does not exist. | 未找到需要查询的异步任务。 | 检查传入的task_id是否正确。 |
| 413 | ModelArts.81113 | Invalid request body, exceeds the maximum size %s. | 请求体过大,超过服务端最大限制。 | 请更改请求后重试。 |
| 429 | ModelArts.81101 | Too many requests, the rate limit is %s times per second. | 请求量超过QPS限制。 | 控制调用频率,请稍后重试。 |
| 429 | ModelArts.81101 | Too many requests, the rate limit is %s times per minute. | 请求量超过RPM限制。 | 控制调用频率,请稍后重试。 |
| 429 | ModelArts.81101 | Too many requests, the rate limit is %s tokens per minute. | 请求量超过TPM限制。 | 控制调用频率,请稍后重试。 |
| 500 | ModelArts.81102 | An unexpected exception occurred. Please try again. | 系统内部异常。 | 请提交工单处理。 |
| 503 | ModelArts.81104 | Backend server error. | 服务器处理出现错误。 | 请提交工单处理。 |
| 504 | ModelArts.81110 | Server process timeout. | 服务端响应超时。 | 请稍后重试。 |