Picsart API Platform

Guides

Audio generation

20 audio models cover text-to-speech, music, and sound effects. Each returns an audio URL on result.url.

These snippets reuse an ai client — see Quickstart for the createClient setup.

Standard parameters

The parameters most audio models share. Exact params vary per model — each model page lists its full schema.

ParameterTypeDescription
promptrequiredstringText description of what to generate.
voiceIdstringVoice to speak with (see the model page for options).
durationnumberLength in seconds.

Text to speech

Pass the text as prompt. Many voice models accept a voiceId to choose the speaker — the available voices are listed on each model page.

ts
const speech = await ai.generate('eleven-v3', {
  prompt: 'Welcome to Picsart AI — let us build something amazing.',
  // Optional: pick a voice with voiceId (see the model page for options).
});

console.log(speech.url); // audio URL

Music

Describe the track and set a duration in seconds.

ts
const track = await ai.generate('elevenlabs-music-v2', {
  prompt: 'Upbeat lo-fi hip hop with a warm vinyl texture',
  duration: 30,
});

console.log(track.url);