PopNowDocs de la API
Contenido principal

Referencia de la API de Suno v6

Canciones completas con voz a partir de tu letra o una breve idea

Con una sola clave de API de PopNow puedes llamar a Suno v6 desde tu propio código. Aquí tienes los ID de modelo que debes enviar, cada campo de entrada que acepta, cuántos créditos cuesta cada solicitud y una petición que puedes pegar tal cual en la terminal.

Las descripciones de los parámetros vienen del esquema de entrada del modelo y solo están en inglés.

De un vistazo

Creado por
Suno
Resultado
Audio
Desde
10.8 créditos por solicitud ($0.108)
Tiempo habitual
unos 48 s

1 crédito = 0,01 US$. Al aceptarse, la tarea retiene el cargo máximo posible y al terminar cobra el uso real, redondeado al crédito superior; el resto se libera. Las tareas fallidas no se cobran. Para saber la cifra exacta antes de ejecutar, llama a POST /api/v1/jobs/quote.

Música

suno/v6/text-to-audio

Precio

OpciónCréditos (por solicitud)Dólares
Predeterminado10.8$0.108

Parámetros

CampoTipoValor predeterminadoValores admitidosPara qué sirve
promptObligatoriostring—hasta 3000 caracteresDescribe the song: genre, mood, tempo, instruments and voice. With lyrics or an instrumental this is the style (up to 1,000 characters); with no lyrics the model writes the words from it.
lyricsOpcionalstring—hasta 5000 caracteresWords to sing, sung in order. Section tags such as [Verse], [Chorus] and [Bridge] shape the song and are not sung.
generate_lyricsOpcionalbooleantrue—Let the model write the lyrics from the prompt. Only applies when lyrics is empty and instrumental is off.
instrumentalOpcionalbooleanfalse—Generate music with no vocals.
titleOpcionalstring—hasta 80 caracteresSong title (metadata, not sung). Applies with lyrics or an instrumental; otherwise the model names the song.
negative_promptOpcionalstring—hasta 500 caracteresStyles or elements to keep out of the song.
vocal_genderOpcionalstring—female, maleMake a female or male lead vocal more likely. Applies with lyrics.
style_weightOpcionalnumber—de 0 a 1How closely to follow the style in the prompt, from 0 to 1.
weirdnessOpcionalnumber—de 0 a 1How experimental the song may get, from 0 (conventional) to 1 (unusual).
audio_weightOpcionalnumber—de 0 a 1How strongly a persona's audio shapes the result, from 0 to 1. Songs with vocals only.
varietyOpcionalinteger—de 0 a 4How different the two versions are from each other: 0 off, 1 normal (the model default), 2 high, 3 extra, 4 max.
persona_idOpcionalstring—hasta 200 caracteresID of an existing Suno persona to reuse its style or voice.
persona_modelOpcionalstring—style_persona, voice_personaWhether persona_id is a style persona or a voice persona.
image_urlsOpcionalarray<string (uri)>—hasta 5 elementosUp to 5 mood images (JPEG, PNG or WebP, 10 MB each). Only when the model writes the lyrics.
reference_video_urlsOpcionalarray<string (uri)>—hasta 1 elementosOne reference video (MP4 or WebM, up to 100 MB and 241 seconds). Only when the model writes the lyrics.
reference_audio_urlsOpcionalarray<string (uri)>—hasta 1 elementosOne reference audio clip (MP3 or WAV, 6 seconds to 30 minutes). Only when the model writes the lyrics.

Solicitud de ejemplo

Esta solicitud funciona tal cual; los campos que no envíes usan su valor predeterminado. Antes, guarda tu clave en POPNOW_API_KEY.

POST /api/v1/jobs/createTask
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "suno/v6/text-to-audio",
  "input": {
    "prompt": "An upbeat indie pop song about a summer road trip, bright guitars, hand claps and a catchy whistled hook"
  }
}'

La respuesta trae un taskId al instante. Consulta el resultado con GET /api/v1/jobs/recordInfo o añade callBackUrl para recibir un aviso.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Siguientes pasos

En esta página