URL | http://openapi.youku.com/v3/router/rest.json |
功能描述 | 创建产生音频的任务,将指定数据绑定到该音频。传入音频时长等关联数据,创建任务后异步生成音频,可以通过查询声码创建状态接口查看任务状态和获取音频下载地址。 |
返回格式 | Json,UTF8 |
HTTP请求方式 | GET |
当前接口版本 | V3 |
历史接口版本 | 无 |
参数名 | 参数全称 | 必选 | 参数类型 | 参数描述 |
---|---|---|---|---|
action | action | true | String | youku.olesee.create |
client_id | client_id | true | String | 应用的client id |
access_token | access token | false | String | oauth2的token |
timestamp | timestamp | true | String | 客户端当前时间戳,精确到秒,timestamp与开放平台请求时间误差为6分钟 |
version | version | true | String | API协议版本,默认值3.0 |
sign_method | sign_method | false | String | 签名的摘要算法,可选值为:HmacSHA256,md5。默认为md5 |
sign | sign | true | String | 对API调用参数(除sign外)的md5加密值。详情见签名方法 |
参数名 | 参数全称 | 必选 | 参数类型 | 参数描述 |
---|---|---|---|---|
duration | duration | true | int | 音频时长(单位秒/s),取值范围10-30 |
data | data | true | string | 关联数据,字符编码utf8,取值范围1-512字符 |
peak_level | peak_level | true | int | 音频使用场景 |
sample_rate | sample_rate | true | int | 44100表示44.1KHz,网络播出渠道可用;48000表示48KHz,非网络播出渠道可用 |
参数名 | 参数全称 | 必选 | 参数类型 | 参数描述 |
---|---|---|---|---|
errcode | errcode | true | int | 错误码 |
errmsg | errmsg | true | string | 错误描述 |
logid | logid | true | string | 日志ID |
data | data | true | json | 数据 |
task | task | true | json | 任务信息 |
id | id | true | string | 任务id |
{ "errcode": 0, "errmsg": "success", "logid": "xxx", "data": { task: { id: xxx } } }
错误码 | 错误描述 |
---|---|
10001 | lack parameter 缺少参数 |
10002 | request action not exists 接口不存在 |
10003 | request method not right 访问方式(Get/Post)不正确 |
10004 | lack system parameter 缺少系统参数 |
10005 | wrong parameter 接口参数错误(类型错误、取值范围错误等) |
10201 | auth id not exists 鉴权key不存在 |
10202 | auth sign wrong 鉴权签名错误 |
10203 | have no right to access 没有权限访问该接口 |
10204 | auth time wrong 鉴权时间戳错误 |
10205 | no owner for the access id 鉴权key无效 |
10301 | no left watermark for the section 水印已用光 |
10302 | no data for the watermark 该水印没有对应数据 |
10401 | task not exist 任务不存在 |
10402 | not right to access the task 当前key所代表用户,没有权限访问当前需要访问的任务 |
99999 | sever inner error 系统内部错误 |
无