Tools
create_song
Start an AI song from a description, your own lyrics, a cover of an existing song or a photo. Parameters, examples, credits and safe retries.
create_song starts a song generation and returns right away with a generation id. The finished songs arrive a minute or two later through get_songs. One tool covers every way of creating on the website: describing a song, singing your own lyrics, making an instrumental, covering an existing song in a new style, and turning a photo into music.
Choose a mode
| Mode | Send | MemoTune does |
|---|---|---|
| Description | prompt | Writes the lyrics, picks the style and title, and produces the song. |
| Your lyrics | lyrics, style, title | Sings your lyrics in the style you describe. |
| Instrumental | instrumental: true with either prompt, or style and title | Produces music without vocals. |
| Cover | coverSongId or coverAudioUrl, plus style, title and lyrics (or instrumental: true) | Re-creates an existing song in the new style you describe, keeping its melody. |
| Image | imageUrl, optionally lyrics, instrumental or language | Reads the mood and scene of the photo, then writes and produces a matching song. |
Description mode is the easiest start. Each call uses exactly one mode: prompt must be used alone, a cover needs one source (coverSongId or coverAudioUrl), and image mode can't be combined with a cover.
Parameters
| Parameter | Type | Description |
|---|---|---|
prompt | string, up to 800 characters | Description mode. What the song is about and how it should feel, for example topic, mood, genre and who it is for. |
lyrics | string, up to 5,000 characters | The words to sing. Section tags such as [Verse], [Chorus] and [Bridge] help shape the structure. Required in custom and cover modes unless instrumental is true; optional in image mode. |
style | string, up to 800 characters | Custom and cover modes, required. Genre, mood, tempo, instruments and vocal character, for example acoustic folk, warm, fingerpicked guitar. |
title | string, up to 80 characters | Custom and cover modes, required. The song title. |
coverSongId | string | Cover mode. The id of one of your own ready songs, as returned by get_songs. |
coverAudioUrl | string | Cover mode. A public https:// link to an audio file, such as an MP3, WAV or M4A, hosted outside MemoTune. |
imageUrl | string | Image mode. A public https:// link to a JPEG, PNG or WebP photo up to 10 MB, hosted outside MemoTune. |
language | string, default english | Image mode. Language of the lyrics MemoTune writes, for example english, chinese, japanese, spanish, german or french. |
instrumental | boolean, default false | Make music without vocals. Works in every mode; don't combine it with lyrics. |
vocalGender | male or female | Optional preferred singing voice in description, custom and cover modes. Ignored for instrumentals. |
model | TUNE_V2 (default) or TUNE_V1 | Music model for description, custom and cover modes. TUNE_V2 is the latest. Image mode always uses the default model. |
requestId | string, 1–100 characters | Optional idempotency key. Letters, numbers, ., _, : and -. See Safe retries. |
Examples
Description mode:
{
"prompt": "A cheerful acoustic birthday song for my sister Mia, who loves hiking and terrible puns",
"vocalGender": "female"
}Your lyrics:
{
"lyrics": "[Verse]\nThe porch light's on, the kettle hums\nI kept your chair for when you come\n\n[Chorus]\nSo come on home, the door's not locked\nI never moved, I never stopped",
"style": "slow soul ballad, warm Rhodes piano, brushed drums",
"title": "Porch Light"
}Instrumental with a described sound:
{
"instrumental": true,
"style": "lo-fi hip hop, mellow, vinyl crackle, 80 bpm",
"title": "Late Study Session"
}Cover one of your songs as a jazz instrumental (coverSongId comes from get_songs):
{
"coverSongId": "3b9e7c1a-0f4d-4e2b-8a6c-5d1f9e2a7b40",
"style": "smoky late-night jazz trio, upright bass, brushed drums, piano lead",
"title": "Trail Mix Birthday (Jazz Version)",
"instrumental": true
}Cover an audio file with new lyrics:
{
"coverAudioUrl": "https://example.com/demos/summer-demo.mp3",
"lyrics": "[Verse]\nSalt on the window, sun on the sand\n\n[Chorus]\nStay for the summer, stay for the band",
"style": "upbeat synth-pop, bright female vocals, 118 bpm",
"title": "Stay for the Summer"
}Turn a photo into a song:
{
"imageUrl": "https://example.com/photos/graduation-day.jpg",
"language": "english"
}Result
{
"id": "8f0c2d4e-5b1a-4c3e-9d7f-2a6b1c0e9f31",
"status": "processing",
"creditsCharged": 3,
"next": "Songs usually take 1-3 minutes. Call get_songs with {\"id\": \"8f0c2d4e-...\"} to check progress and get the results."
}| Field | Description |
|---|---|
id | Generation id. Pass it to get_songs. |
status | Always processing when the call succeeds. |
creditsCharged | Credits taken for this call. 0 when a retry returned an existing generation. |
recovered | true when the same requestId and input already started a generation. |
The songs are saved to your account and show up in My Songs. They stay private unless you share or publish them.
Credits
Each call charges the same credits as the matching tool on the website and usually produces two versions. At the time of writing:
| Mode | Credits per call |
|---|---|
| Description, your lyrics, instrumental | 3 |
| Cover | 3 |
| Image | 5 |
get_account always returns the live prices in creditCosts. If a generation fails, the credits are refunded automatically. When your balance is too low, the call fails with a message that includes the price; top up on the Pricing page.
Covers and photos
coverSongIdonly accepts your own songs that have finished generating. Songs you deleted or that belong to another account are rejected before any credits are charged.coverAudioUrlandimageUrlmust be publichttps://links that return the file itself, not a web page or a login screen. MemoTune copies the file into its own storage before using it.- Links to files already stored on MemoTune (
https://asset.memotune.com/…) are rejected before any credits are charged. To cover one of your songs, pass its id ascoverSongId; for a photo, link to the original image. - Only cover music you have the rights to use. If the music engine flags the source recording, MemoTune automatically tries another way to make the cover; if that also fails, the generation ends as
failedand the credits are refunded. Covers of flagged recordings can take longer than usual. - A photo is checked before any credits are charged. If the link isn't a JPEG, PNG or WebP image up to 10 MB, the call fails without a charge.
Safe retries
If a call times out or the connection drops, you may not know whether the song was started. To retry without paying twice, send a requestId with the first call and reuse it, with the same input, on every retry:
- Same
requestId, same input: returns the original generation and charges nothing. - Same
requestId, different input: rejected, so a key can't accidentally start a different song. - No
requestId: every call starts a new, paid generation.
Don't call create_song again just because a song is still processing. Keep polling get_songs instead.
Limits
- Up to 10 generations can be in progress per account at once. Wait for one to finish before starting more.
- Inputs longer than the limits above are rejected before any credits are charged.
See Errors and limits for every error message.
