---
title: Suno 獲取帶時間戳的歌詞 | RunAPI
description: 使用獲取帶時間戳歌詞端點，在同一回應中接收結果。
url: https://runapi.ai/zh-HK/docs/api/suno/get-timestamped-lyrics.md
canonical: https://runapi.ai/zh-HK/docs/api/suno/get-timestamped-lyrics
locale: zh-HK
---

> HTML 版本: https://runapi.ai/zh-HK/docs/api/suno/get-timestamped-lyrics
> 智能代理網站索引: https://runapi.ai/llms.txt

# Suno 獲取帶時間戳的歌詞

## 概覽

使用獲取帶時間戳歌詞端點，並從同一回應中讀取結果。

### 快速入門

1. 建立 API 金鑰並將其設定為 RUNAPI_API_KEY。
2. 傳送主體符合請求 Schema 的 POST 請求。
3. 從成功的回應主體中讀取結果。

## 端點

POST /api/v1/suno/get_timestamped_lyrics

基礎 URL: https://runapi.ai

API 版本: v1

身份驗證: Authorization: Bearer YOUR_API_TOKEN

## 支援的模型

開啟模型頁面以查看當前定價、速率限制及商業用途詳情。

- [Suno](https://runapi.ai/zh-HK/models/suno)

## 請求結構

僅傳送此端點宣告的欄位。

### 請求主體

```json
{
  "audio_id": {
    "description": "來源任務中的音頻 ID。",
    "required": true,
    "type": "string"
  },
  "task_id": {
    "description": "來源任務 ID。",
    "required": true,
    "type": "string"
  }
}
```

## 成功回應

HTTP 200 - POST /api/v1/suno/get_timestamped_lyrics

### 回應結構

```json
{
  "properties": {
    "aligned_words": {
      "items": {
        "properties": {
          "end_time": {
            "type": "number"
          },
          "palign": {
            "type": "number"
          },
          "start_time": {
            "type": "number"
          },
          "success": {
            "type": "boolean"
          },
          "word": {
            "type": "string"
          }
        },
        "required": [
          "word",
          "success",
          "start_time",
          "end_time",
          "palign"
        ],
        "type": "object",
        "unevaluatedProperties": false
      },
      "type": "array"
    },
    "billing": {
      "properties": {
        "refund": {
          "oneOf": [
            {
              "properties": {
                "refunded_at": {
                  "type": "string"
                }
              },
              "required": [
                "refunded_at"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "reservation": {
          "oneOf": [
            {
              "properties": {
                "amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "amount_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        },
        "settlement": {
          "oneOf": [
            {
              "properties": {
                "amount_micro_cents": {
                  "type": "integer"
                },
                "charged_amount_cents": {
                  "type": "integer"
                }
              },
              "required": [
                "charged_amount_cents",
                "amount_micro_cents"
              ],
              "type": "object",
              "unevaluatedProperties": false
            },
            {
              "enum": [
                null
              ]
            }
          ]
        }
      },
      "required": [
        "reservation",
        "settlement",
        "refund"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "hoot_cer": {
      "type": "number"
    },
    "is_streamed": {
      "type": "boolean"
    },
    "waveform_data": {
      "items": {
        "type": "number"
      },
      "type": "array"
    }
  },
  "required": [
    "aligned_words",
    "waveform_data",
    "hoot_cer",
    "is_streamed",
    "billing"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 回應範例

```json
{
  "aligned_words": [
    {
      "end_time": 0.6,
      "palign": 0.98,
      "start_time": 0.0,
      "success": true,
      "word": "Welcome"
    }
  ],
  "billing": {
    "refund": null,
    "reservation": null,
    "settlement": null
  },
  "hoot_cer": 0.03,
  "is_streamed": false,
  "waveform_data": [
    0.1,
    0.4,
    0.2
  ]
}
```

## 錯誤

HTTP 401 - POST /api/v1/suno/get_timestamped_lyrics

### 回應結構

```json
{
  "properties": {
    "error": {
      "description": "人類可讀的錯誤訊息。",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 回應範例

```json
{
  "error": "Authentication required"
}
```

## 錯誤

HTTP 400 - POST /api/v1/suno/get_timestamped_lyrics

### 回應結構

```json
{
  "oneOf": [
    {
      "properties": {
        "error": {
          "description": "人類可讀的錯誤訊息。",
          "type": "string"
        }
      },
      "required": [
        "error"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    {
      "properties": {
        "error": {
          "description": "人類可讀的驗證摘要。",
          "type": "string"
        },
        "errors": {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": "以公開請求欄位為鍵的驗證訊息，每個欄位對應一組人類可讀的字串陣列。",
          "type": "object"
        }
      },
      "required": [
        "error",
        "errors"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  ]
}
```

### 回應範例

```json
{
  "error": "Validation failed",
  "errors": {
    "task_id": [
      "is required"
    ]
  }
}
```

## 錯誤

HTTP 402 - POST /api/v1/suno/get_timestamped_lyrics

### 回應結構

```json
{
  "properties": {
    "error": {
      "description": "人類可讀的錯誤訊息。",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 回應範例

```json
{
  "error": "Insufficient balance"
}
```

## 錯誤

HTTP 429 - POST /api/v1/suno/get_timestamped_lyrics

### 回應結構

```json
{
  "properties": {
    "error": {
      "description": "人類可讀的錯誤訊息。",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 回應範例

```json
{
  "error": "API key credit limit exceeded"
}
```

## 錯誤

HTTP 409 - POST /api/v1/suno/get_timestamped_lyrics

### 回應結構

```json
{
  "properties": {
    "error": {
      "description": "人類可讀的錯誤訊息。",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 回應範例

```json
{
  "error": "The request uses features that are not supported for the selected model"
}
```

## 錯誤

HTTP 429 - POST /api/v1/suno/get_timestamped_lyrics

### 回應結構

```json
{
  "properties": {
    "error": {
      "description": "人類可讀的錯誤訊息。",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 回應範例

```json
{
  "error": "Rate limit reached. Please retry later."
}
```

## 錯誤

HTTP 503 - POST /api/v1/suno/get_timestamped_lyrics

### 回應結構

```json
{
  "properties": {
    "error": {
      "description": "人類可讀的錯誤訊息。",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 回應範例

```json
{
  "error": "Service under maintenance, please try again later"
}
```

## 錯誤

HTTP 504 - POST /api/v1/suno/get_timestamped_lyrics

### 回應結構

```json
{
  "properties": {
    "error": {
      "description": "人類可讀的錯誤訊息。",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### 回應範例

```json
{
  "error": "The request timed out"
}
```

## 已生成的程式碼範例

直接使用 cURL，或為您的語言安裝 SDK。每個範例均提交本參考中所示的已驗證請求。

### curl

```curl
curl -X POST https://runapi.ai/api/v1/suno/get_timestamped_lyrics \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"task_id":"tsk_source_music","audio_id":"audio_reference"}'
```

### javascript

#### 安裝

```bash
npm install @runapi.ai/suno
```

```javascript
import { SunoClient } from "@runapi.ai/suno";

const client = new SunoClient({ apiKey: process.env.RUNAPI_API_KEY });
const result = await client.getTimestampedLyrics.run({
  "task_id": "tsk_source_music",
  "audio_id": "audio_reference"
});
```

### python

#### 安裝

```bash
pip install runapi-suno
```

```python
import os
from runapi.suno import SunoClient

client = SunoClient(api_key=os.environ["RUNAPI_API_KEY"])
result = client.get_timestamped_lyrics.run(
  task_id="tsk_source_music",
  audio_id="audio_reference"
)
```

### go

#### 安裝

```bash
go get github.com/runapi-ai/suno-sdk/go@latest
```

```go
package main

import (
  "context"
  "log"
  "os"

  "github.com/runapi-ai/core-sdk/go/option"
  suno "github.com/runapi-ai/suno-sdk/go/suno"
)

func main() {
  client, err := suno.NewClient(option.WithAPIKey(os.Getenv("RUNAPI_API_KEY")))
  if err != nil {
    log.Fatal(err)
  }

  result, err := client.GetTimestampedLyrics.Run(context.Background(), suno.GetTimestampedLyricsParams{
    TaskID: "tsk_source_music",
    AudioID: "audio_reference",
  })
  if err != nil {
    log.Fatal(err)
  }
  _ = result
}
```

### ruby

#### 安裝

```bash
gem install runapi-suno
```

```ruby
require "runapi/suno"

client = RunApi::Suno::Client.new(api_key: ENV.fetch("RUNAPI_API_KEY"))
result = client.get_timestamped_lyrics.run(
  task_id: "tsk_source_music",
  audio_id: "audio_reference"
)
```

### java

#### 安裝

```kotlin
implementation("ai.runapi:runapi-suno")
```

```java
import ai.runapi.suno.SunoClient;
import ai.runapi.suno.types.GetTimestampedLyricsParams;
import ai.runapi.suno.types.GetTimestampedLyricsResponse;

public final class Example {
  public static void main(String[] args) {
    SunoClient client = SunoClient.builder()
        .apiKey(System.getenv("RUNAPI_API_KEY"))
        .build();
    GetTimestampedLyricsResponse result = client.getTimestampedLyrics().run(
        GetTimestampedLyricsParams.builder()
        .taskId("tsk_source_music")
        .audioId("audio_reference")
            .build()
    );
  }
}
```

### php

#### 安裝

```bash
composer require runapi-ai/suno
```

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use RunApi\Core\ClientOptions;
use RunApi\Suno\SunoClient;

$client = new SunoClient(new ClientOptions(apiKey: getenv('RUNAPI_API_KEY')));
$result = $client->getTimestampedLyrics->run([
  "task_id" => "tsk_source_music",
  "audio_id" => "audio_reference"
]);
```

## 相關指南

- [身份驗證](https://runapi.ai/zh-HK/docs/guides/authentication.md)
- [快速入門](https://runapi.ai/zh-HK/docs/guides/task-api/quickstart.md)

---

## RunAPI 的更多內容

- [首頁](https://runapi.ai/zh-HK/.md)
- [模型目錄](https://runapi.ai/zh-HK/models.md)
- [收費](https://runapi.ai/zh-HK/pricing.md)
- [服務商](https://runapi.ai/zh-HK/models)
- [文件](https://runapi.ai/zh-HK/docs/guides)
- [SDK](https://runapi.ai/zh-HK/sdk.md)
- [CLI](https://runapi.ai/zh-HK/cli.md)
- [MCP Server](https://runapi.ai/zh-HK/mcp.md)
- [Claude Code 與 Cursor](https://runapi.ai/zh-HK/claude-code-vs-cursor.md)
- [Cursor API 設定](https://runapi.ai/zh-HK/cursor-api-setup.md)
- [RunAPI 與 OpenRouter](https://runapi.ai/zh-HK/openrouter-alternative.md)
- [企業版](https://runapi.ai/zh-HK/contact.md)
- [聯絡](https://runapi.ai/zh-HK/contact.md)
- [條款](https://runapi.ai/zh-HK/terms.md)
- [私隱](https://runapi.ai/zh-HK/privacy.md)
- [智能代理網站索引](https://runapi.ai/llms.txt)

聯絡我們: contact@runapi.ai

## 結構化資料

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-HK",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-HK",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/zh-HK/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-HK",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-HK",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/zh-HKicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-HK",
    "@type": "TechArticle",
    "headline": "Suno 獲取帶時間戳的歌詞",
    "description": "使用獲取帶時間戳歌詞端點，在同一回應中接收結果。",
    "url": "https://runapi.ai/zh-HK/docs/api/suno/get-timestamped-lyrics",
    "mainEntityOfPage": "https://runapi.ai/zh-HK/docs/api/suno/get-timestamped-lyrics"
  }
]
```
