@runapi.ai/suno
v0.2.8
Published
RunAPI Suno SDK for text-to-music, cover audio, music extension, stem separation, voice validation phrase, custom voice, and related audio workflows in JavaScript, Python, Ruby, Go, Java, and PHP
Downloads
320
Maintainers
Readme
Suno API JavaScript SDK for RunAPI
The Suno JavaScript SDK is the language-specific package for Suno on RunAPI. Use this package for song generation, lyrics, vocals, extension, and audio transformation workflows when your application needs request bodies, task status lookup, and consistent RunAPI errors in JavaScript.
This README is the JavaScript package guide inside the public suno-sdk repository. For the repository overview, start at ../README.md; for model details, use https://runapi.ai/models/suno; for API reference, use https://runapi.ai/docs#suno; for SDK docs, use https://runapi.ai/docs#sdk-suno.
Install
npm install @runapi.ai/sunoQuick start
import { SunoClient } from '@runapi.ai/suno';
const client = new SunoClient();
const task = await client.textToMusic.create({
// Pass the Suno JSON request body from https://runapi.ai/docs#suno.
});
const status = await client.textToMusic.get(task.id);Use create when you want to submit a task and return quickly, get when you need the latest task state, and run when a script should create and poll until completion. In web request handlers, prefer create plus webhook or later get polling so a worker is not held open.
RunAPI-generated file URLs are temporary. Download and store generated images, videos, audio, or other files in your own durable storage within 7 days; do not treat returned URLs as long-term assets.
Language notes
Use the TypeScript types in src/types.ts and the resource classes under src/resources when building music applications. The available resources are textToMusic, extendMusic, generateArtwork, coverAudio, addInstrumental, addVocals, separateAudioStems, generateMidi, convertAudio, visualizeMusic, generateLyrics, getTimestampedLyrics, replaceSection, createMashup, textToSound, generatePersona, boostStyle, voiceToValidationPhrase, regenerateValidationPhrase, generateVoice, and checkVoice. Keep RUNAPI_API_KEY in the environment or your secret manager; never commit API keys or callback secrets.
Links
- Model page: https://runapi.ai/models/suno
- SDK docs: https://runapi.ai/docs#sdk-suno
- Product docs: https://runapi.ai/docs#suno
- Pricing and rate limits: https://runapi.ai/models/suno/v4
- Provider comparison: https://runapi.ai/providers/suno
- Full catalog: https://runapi.ai/models
- Repository: https://github.com/runapi-ai/suno-sdk
License
Licensed under the Apache License, Version 2.0.
