Suno Añadir instrumental
Usa el endpoint de adición de instrumental para crear una Task asíncrona.
Descripción general
Usa el endpoint de adición de instrumental con un modelo compatible. Usa el ID de Task devuelto para recuperar su estado, o proporciona callback_url para las entregas documentadas a continuación.
Inicio rápido
- Cree una Clave de API y establézcala como RUNAPI_API_KEY.
- Elija un modelo compatible y envíe una solicitud POST cuyo cuerpo coincida con el esquema de ese modelo.
- Almacena el ID de tarea devuelto, luego sondea hasta alcanzar un estado terminal o gestiona las devoluciones de llamada documentadas a continuación.
Endpoint
- URL base
https://runapi.ai- Versión de la API
v1- Autenticación
Authorization: Bearer YOUR_API_TOKEN
Modelos compatibles
Abra una página de modelo para conocer los precios actuales, los límites de velocidad y los detalles de uso comercial.
Esquema de solicitud
Los campos y los valores permitidos dependen del modelo seleccionado. Cuando se proporciona, callback_url recibe las entregas de tareas documentadas a continuación.
suno-v4.5-plus10 campos
audio_weightnumberPeso del audio (0-1).
Rango:0 - 1
callback_urlstringURL de webhook para notificaciones asíncronas.
modelstringIdentificador del modelo.
negative_tagsstringEstilos a evitar.
style_weightnumberPeso de adherencia al estilo (0-1).
Rango:0 - 1
tagsstringEtiquetas de estilo o género.
Límite:1000
titlestringTítulo de la canción.
Límite:80
upload_urlstringURL del archivo de audio al que añadir instrumentación.
vocal_genderstringGénero vocal.
Valores permitidos:male, female
weirdness_constraintnumberRestricción de rareza (0-1).
Rango:0 - 1
suno-v510 campos
audio_weightnumberPeso del audio (0-1).
Rango:0 - 1
callback_urlstringURL de webhook para notificaciones asíncronas.
modelstringIdentificador del modelo.
negative_tagsstringEstilos a evitar.
style_weightnumberPeso de adherencia al estilo (0-1).
Rango:0 - 1
tagsstringEtiquetas de estilo o género.
Límite:1000
titlestringTítulo de la canción.
Límite:80
upload_urlstringURL del archivo de audio al que añadir instrumentación.
vocal_genderstringGénero vocal.
Valores permitidos:male, female
weirdness_constraintnumberRestricción de rareza (0-1).
Rango:0 - 1
suno-v5.510 campos
audio_weightnumberPeso del audio (0-1).
Rango:0 - 1
callback_urlstringURL de webhook para notificaciones asíncronas.
modelstringIdentificador del modelo.
negative_tagsstringEstilos a evitar.
style_weightnumberPeso de adherencia al estilo (0-1).
Rango:0 - 1
tagsstringEtiquetas de estilo o género.
Límite:1000
titlestringTítulo de la canción.
Límite:80
upload_urlstringURL del archivo de audio al que añadir instrumentación.
vocal_genderstringGénero vocal.
Valores permitidos:male, female
weirdness_constraintnumberRestricción de rareza (0-1).
Rango:0 - 1
Crear aceptación
POST /api/v1/suno/add_instrumental
Esquema de respuesta
{
"properties": {
"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
},
"id": {
"type": "string"
},
"status": {
"enum": [
"processing"
],
"type": "string"
},
"task_replayed": {
"type": "boolean"
}
},
"required": [
"id",
"status",
"billing"
],
"type": "object",
"unevaluatedProperties": false
}
Ejemplo de respuesta
{
"billing": {
"refund": null,
"reservation": null,
"settlement": null
},
"id": "tsk_reference_demo",
"status": "processing"
}
Consulta en proceso
GET /api/v1/suno/add_instrumental/:id
Esquema de respuesta
{
"properties": {
"audios": {
"items": {
"properties": {
"audio_url": {
"type": "string",
"x-runapi-generated-media": true
},
"duration": {
"type": "number"
},
"id": {
"type": "string"
},
"image_url": {
"type": "string",
"x-runapi-generated-media": true
},
"lyrics": {
"type": "string"
},
"model_name": {
"type": "string"
},
"stream_audio_url": {
"type": "string",
"x-runapi-generated-media": true
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"title": {
"type": "string"
}
},
"required": [
"id"
],
"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
},
"generation_stage": {
"enum": [
"text_generated",
"first_audio_ready"
],
"type": "string"
},
"id": {
"type": "string"
},
"status": {
"enum": [
"processing"
],
"type": "string"
}
},
"required": [
"id",
"status",
"billing"
],
"type": "object",
"unevaluatedProperties": false
}
Ejemplo de respuesta
{
"billing": {
"refund": null,
"reservation": null,
"settlement": null
},
"generation_stage": "text_generated",
"id": "tsk_reference_demo",
"status": "processing"
}
Consulta completada
GET /api/v1/suno/add_instrumental/:id
Esquema de respuesta
{
"properties": {
"audios": {
"items": {
"properties": {
"audio_url": {
"type": "string",
"x-runapi-generated-media": true
},
"duration": {
"type": "number"
},
"id": {
"type": "string"
},
"image_url": {
"type": "string",
"x-runapi-generated-media": true
},
"lyrics": {
"type": "string"
},
"model_name": {
"type": "string"
},
"stream_audio_url": {
"type": "string",
"x-runapi-generated-media": true
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"title": {
"type": "string"
}
},
"required": [
"id"
],
"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
},
"generation_stage": {
"enum": [
"text_generated",
"first_audio_ready",
"all_audios_ready",
"failed"
],
"type": "string"
},
"id": {
"type": "string"
},
"status": {
"enum": [
"completed"
],
"type": "string"
}
},
"required": [
"id",
"status",
"audios",
"billing"
],
"type": "object",
"unevaluatedProperties": false
}
Ejemplo de respuesta
{
"audios": [
{
"audio_url": "https://file.runapi.ai/reference-audio.mp3",
"id": "audio_reference"
}
],
"billing": {
"refund": null,
"reservation": null,
"settlement": null
},
"id": "tsk_reference_demo",
"status": "completed"
}
Consulta fallida
GET /api/v1/suno/add_instrumental/:id
Esquema de respuesta
{
"properties": {
"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
},
"error": {
"type": "string"
},
"id": {
"type": "string"
},
"status": {
"enum": [
"failed"
],
"type": "string"
}
},
"required": [
"id",
"status",
"error",
"billing"
],
"type": "object",
"unevaluatedProperties": false
}
Ejemplo de respuesta
{
"billing": {
"refund": null,
"reservation": null,
"settlement": null
},
"error": "Task processing failed.",
"id": "tsk_reference_demo",
"status": "failed"
}
Devolución de llamada del cliente: procesando
POST callback_url
Esquema de respuesta
{
"properties": {
"audios": {
"items": {
"properties": {
"audio_url": {
"type": "string",
"x-runapi-generated-media": true
},
"duration": {
"type": "number"
},
"id": {
"type": "string"
},
"image_url": {
"type": "string",
"x-runapi-generated-media": true
},
"lyrics": {
"type": "string"
},
"model_name": {
"type": "string"
},
"stream_audio_url": {
"type": "string",
"x-runapi-generated-media": true
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"title": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object",
"unevaluatedProperties": false
},
"type": "array"
},
"generation_stage": {
"enum": [
"text_generated",
"first_audio_ready"
],
"type": "string"
},
"id": {
"type": "string"
},
"status": {
"enum": [
"processing"
],
"type": "string"
}
},
"required": [
"id",
"status"
],
"type": "object",
"unevaluatedProperties": false
}
Ejemplo de respuesta
{
"generation_stage": "text_generated",
"id": "tsk_reference_demo",
"status": "processing"
}
Devolución de llamada del cliente: completado
POST callback_url
Esquema de respuesta
{
"properties": {
"audios": {
"items": {
"properties": {
"audio_url": {
"type": "string",
"x-runapi-generated-media": true
},
"duration": {
"type": "number"
},
"id": {
"type": "string"
},
"image_url": {
"type": "string",
"x-runapi-generated-media": true
},
"lyrics": {
"type": "string"
},
"model_name": {
"type": "string"
},
"stream_audio_url": {
"type": "string",
"x-runapi-generated-media": true
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
},
"title": {
"type": "string"
}
},
"required": [
"id"
],
"type": "object",
"unevaluatedProperties": false
},
"type": "array"
},
"generation_stage": {
"enum": [
"text_generated",
"first_audio_ready",
"all_audios_ready",
"failed"
],
"type": "string"
},
"id": {
"type": "string"
},
"status": {
"enum": [
"completed"
],
"type": "string"
}
},
"required": [
"id",
"status",
"audios"
],
"type": "object",
"unevaluatedProperties": false
}
Ejemplo de respuesta
{
"audios": [
{
"audio_url": "https://file.runapi.ai/reference-audio.mp3",
"id": "audio_reference"
}
],
"id": "tsk_reference_demo",
"status": "completed"
}
Devolución de llamada del cliente: fallido
POST callback_url
Esquema de respuesta
{
"properties": {
"error": {
"oneOf": [
{
"type": "string"
},
{
"properties": {
"code": {
"type": "string"
},
"limit_cents": {
"type": "integer"
},
"message": {
"type": "string"
},
"reset_at": {
"format": "date-time",
"type": [
"string",
"null"
]
},
"used_cents": {
"type": "integer"
},
"window": {
"enum": [
"1h",
"1d",
"7d",
"daily",
"weekly",
"monthly",
"lifetime"
],
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object",
"unevaluatedProperties": false
}
]
},
"id": {
"type": "string"
},
"status": {
"enum": [
"failed"
],
"type": "string"
}
},
"required": [
"id",
"status",
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Ejemplo de respuesta
{
"error": {
"code": "generation_failed",
"message": "Task processing failed."
},
"id": "tsk_reference_demo",
"status": "failed"
}
Errores
POST /api/v1/suno/add_instrumental
Esquema de respuesta
{
"properties": {
"error": {
"description": "Mensaje de error legible por personas.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Ejemplo de respuesta
{
"error": "Authentication required"
}
Errores
GET /api/v1/suno/add_instrumental/:id
Esquema de respuesta
{
"properties": {
"error": {
"description": "Mensaje de error legible por personas.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Ejemplo de respuesta
{
"error": "Authentication required"
}
Errores
POST /api/v1/suno/add_instrumental
Esquema de respuesta
{
"oneOf": [
{
"properties": {
"error": {
"description": "Mensaje de error legible por personas.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
},
{
"properties": {
"error": {
"description": "Resumen de validación legible por personas.",
"type": "string"
},
"errors": {
"additionalProperties": {
"items": {
"type": "string"
},
"type": "array"
},
"description": "Mensajes de validación con clave por campo de solicitud público, con un array de cadenas legibles por personas para cada campo.",
"type": "object"
}
},
"required": [
"error",
"errors"
],
"type": "object",
"unevaluatedProperties": false
}
]
}
Ejemplo de respuesta
{
"error": "model must be one of: suno-v4.5-plus, suno-v5, suno-v5.5"
}
Errores
POST /api/v1/suno/add_instrumental
Esquema de respuesta
{
"properties": {
"error": {
"description": "Mensaje de error legible por personas.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Ejemplo de respuesta
{
"error": "Insufficient balance"
}
Errores
POST /api/v1/suno/add_instrumental
Esquema de respuesta
{
"properties": {
"error": {
"description": "Mensaje de error legible por personas.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Ejemplo de respuesta
{
"error": "API key credit limit exceeded"
}
Errores
POST /api/v1/suno/add_instrumental
Esquema de respuesta
{
"properties": {
"error": {
"description": "Mensaje de error legible por personas.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Ejemplo de respuesta
{
"error": "The request uses features that are not supported for the selected model"
}
Errores
POST /api/v1/suno/add_instrumental
Esquema de respuesta
{
"properties": {
"error": {
"description": "Mensaje de error legible por personas.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Ejemplo de respuesta
{
"error": "Rate limit reached. Please retry later."
}
Errores
POST /api/v1/suno/add_instrumental
Esquema de respuesta
{
"properties": {
"error": {
"description": "Mensaje de error legible por personas.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Ejemplo de respuesta
{
"error": "Service under maintenance, please try again later"
}
Errores
POST /api/v1/suno/add_instrumental
Esquema de respuesta
{
"properties": {
"error": {
"description": "Mensaje de error legible por personas.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Ejemplo de respuesta
{
"error": "The request timed out"
}
Errores
GET /api/v1/suno/add_instrumental/:id
Esquema de respuesta
{
"properties": {
"error": {
"description": "Mensaje de error legible por personas.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Ejemplo de respuesta
{
"error": "Task with id 'tsk_reference_demo' not found"
}
Ejemplos de código generados
Usa cURL directamente o instala un SDK para tu lenguaje. Cada muestra envía la solicitud validada que se muestra en esta referencia.
Instalar
pip install runapi-suno
import os
from runapi.suno import SunoClient
client = SunoClient(api_key=os.environ["RUNAPI_API_KEY"])
task = client.add_instrumental.create(
model="suno-v5",
upload_url="https://file.runapi.ai/source-vocals.mp3",
title="City Lights",
tags="acoustic pop",
negative_tags="heavy metal"
)