Suno Ottieni testi con timestamp
Usa l'endpoint get timestamped lyrics per ricevere un risultato nella stessa risposta.
Panoramica
Usa l'endpoint get timestamped lyrics e leggi il risultato dalla stessa risposta.
Avvio rapido
- Crea una Chiave API e impostala come RUNAPI_API_KEY.
- Invia una richiesta POST il cui corpo corrisponde allo schema della richiesta.
- Leggi il risultato dal corpo della risposta positiva.
Endpoint
- URL di base
https://runapi.ai- Versione API
v1- Autenticazione
Authorization: Bearer YOUR_API_TOKEN
Modelli supportati
Apri la pagina di un modello per i prezzi correnti, i limiti di frequenza e i dettagli sull'uso commerciale.
Schema della richiesta
Invia solo i campi dichiarati per questo endpoint.
Corpo della richiesta2 campi
audio_idstringID audio all'interno del task sorgente.
task_idstringID task sorgente.
Risposta di successo
POST /api/v1/suno/get_timestamped_lyrics
Schema della risposta
{
"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
}
Esempio di risposta
{
"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
]
}
Errori
POST /api/v1/suno/get_timestamped_lyrics
Schema della risposta
{
"properties": {
"error": {
"description": "Messaggio di errore leggibile.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Esempio di risposta
{
"error": "Authentication required"
}
Errori
POST /api/v1/suno/get_timestamped_lyrics
Schema della risposta
{
"oneOf": [
{
"properties": {
"error": {
"description": "Messaggio di errore leggibile.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
},
{
"properties": {
"error": {
"description": "Riepilogo di convalida leggibile dall'utente.",
"type": "string"
},
"errors": {
"additionalProperties": {
"items": {
"type": "string"
},
"type": "array"
},
"description": "Messaggi di convalida con chiave per campo della richiesta pubblica, con un array di stringhe leggibili dall'utente per ogni campo.",
"type": "object"
}
},
"required": [
"error",
"errors"
],
"type": "object",
"unevaluatedProperties": false
}
]
}
Esempio di risposta
{
"error": "Validation failed",
"errors": {
"task_id": [
"is required"
]
}
}
Errori
POST /api/v1/suno/get_timestamped_lyrics
Schema della risposta
{
"properties": {
"error": {
"description": "Messaggio di errore leggibile.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Esempio di risposta
{
"error": "Insufficient balance"
}
Errori
POST /api/v1/suno/get_timestamped_lyrics
Schema della risposta
{
"properties": {
"error": {
"description": "Messaggio di errore leggibile.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Esempio di risposta
{
"error": "API key credit limit exceeded"
}
Errori
POST /api/v1/suno/get_timestamped_lyrics
Schema della risposta
{
"properties": {
"error": {
"description": "Messaggio di errore leggibile.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Esempio di risposta
{
"error": "The request uses features that are not supported for the selected model"
}
Errori
POST /api/v1/suno/get_timestamped_lyrics
Schema della risposta
{
"properties": {
"error": {
"description": "Messaggio di errore leggibile.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Esempio di risposta
{
"error": "Rate limit reached. Please retry later."
}
Errori
POST /api/v1/suno/get_timestamped_lyrics
Schema della risposta
{
"properties": {
"error": {
"description": "Messaggio di errore leggibile.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Esempio di risposta
{
"error": "Service under maintenance, please try again later"
}
Errori
POST /api/v1/suno/get_timestamped_lyrics
Schema della risposta
{
"properties": {
"error": {
"description": "Messaggio di errore leggibile.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Esempio di risposta
{
"error": "The request timed out"
}
Esempi di Codice Generati
Usa cURL direttamente, oppure installa un SDK per il tuo linguaggio. Ogni esempio invia la richiesta validata mostrata in questo riferimento.
Installa
pip install runapi-suno
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"
)