コンテンツへスキップ
APIリファレンス
APIリファレンス

Suno タイムスタンプ付き歌詞取得

get timestamped lyricsエンドポイントを使用して、同じレスポンスで結果を受け取ってください。

01

概要

get timestamped lyricsエンドポイントを使用し、同じレスポンスから結果を読み取ってください。

クイックスタート

  1. APIキーを作成し、RUNAPI_API_KEYとして設定します。
  2. 本文がリクエストスキーマと一致するPOSTリクエストを送信します。
  3. 成功レスポンスのボディから結果を読み取る。

エンドポイント

POST /api/v1/suno/get_timestamped_lyrics
ベースURL
https://runapi.ai
API バージョン
v1
認証
Authorization: Bearer YOUR_API_TOKEN
02

サポートされているモデル

現在の料金、レート制限、商用利用の詳細については、モデルページを開いてください。

03

リクエストスキーマ

JSONボディ

このエンドポイントで宣言されたフィールドのみを送信してください。

リクエストボディフィールド2件
audio_idstring
必須

ソースタスク内のオーディオ ID。

task_idstring
必須

ソースタスクID。

04

成功レスポンス

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
  ]
}
05

エラー

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"
}
06

エラー

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"
    ]
  }
}
07

エラー

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"
}
08

エラー

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"
}
09

エラー

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"
}
10

エラー

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."
}
11

エラー

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"
}
12

エラー

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"
}
13

生成されたコードサンプル

cURLを直接使用するか、お使いの言語向けのSDKをインストールしてください。各サンプルは、このリファレンスに示されたバリデーション済みリクエストを送信します。

インストール

Shell
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"
)