Skip to main content

Cover / Style Transfer

POST /api/v1/music/cover

Transform existing audio while maintaining structure but changing style, timbre, and genre.
from audiopod import AudioPod

client = AudioPod(api_key="ap_your_api_key")

# Transform a pop song into jazz
job = client.music.cover(
    src_audio_url="https://example.com/pop-song.mp3",
    caption="jazz piano version with upright bass and brushed drums",
    audio_cover_strength=0.7,
    wait_for_completion=True
)
print(f"Cover URL: {job['output_url']}")

# Lighter transformation (more of the original preserved)
job = client.music.cover(
    src_audio_url="https://example.com/song.mp3",
    caption="acoustic guitar version",
    audio_cover_strength=0.4,
    lyrics="[Verse 1]\nNew lyrics for the cover version",
    wait_for_completion=True
)
Request Parameters:
ParameterTypeRequiredDefaultDescription
src_audio_urlstringYesURL of the source audio to transform
captionstringYesStyle description for the cover
lyricsstringNonullNew lyrics for the cover version
audio_cover_strengthfloatNo0.7Transformation strength. 0.0 = completely new, 1.0 = closest to original
display_namestringNonullCustom name
+ all base parameters

Reference Audio

POST /api/v1/music/reference

Generate music guided by a reference audio’s acoustic features — timbre, mixing style, spatial characteristics, and overall atmosphere.
job = client.music.reference(
    reference_audio_url="https://example.com/reference-track.mp3",
    caption="upbeat pop song with similar vocal warmth and production style",
    lyrics="[Verse]\nHello world\n[Chorus]\nLa la la",
    wait_for_completion=True
)
print(f"Reference-guided URL: {job['output_url']}")
Request Parameters:
ParameterTypeRequiredDefaultDescription
reference_audio_urlstringYesURL of reference audio for style guidance
captionstringYesText description of desired music
lyricsstringNonullSong lyrics
instrumentalboolNofalseGenerate instrumental only
display_namestringNonullCustom name
+ all base parameters

Audio Analysis

POST /api/v1/music/analyze

Extract metadata from audio using AudioMusic V2. Returns caption, lyrics, BPM, key, time signature, duration, and language.
analysis = client.music.analyze(
    audio_url="https://example.com/song.mp3"
)

if analysis.get("success"):
    print(f"Caption: {analysis['caption']}")
    print(f"BPM: {analysis['bpm']}")
    print(f"Key: {analysis['keyscale']}")
    print(f"Time Sig: {analysis['timesignature']}")
    print(f"Duration: {analysis['duration']}s")
    print(f"Language: {analysis['language']}")
    if analysis.get('lyrics'):
        print(f"Lyrics:\n{analysis['lyrics']}")
Request Parameters:
ParameterTypeRequiredDefaultDescription
audio_urlstringYesURL of audio to analyze
audio_codesstringNonullPre-extracted semantic codes
temperaturefloatNo0.85LM temperature for analysis (0.0-2.0)
Response:
{
  "success": true,
  "caption": "upbeat pop song with female vocals, electronic beats, 4/4 time",
  "lyrics": "[Verse 1]\nWalking down the street...",
  "bpm": 120,
  "keyscale": "C Major",
  "timesignature": "4/4",
  "duration": 195.5,
  "language": "en",
  "audio_codes": "..."
}
Rate limit: 10 requests per minute.

Stem Extraction

POST /api/v1/music/extract-stem

Extract a specific instrument or vocal track from audio.
# Extract vocals
job = client.music.extract_stem(
    src_audio_url="https://example.com/song.mp3",
    track_name="vocals",
    wait_for_completion=True
)
print(f"Vocals URL: {job['output_url']}")

# Extract drums
job = client.music.extract_stem(
    src_audio_url="https://example.com/song.mp3",
    track_name="drums",
    wait_for_completion=True
)
Request Parameters:
ParameterTypeRequiredDescription
src_audio_urlstringYesURL of audio to extract stem from
track_namestringYesInstrument to extract (see table below)
display_namestringNoCustom name for the job
Available Tracks:
Track NameDescription
vocalsLead vocals
drumsFull drum kit
bassBass guitar / bass synth
guitarGuitar (acoustic/electric)
keyboardPiano / keyboard
stringsString instruments
synthSynthesizers
percussionPercussion elements
brassBrass instruments
woodwindsWoodwind instruments
backing_vocalsBackground vocals
fxSound effects

Retake (Variations)

POST /api/v1/music/retake

Generate variations of an existing music track by re-running with different seeds.
curl -X POST "https://api.audiopod.ai/api/v1/music/retake" \
  -H "X-API-Key: $AUDIOPOD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "original_job_id": 123,
    "retake_variance": 0.7,
    "display_name": "Jazz Variation"
  }'
Request Parameters:
ParameterTypeRequiredDefaultDescription
original_job_idintYesID of the completed original job
retake_variancefloatNo0.7Variation strength (0.0-1.0)
retake_seedsint[]NonullSpecific seeds for reproducibility
display_namestringNonullCustom name
Rate limit: 10 requests per minute.

Repaint (Section Regeneration)

POST /api/v1/music/repaint

Regenerate a specific time segment of audio while keeping the rest intact. Useful for fixing problematic sections or changing lyrics in a segment.
curl -X POST "https://api.audiopod.ai/api/v1/music/repaint" \
  -H "X-API-Key: $AUDIOPOD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source_job_id": 123,
    "repainting_start": 30.0,
    "repainting_end": 60.0,
    "caption": "energetic chorus with powerful vocals",
    "lyrics": "[Chorus]\nNew chorus lyrics here"
  }'
Request Parameters:
ParameterTypeRequiredDefaultDescription
source_job_idintNonullID of source job (alternative to src_audio_url)
src_audio_urlstringNonullURL of source audio (alternative to source_job_id)
repainting_startfloatYesStart time in seconds
repainting_endfloatYesEnd time in seconds (-1 for end of file)
captionstringYesStyle description for the repainted section
lyricsstringNonullLyrics for the repainted section
display_namestringNonullCustom name
Note: Either source_job_id or src_audio_url must be provided. Rate limit: 3 requests per minute.

Extend

POST /api/v1/music/extend

Extend an existing music track by adding content at the beginning or end.
curl -X POST "https://api.audiopod.ai/api/v1/music/extend" \
  -H "X-API-Key: $AUDIOPOD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source_job_id": 123,
    "right_extend_length": 30.0,
    "prompt": "continue with the same energy and add a dramatic outro",
    "lyrics": "[Outro]\nThe music fades away"
  }'
Request Parameters:
ParameterTypeRequiredDefaultDescription
source_job_idintYesID of the completed source job
left_extend_lengthfloatNo0.0Seconds to add at the beginning (0.0-60.0)
right_extend_lengthfloatNo30.0Seconds to add at the end (0.0-60.0)
promptstringYesStyle description for the extension
lyricsstringNonullLyrics for the extension
display_namestringNonullCustom name
Rate limit: 3 requests per minute.

Edit

POST /api/v1/music/edit

Edit existing audio with new prompts and lyrics while preserving the overall structure.
curl -X POST "https://api.audiopod.ai/api/v1/music/edit" \
  -H "X-API-Key: $AUDIOPOD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source_job_id": 123,
    "edit_target_prompt": "make the guitars more prominent and add reverb",
    "display_name": "Guitar Edit"
  }'
Request Parameters:
ParameterTypeRequiredDefaultDescription
source_job_idintYesID of the completed source job
edit_target_promptstringNonullNew style/prompt for the edit
edit_target_lyricsstringNonullNew lyrics
edit_typestringNonullEdit type identifier
edit_n_minfloatNonullEdit range minimum
edit_n_maxfloatNonullEdit range maximum
display_namestringNonullCustom name
Rate limit: 3 requests per minute.

LRC Timestamp Generation

POST /api/v1/music/{job_id}/lrc

Generate synchronized LRC (lyric) timestamps for a completed music job.
LRC generation requires internal tensors from the music generation process. For best results, enable generate_lrc: true when creating the music generation request. This endpoint is for retroactive LRC generation which has limitations.
curl -X POST "https://api.audiopod.ai/api/v1/music/123/lrc" \
  -H "X-API-Key: $AUDIOPOD_API_KEY" \
  -H "Content-Type: application/json"
Response:
{
  "success": true,
  "job_id": 123,
  "lrc_content": "[00:00.00] Walking down the street\n[00:05.20] On a sunny day...",
  "lrc_url": "https://media.audiopod.ai/lrc/123.lrc"
}
Rate limit: 20 requests per minute.