Suno persona's
Create a reusable persona from a track's reference vocals.
Overzicht
Gebruik het personas-eindpunt en lees het resultaat uit hetzelfde antwoord.
Snelstart
- Maak een API-sleutel aan en stel deze in als RUNAPI_API_KEY.
- Stuur een POST-verzoek waarvan de body overeenkomt met het verzoekschema.
- Lees het resultaat uit de body van de geslaagde respons.
Eindpunt
- Basis-URL
https://runapi.ai- API-versie
v1- Authenticatie
Authorization: Bearer YOUR_API_TOKEN
Ondersteunde modellen
Open een modelpagina voor actuele prijzen, snelheidslimieten en details over commercieel gebruik.
Verzoekschema
Stuur alleen de velden die voor dit eindpunt zijn gedeclareerd.
Verzoekbody4 velden
descriptionstringBeschrijving van de persona.
namestringNaam van de persona.
source_audio_idstringAudio-ID binnen de bron-Task die de referentievocalen bevat.
source_task_idstringRunAPI Task-ID die de referentieaudio heeft geproduceerd.
Succesvol antwoord
POST /api/v1/personas
Responsschema
{
"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
},
"persona": {
"properties": {
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name",
"description"
],
"type": "object",
"unevaluatedProperties": false
}
},
"required": [
"persona",
"billing"
],
"type": "object",
"unevaluatedProperties": false
}
Responsvoorbeeld
{
"billing": {
"refund": null,
"reservation": null,
"settlement": null
},
"persona": {
"description": "A warm and expressive vocal character.",
"id": "persona_reference",
"name": "Studio Voice"
}
}
Fouten
POST /api/v1/personas
Responsschema
{
"properties": {
"error": {
"description": "Leesbare foutmelding.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Responsvoorbeeld
{
"error": "Authentication required"
}
Fouten
POST /api/v1/personas
Responsschema
{
"oneOf": [
{
"properties": {
"error": {
"description": "Leesbare foutmelding.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
},
{
"properties": {
"error": {
"description": "Leesbare validatiesamenvatting.",
"type": "string"
},
"errors": {
"additionalProperties": {
"items": {
"type": "string"
},
"type": "array"
},
"description": "Validatieberichten gekoppeld aan het openbare aanvraagveld, met een reeks leesbare tekenreeksen per veld.",
"type": "object"
}
},
"required": [
"error",
"errors"
],
"type": "object",
"unevaluatedProperties": false
}
]
}
Responsvoorbeeld
{
"error": "Validation failed",
"errors": {
"source_task_id": [
"is required"
]
}
}
Fouten
POST /api/v1/personas
Responsschema
{
"properties": {
"error": {
"description": "Leesbare foutmelding.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Responsvoorbeeld
{
"error": "Insufficient balance"
}
Fouten
POST /api/v1/personas
Responsschema
{
"properties": {
"error": {
"description": "Leesbare foutmelding.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Responsvoorbeeld
{
"error": "API key credit limit exceeded"
}
Fouten
POST /api/v1/personas
Responsschema
{
"properties": {
"error": {
"description": "Leesbare foutmelding.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Responsvoorbeeld
{
"error": "The request uses features that are not supported for the selected model"
}
Fouten
POST /api/v1/personas
Responsschema
{
"properties": {
"error": {
"description": "Leesbare foutmelding.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Responsvoorbeeld
{
"error": "Rate limit reached. Please retry later."
}
Fouten
POST /api/v1/personas
Responsschema
{
"properties": {
"error": {
"description": "Leesbare foutmelding.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Responsvoorbeeld
{
"error": "Service under maintenance, please try again later"
}
Fouten
POST /api/v1/personas
Responsschema
{
"properties": {
"error": {
"description": "Leesbare foutmelding.",
"type": "string"
}
},
"required": [
"error"
],
"type": "object",
"unevaluatedProperties": false
}
Responsvoorbeeld
{
"error": "The request timed out"
}
Gegenereerde codevoorbeelden
Gebruik cURL rechtstreeks, of installeer een SDK voor uw taal. Elk voorbeeld dient het gevalideerde verzoek in dat in deze referentie wordt getoond.
Installeren
pip install runapi-suno
import os
from runapi.suno import SunoClient
client = SunoClient(api_key=os.environ["RUNAPI_API_KEY"])
result = client.personas.run(
source_task_id="tsk_source_music",
source_audio_id="audio_reference",
name="Studio Voice",
description="A warm and expressive vocal character."
)