众扬汇 AI 开放平台 API 文档

查询语音生成任务状态

OpenAPI Specification

yaml
openapi: 3.0.1
info:
  title: ''
  description: "本页接口说明详见下方接口定义;参数取值与返回以本平台实测为准。"
  version: 1.0.0
paths:
  /minimax/v1/query/t2a_async_query_v2:
    get:
      summary: 查询语音生成任务状态
      deprecated: false
      description: "按 task_id 查询异步语音合成任务的完成情况,对应 GET /minimaxi/v1/query/t2a_async_query_v2。该能力经第三方渠道对接,参数与返回以本平台实测为准。"
      tags:
        - 音频接口/MINIMAX 语音合成
      parameters:
        - name: task_id
          in: query
          description: "本任务的标识,提交时由平台下发;后续查状态需带上它"
          required: true
          example: 95157322514444
          schema:
            type: integer
        - name: Authorization
          in: header
          description: "该字段的取值与含义以本平台实际返回为准。"
          required: false
          example: Bearer {{YOUR_API_KEY}}
          schema:
            type: string
            default: Bearer {{YOUR_API_KEY}}
      responses:
        '200':
          description: "该字段的取值与含义以本平台实际返回为准。"
          content:
            application/json:
              schema:
                type: object
                properties:
                  task_id:
                    type: integer
                    description: "任务 ID,提交任务时由平台返回"
                  status:
                    type: string
                    description: "该任务当前状态。取值:Processing 处理中、Success 已完成、Failed 失败、Expired 已过期;可用选项:success、failed、expired、processing。"
                  file_id:
                    type: integer
                    description: "任务创建成功后返回的音频文件 ID。任务完成后可凭 file_id 调用文件检索接口下载;请求出错时不返回该字段。注意:下载 URL 自生成起 9 小时(32,400 秒)内有效,过期后文件失效,请及时下载。"
                  base_resp:
                    type: object
                    properties:
                      status_code:
                        type: integer
                        description: "状态码:0 正常、1002 限流、1004 鉴权失败、1039 触发 TPM 限流、1042 非法字符超 10%、2013 参数错误。"
                      status_msg:
                        type: string
                        description: "本次任务的状态详情"
                    required:
                      - status_code
                      - status_msg
                    description: "本次请求的状态码与详情"
                required:
                  - task_id
                  - status
                  - file_id
          headers: {}
      security: []
components:
  schemas: {}
  securitySchemes: {}
servers: []
security: []

使用提示:本页接口的 Base URL 为 https://api.allyang.cn,请求头需携带 Authorization: Bearer <令牌>(令牌在控制台「令牌管理」中创建)。示例中的任务 ID、时间戳与文件地址均为示意值,实际以平台返回为准。

模型名请在「模型广场」复制后填入,不要手输;计费、限流与在售清单以平台实测为准(部分数值待补)。