> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dreamto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取带时间戳的歌词：创建任务

> 同步接口：`model` 选择接口，参数放在 `input` 中，结果直接在响应的 `data` 中返回，无需轮询。所有响应的 HTTP 状态码都是 200，以 `code` 判断结果。



## OpenAPI

````yaml /openapi/zh/suno-timestamped-lyrics.json post /api/v1/jobs/createTask
openapi: 3.1.0
info:
  description: 获取已生成歌曲逐词对齐的歌词时间戳与波形数据，用于卡拉 OK 式歌词同步显示；同步返回、无回调。
  title: Suno 获取带时间戳的歌词
  version: v1
servers:
  - url: https://api.dreamto.ai
security:
  - bearerAuth: []
tags:
  - name: Suno 获取带时间戳的歌词
paths:
  /api/v1/jobs/createTask:
    post:
      tags:
        - Suno 获取带时间戳的歌词
      summary: 创建任务
      description: >-
        同步接口：`model` 选择接口，参数放在 `input` 中，结果直接在响应的 `data` 中返回，无需轮询。所有响应的 HTTP
        状态码都是 200，以 `code` 判断结果。
      operationId: sunoCreateTask
      requestBody:
        content:
          application/json:
            examples:
              获取歌曲的歌词时间戳:
                description: 传入已完成音乐任务的 `task_id` 与其中一首歌曲的 `audio_id`，同步返回逐词时间戳。
                summary: 获取歌曲的歌词时间戳
                value:
                  model: ai-music-api/timeStamped-lyrics
                  input:
                    task_id: c2a81e5f09d34b7e8f61a2d4c9b03e75
                    audio_id: f924248f-e765-48fd-9ea9-c64290225e4e
            schema:
              $ref: >-
                #/components/schemas/SunoCreateTaskRequestSunoTimestampedLyricsInput
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                创建成功:
                  description: 同步返回结果，`data` 即本次结果。
                  summary: 创建成功
                  value:
                    code: 200
                    data:
                      code: 200
                      data:
                        alignedWords:
                          - endS: 6.251
                            palign: 0
                            startS: 5.572
                            success: true
                            word: |-
                              [Verse]
                              Kettle 
                          - endS: 6.767
                            palign: 0
                            startS: 6.331
                            success: true
                            word: 'starts '
                          - endS: 7.048
                            palign: 0
                            startS: 6.858
                            success: true
                            word: 'its '
                          - endS: 7.412
                            palign: 0
                            startS: 7.10867
                            success: true
                            word: 'little '
                          - endS: 10.234
                            palign: 0
                            startS: 7.53775
                            success: true
                            word: |
                              song
                          - endS: 10.694
                            palign: 0
                            startS: 10.326
                            success: true
                            word: 'First '
                          - endS: 11.023
                            palign: 0
                            startS: 10.7598
                            success: true
                            word: 'light '
                          - endS: 11.55
                            palign: 0
                            startS: 11.0665
                            success: true
                            word: 'slips '
                          - endS: 12.047
                            palign: 0
                            startS: 11.63
                            success: true
                            word: 'across '
                          - endS: 12.151
                            palign: 0
                            startS: 12.08167
                            success: true
                            word: 'the '
                          - endS: 14.99
                            palign: 0
                            startS: 12.231
                            success: true
                            word: |
                              floor
                          - endS: 15.794
                            palign: 0
                            startS: 15.124
                            success: true
                            word: 'Coffee '
                          - endS: 16.189
                            palign: 0
                            startS: 15.84767
                            success: true
                            word: 'warms '
                          - endS: 16.426
                            palign: 0
                            startS: 16.3075
                            success: true
                            word: 'my '
                          - endS: 16.913
                            palign: 0
                            startS: 16.5234
                            success: true
                            word: 'hands '
                          - endS: 18.977
                            palign: 0
                            startS: 16.993
                            success: true
                            word: |
                              awake
                          - endS: 19.186
                            palign: 0
                            startS: 19.04667
                            success: true
                            word: 'And '
                          - endS: 19.209
                            palign: 0
                            startS: 19.209
                            success: true
                            word: I’
                          - endS: 19.3
                            palign: 0
                            startS: 19.3
                            success: true
                            word: 'm '
                          - endS: 20.596
                            palign: 0
                            startS: 19.3705
                            success: true
                            word: 'ready '
                          - endS: 21.254
                            palign: 0
                            startS: 20.68733
                            success: true
                            word: 'for '
                          - endS: 21.657
                            palign: 0
                            startS: 21.33567
                            success: true
                            word: 'the '
                          - endS: 23.30364
                            palign: 0
                            startS: 21.737
                            success: true
                            word: |+
                              day

                          - endS: 23.572
                            palign: 0
                            startS: 23.32429
                            success: true
                            word: |-
                              [Chorus]
                              Good 
                          - endS: 24.24057
                            palign: 0
                            startS: 23.652
                            success: true
                            word: 'morning, '
                          - endS: 25.3146
                            palign: 0
                            startS: 24.30914
                            success: true
                            word: 'coffee, '
                          - endS: 25.58
                            palign: 0
                            startS: 25.3792
                            success: true
                            word: 'here '
                          - endS: 25.879
                            palign: 0
                            startS: 25.713
                            success: true
                            word: 'we '
                          - endS: 26.479
                            palign: 0
                            startS: 25.9735
                            success: true
                            word: |
                              go
                          - endS: 26.721
                            palign: 0
                            startS: 26.55967
                            success: true
                            word: 'One '
                          - endS: 27.122
                            palign: 0
                            startS: 26.8012
                            success: true
                            word: 'sweet '
                          - endS: 27.474
                            palign: 0
                            startS: 27.219
                            success: true
                            word: 'sip '
                          - endS: 27.648
                            palign: 0
                            startS: 27.532
                            success: true
                            word: 'and '
                          - endS: 27.754
                            palign: 0
                            startS: 27.68333
                            success: true
                            word: 'the '
                          - endS: 27.92
                            palign: 0
                            startS: 27.7872
                            success: true
                            word: 'whole '
                          - endS: 28.127
                            palign: 0
                            startS: 27.9614
                            success: true
                            word: 'world '
                          - endS: 28.603
                            palign: 0
                            startS: 28.2122
                            success: true
                            word: |
                              slows
                          - endS: 28.676
                            palign: 0
                            startS: 28.676
                            success: true
                            word: 'A '
                          - endS: 28.989
                            palign: 0
                            startS: 28.72817
                            success: true
                            word: 'little '
                          - endS: 29.755
                            palign: 0
                            startS: 29.069
                            success: true
                            word: 'warmth, '
                          - endS: 29.821
                            palign: 0
                            startS: 29.814
                            success: true
                            word: 'a '
                          - endS: 30.155
                            palign: 0
                            startS: 29.87667
                            success: true
                            word: 'little '
                          - endS: 31.172
                            palign: 0
                            startS: 30.235
                            success: true
                            word: |
                              cheer
                          - endS: 31.32
                            palign: 0
                            startS: 31.22133
                            success: true
                            word: 'The '
                          - endS: 31.682
                            palign: 0
                            startS: 31.4
                            success: true
                            word: 'best '
                          - endS: 31.978
                            palign: 0
                            startS: 31.756
                            success: true
                            word: 'part '
                          - endS: 32.212
                            palign: 0
                            startS: 32.095
                            success: true
                            word: 'of '
                          - endS: 32.375
                            palign: 0
                            startS: 32.26633
                            success: true
                            word: 'the '
                          - endS: 32.845
                            palign: 0
                            startS: 32.461
                            success: true
                            word: morning’
                          - endS: 32.966
                            palign: 0
                            startS: 32.845
                            success: true
                            word: 's '
                          - endS: 33.44077
                            palign: 0
                            startS: 33.046
                            success: true
                            word: |+
                              here

                          - endS: 33.666
                            palign: 0
                            startS: 33.45954
                            success: true
                            word: |-
                              [Outro]
                              Good 
                          - endS: 35.00886
                            palign: 0
                            startS: 33.80814
                            success: true
                            word: 'morning, '
                          - endS: 36.003
                            palign: 0
                            startS: 35.12171
                            success: true
                            word: coffee—
                          - endS: 37.222
                            palign: 0
                            startS: 36.064
                            success: true
                            word: 'cheers '
                          - endS: 38.233
                            palign: 0
                            startS: 37.33
                            success: true
                            word: 'to '
                          - endS: 38.633
                            palign: 0
                            startS: 38.283
                            success: true
                            word: |+
                              today!

                        hootCer: 0.13354037267080746
                        isStreamed: false
                        waveformData:
                          - 0.03921
                          - 0.042
                          - 0.14231
                          - 0.07978
                          - 0.1271
                          - 0.1338
                          - 0.1161
                          - 0.07379
                          - 0.14826
                          - 0.11464
                          - 0.10707
                          - 0.12289
                          - 0.12867
                          - 0.11005
                          - 0.15521
                          - 0.14257
                          - 0.08681
                          - 0.13299
                          - 0.10376
                          - 0.0655
                          - 0.17031
                          - 0.13765
                          - 0.09706
                          - 0.13877
                          - 0.1445
                          - 0.10997
                          - 0.16552
                          - 0.06776
                          - 0.14401
                          - 0.05294
                          - 0.09462
                          - 0.03653
                          - 0.13162
                          - 0.06203
                          - 0.03195
                          - 0.07127
                          - 0.05616
                          - 0.07417
                          - 0.17361
                          - 0.10552
                          - 0.07141
                          - 0.15769
                          - 0.12946
                          - 0.0318
                          - 0.16121
                          - 0.09698
                          - 0.07977
                          - 0.15267
                          - 0.11826
                          - 0.08754
                          - 0.13318
                          - 0.16784
                          - 0.12225
                          - 0.1582
                          - 0.16358
                          - 0.11264
                          - 0.14274
                          - 0.10626
                          - 0.1646
                          - 0.12499
                          - 0.10507
                          - 0.16573
                          - 0.10775
                          - 0.09432
                          - 0.14843
                          - 0.12468
                          - 0.11594
                          - 0.15176
                          - 0.09407
                          - 0.09275
                          - 0.16788
                          - 0.1229
                          - 0.08759
                          - 0.15516
                          - 0.06744
                          - 0.18092
                          - 0.15881
                          - 0.12822
                          - 0.14747
                          - 0.15771
                          - 0.12355
                          - 0.15528
                          - 0.15759
                          - 0.10866
                          - 0.16633
                          - 0.15793
                          - 0.11238
                          - 0.07244
                          - 0.12049
                          - 0.09743
                          - 0.04789
                          - 0.14094
                          - 0.09711
                          - 0.05894
                          - 0.13504
                          - 0.17007
                          - 0.13561
                          - 0.17944
                          - 0.15072
                          - 0.11431
                          - 0.16237
                          - 0.13407
                          - 0.0375
                          - 0.1863
                          - 0.17109
                          - 0.12549
                          - 0.20227
                          - 0.18268
                          - 0.14493
                          - 0.13877
                          - 0.0408
                          - 0.00572
                          - 0.0424
                          - 0.03635
                          - 0.02827
                          - 0.04178
                          - 0.16115
                          - 0.12979
                          - 0.18068
                          - 0.12722
                          - 0.09202
                          - 0.21949
                          - 0.16684
                          - 0.10537
                          - 0.14156
                          - 0.11702
                          - 0.17286
                          - 0.17384
                          - 0.12236
                          - 0.18403
                          - 0.13038
                          - 0.15996
                          - 0.1914
                          - 0.12345
                          - 0.17428
                          - 0.14387
                          - 0.10668
                          - 0.16412
                          - 0.17227
                          - 0.16836
                          - 0.13185
                          - 0.21113
                          - 0.12514
                          - 0.18471
                          - 0.18463
                          - 0.13519
                          - 0.1178
                          - 0.16417
                          - 0.15503
                          - 0.17738
                          - 0.17046
                          - 0.14984
                          - 0.13764
                          - 0.19865
                          - 0.11756
                          - 0.17746
                          - 0.1853
                          - 0.06969
                          - 0.18937
                          - 0.1536
                          - 0.08994
                          - 0.1702
                          - 0.14348
                          - 0.1231
                          - 0.08852
                          - 0.11792
                          - 0.1172
                          - 0.15881
                          - 0.19988
                          - 0.16097
                          - 0.11771
                          - 0.16529
                          - 0.14008
                          - 0.08217
                          - 0.19893
                          - 0.16976
                          - 0.10817
                          - 0.19101
                          - 0.16041
                          - 0.06946
                          - 0.21022
                          - 0.15399
                          - 0.13147
                          - 0.12156
                          - 0.11861
                          - 0.04905
                          - 0.21561
                          - 0.12779
                          - 0.06127
                          - 0.09679
                          - 0.10473
                          - 0.13224
                          - 0.17145
                          - 0.12297
                          - 0.09158
                          - 0.08816
                          - 0.13668
                          - 0.15981
                          - 0.19648
                          - 0.19476
                          - 0.15573
                          - 0.18581
                          - 0.05853
                          - 0.01248
                          - 0.00419
                      msg: success
                    msg: success
                参数错误（422）:
                  description: 参数不合法，不建任务、不扣费。
                  summary: 参数错误（422）
                  value:
                    code: 422
                    msg: input.audio_id is required.
                    data: null
                源任务不可用（422）:
                  description: '`task_id` 不存在、不属于当前账号或不满足 `msg` 中的条件；不建任务、不扣费。'
                  summary: 源任务不可用（422）
                  value:
                    code: 422
                    msg: >-
                      input.task_id must be a succeeded task of this account
                      created in the last 14 days.
                    data: null
                未授权（401）:
                  description: API Key 缺失或无效。
                  summary: 未授权（401）
                  value:
                    code: 401
                    msg: >-
                      Unauthorized - Authentication credentials are missing or
                      invalid
                    data: null
                余额不足（402）:
                  description: 余额不足以支付本次任务。
                  summary: 余额不足（402）
                  value:
                    code: 402
                    msg: >-
                      Insufficient Credits - Account does not have enough
                      credits to perform the operation
                    data: null
                请求过于频繁（429）:
                  description: 超过频率限制，请稍后重试。
                  summary: 请求过于频繁（429）
                  value:
                    code: 429
                    msg: >-
                      Rate Limited - Request limit has been exceeded for this
                      resource
                    data: null
                服务器错误（500）:
                  description: 服务暂时不可用，可稍后重试，不扣费。
                  summary: 服务器错误（500）
                  value:
                    code: 500
                    msg: >-
                      Server Error - An unexpected error occurred while
                      processing the request
                    data: null
              schema:
                $ref: '#/components/schemas/SunoSyncCreateResponse'
          description: >-
            HTTP 状态码始终为 200。`code` 为 `200` 时创建成功，`data.taskId` 为任务 ID；其他 `code`
            为错误，`msg` 为原因，`data` 为 `null`。
          headers:
            X-Request-Id:
              description: 本次请求的 ID，排查问题时请提供。
              schema:
                type: string
components:
  schemas:
    SunoCreateTaskRequestSunoTimestampedLyricsInput:
      additionalProperties: false
      description: 创建任务的请求体。
      properties:
        model:
          default: ai-music-api/timeStamped-lyrics
          description: |-
            接口名称，决定 `input` 的字段。

            **可选值：**
            - `ai-music-api/timeStamped-lyrics`：Suno 获取带时间戳的歌词
          enum:
            - ai-music-api/timeStamped-lyrics
          type: string
        callBackUrl:
          description: >-
            可选，任务完成（成功或失败）后接收回调的地址，须为公网可访问的 `http` / `https`
            地址；推荐生产环境使用，也可以只轮询查询任务接口。回调格式和签名见“任务完成回调”。
          type: string
        input:
          $ref: '#/components/schemas/SunoTimestampedLyricsInput'
          description: 任务参数，字段由 `model` 决定。
      required:
        - model
        - input
      type: object
    SunoSyncCreateResponse:
      additionalProperties: false
      description: 同步接口创建任务的响应，`data` 即为结果。HTTP 状态码始终为 200。
      properties:
        code:
          description: |-
            结果代码：
            - `200`：成功
            - `401`：API Key 缺失或无效
            - `402`：余额不足
            - `404`：模型不存在或未开通
            - `405`：请求方法错误
            - `422`：参数错误，`msg` 为原因，不建任务、不扣费
            - `429`：请求过于频繁，请稍后重试
            - `455`：服务维护中
            - `500`：服务器错误，可稍后重试
            - `501`：生成失败
            - `505`：功能已停用
          format: int64
          type: integer
        msg:
          description: 结果说明：成功时为 `success`，错误时为英文原因。
          type: string
        data:
          $ref: '#/components/schemas/SunoTimestampedLyricsResult'
          description: 成功时为本次结果；错误时为 `null`。
      required:
        - code
        - msg
        - data
      type: object
    SunoTimestampedLyricsInput:
      additionalProperties: false
      description: '`ai-music-api/timeStamped-lyrics` 的参数。'
      properties:
        task_id:
          description: >-
            必填，源任务 ID：本账号在 DreamTo 上 14 天内成功的 Suno 任务（createTask 返回的
            `data.taskId`）。任务不存在、不属于当前账号、未成功、超过 14 天或不是可用的源任务类型时返回 `code:
            422`，不建任务、不扣费。须为生成音乐类任务（生成、续写、上传翻唱 / 续写、加人声、加伴奏、替换片段、混搭、音效）。
          type: string
        audio_id:
          description: 必填，源任务中一首音频的 ID，即查询结果 `response.data[].id`。
          type: string
      required:
        - task_id
        - audio_id
      type: object
    SunoTimestampedLyricsResult:
      additionalProperties: false
      description: 带时间戳的歌词结果。
      properties:
        code:
          description: 结果状态码，`200` 表示成功。
          format: int64
          type: integer
        msg:
          description: 结果信息，成功时为 `success`。
          type: string
        data:
          $ref: '#/components/schemas/SunoTimestampedLyricsData'
          description: 对齐后的歌词与波形数据。
      required:
        - code
        - msg
        - data
      type: object
    SunoTimestampedLyricsData:
      additionalProperties: false
      description: 对齐后的歌词与波形数据。
      properties:
        alignedWords:
          description: 按时间顺序排列的歌词片段（词或词组）及其时间戳；纯音乐没有歌词数据。
          items:
            $ref: '#/components/schemas/SunoTimestampedLyricsWord'
          type: array
        waveformData:
          description: 波形数据（振幅序列），用于音频可视化。
          items:
            format: double
            type: number
          type: array
        hootCer:
          description: 歌词对齐准确度评分。
          format: double
          type: number
        isStreamed:
          description: 是否为流式音频。
          type: boolean
      required:
        - alignedWords
        - waveformData
        - hootCer
        - isStreamed
      type: object
    SunoTimestampedLyricsWord:
      additionalProperties: false
      description: 一个对齐的歌词片段。
      properties:
        word:
          description: 歌词词或词组，保留段落标记（如 `[Verse]`）与换行符。
          type: string
        success:
          description: 该片段是否对齐成功。
          type: boolean
        startS:
          description: 开始时间（秒）。
          format: double
          type: number
        endS:
          description: 结束时间（秒）。
          format: double
          type: number
        palign:
          description: 对齐参数。
          format: int64
          type: integer
      required:
        - word
        - success
        - startS
        - endS
        - palign
      type: object
  securitySchemes:
    bearerAuth:
      description: 'DreamTo 控制台创建的 API Key，格式 `Authorization: Bearer <API Key>`。'
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.