语种识别API说明文档。
接口说明
1、字符长度限制 5000,调用接口 QPS 限制 50;如有扩展需求,请与我们联系,钉钉群号:23369411
2、请确保在使用该接口前,已充分了解通用版翻译产品的收费方式和价格
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
alimt:GetDetectLanguage |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| SourceText |
string |
是 |
待识别的语种 |
你好 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| DetectedLanguage |
string |
识别成功的语种 |
zh |
| RequestId |
string |
请求 ID |
0C5EC1EC-1A06-4D60-97E6-4D41350945E4 |
| LanguageProbabilities |
string |
语种识别结果的概率信息。 |
公共请求参数参见《RPC 调用机制》公共请求参数组装方案
示例
正常返回示例
JSON格式
{
"DetectedLanguage": "zh",
"RequestId": "0C5EC1EC-1A06-4D60-97E6-4D41350945E4",
"LanguageProbabilities": ""
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 110 | 10010 | 账号没有开通服务 | |
| 111 | 10011 | 子账号服务失败 | |
| 199 | 19999 | An unknown error occurred. | |
| 101 | 10001 | The request has timed out. | |
| 112 | 10012 | 翻译服务调用失败 | |
| 102 | 10002 | A system error occurred. | |
| 113 | 10013 | 账号服务没有开通或者欠费 | |
| 103 | 10003 | An error occurred while decoding the URL. Verify that the specified URL is encoded. | |
| 400 | System.ParameterError | Some required parameters are missing. | 参数错误 |
| 104 | 10004 | Some required parameters are missing. | |
| 105 | 10005 | The specified language pair is not supported. | |
| 106 | 10006 | An error occurred while detecting the language. | |
| 107 | 10007 | An error occurred while translating. | |
| 503 | System.Error | A system error occurred. | |
| 503 | Internal.Error | The internal service connection timeout, please try again later. | 后端服务超时,请稍后重试 |
| 108 | 10008 | The specified string is too long. | |
| 109 | 10009 | 子账号没有权限 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。
该文章对您有帮助吗?