Guides
Audio generation
20 audio models cover text-to-speech, music, and sound effects. Each returns an audio URL on result.url.
Standard parameters
The parameters most audio models share. Exact params vary per model — each model page lists its full schema.
| Parameter | Type | Description |
|---|---|---|
promptrequired | string | Text description of what to generate. |
voiceId | string | Voice to speak with (see the model page for options). |
duration | number | Length 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 URLMusic
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);