# AI Music API ## Docs - [Introduction](https://docs.aimusicapi.ai/doc-2058743.md): Start here to generate music with the AI Music API: authentication, base URL, your first request, and how credits, callbacks and task polling fit together. - [Credits Usage Guide](https://docs.aimusicapi.ai/doc-2058744.md): How credits are charged per model and endpoint, what one generation actually costs, and how to check your balance before scaling a workload. - [AI Music API FAQ & Troubleshooting](https://docs.aimusicapi.ai/doc-2058745.md): Common AI Music API questions: custom vs AI-written lyrics, instrumental-only tracks, vocal gender, song length, extending, covering and personas. - [Special Scenarios](https://docs.aimusicapi.ai/doc-2058746.md): How to work with your own uploaded audio: get a clip_id, then extend, cover or build a persona from it, including the one-stop upload-and-extend calls. - [Error Handling & Error Codes | AI Music API](https://docs.aimusicapi.ai/doc-2058747.md): Every error code the AI Music API returns, what triggers it, and whether the right response is to retry, back off, or fix the request. - [Webhook Integration Guide](https://docs.aimusicapi.ai/doc-2058748.md): Receive generation results by webhook instead of polling: payload shape, retry behaviour, signature verification, and how to test callbacks locally. - sonic [Sonic Instructions](https://docs.aimusicapi.ai/doc-2058749.md): Generate music with the Sonic models, v3 through v5: request fields, model versions, prompt structure, and what each parameter changes in the output. - riffusion(Deprecated) [Riffusion instructions](https://docs.aimusicapi.ai/doc-2058750.md): Use the Riffusion models through the API: supported operations, request parameters, and how the output differs from the Sonic family. - producer [Producer Instructions](https://docs.aimusicapi.ai/doc-2058751.md): Generate studio-quality music, lyrics and music videos from a text prompt with the Producer API: request fields, async task polling, and webhook callbacks. - producer [Complete Request Example](https://docs.aimusicapi.ai/doc-2058752.md): Copy-paste curl examples for every Producer endpoint: generate music, make lyrics, upload, download and poll a task, with the full JSON responses. - nuro [Nuro Instruction](https://docs.aimusicapi.ai/doc-2058753.md): Moving off Nuro: generate vocal tracks with the Sonic API and instrumental or BGM with the Producer API — field-by-field request mapping, on your API key. - nuro [Nuro Error Handling & Credit Refunds | AI Music API](https://docs.aimusicapi.ai/doc-2058754.md): Nuro API error codes by category, which errors trigger an automatic credit refund, and the response fields that tell you whether a refund was already processed. ## API Docs - sonic [create / extend / cover music](https://docs.aimusicapi.ai/api-32136899.md): Submit a music generation, extension or cover in one request. Covers required fields, model selection and the task ID you poll for the finished audio. - sonic [upload and extend music](https://docs.aimusicapi.ai/api-32136900.md): Upload an existing audio file and extend it into a longer track, controlling continuation length, style and the model used. - sonic [upload and cover music](https://docs.aimusicapi.ai/api-32136901.md): Upload a track and generate a cover of it in a different style or voice, keeping the original melody and structure. - sonic [create persona](https://docs.aimusicapi.ai/api-32136902.md): Create a reusable voice persona so every later generation keeps the same singer identity across tracks. - sonic [sample](https://docs.aimusicapi.ai/api-32136903.md): Turn a short audio sample or hummed melody into a full-length song, using your clip as the inspiration for the generated track. - sonic [mashup](https://docs.aimusicapi.ai/api-32136904.md): Mix two existing songs into a single new mashup track, combining elements from both source clips in one request. - sonic [get BPM](https://docs.aimusicapi.ai/api-32136905.md): Detect the tempo of a generated or uploaded track and return its BPM, for syncing music to video or other audio. - sonic [get VOX](https://docs.aimusicapi.ai/api-32136906.md): Extract the isolated vocal stem from a track, returning a downloadable vocal-only audio file. - sonic [get wav](https://docs.aimusicapi.ai/api-32136907.md): Download any generated track as lossless WAV instead of compressed audio, for mastering or further production work. - sonic [get midi](https://docs.aimusicapi.ai/api-32136908.md): Convert a generated track to MIDI and download the notes, so you can edit the composition in a DAW. - sonic [get lyrics timeline](https://docs.aimusicapi.ai/api-32136909.md): Return word-level timestamps for a track's lyrics — the data you need for karaoke, captions or lyric-synced video. - sonic [upsample tags](https://docs.aimusicapi.ai/api-32136910.md): Expand a short style tag list into richer prompt tags to steer generation more precisely. - sonic [concat music](https://docs.aimusicapi.ai/api-32136911.md): After an extend operation, retrieve the whole song stitched into one continuous audio file instead of separate clips. Costs 2 credits per call. - sonic [stems basic](https://docs.aimusicapi.ai/api-32136912.md): Split a track into basic stems — vocal and instrumental — and download each part separately. - sonic [stems full](https://docs.aimusicapi.ai/api-32136913.md): Split a track into full multi-track stems (drums, bass, vocals and more) for detailed remixing and production. - sonic [remaster](https://docs.aimusicapi.ai/api-32136914.md): Remaster an existing track to improve loudness and clarity while keeping the original arrangement intact. - sonic [replace section](https://docs.aimusicapi.ai/api-32136915.md): Regenerate one section of an existing track while leaving the rest untouched, for fixing a weak verse or chorus. - sonic [add vocal](https://docs.aimusicapi.ai/api-32136916.md): Add a generated vocal line to a track you uploaded through the API, controlling the lyrics and voice used. Works only with API-uploaded clips. - sonic [add instrumental](https://docs.aimusicapi.ai/api-32136917.md): Add a generated instrumental to a vocal track you uploaded through the API, using custom parameters to control the style of the backing. - sonic [upload music](https://docs.aimusicapi.ai/api-32136918.md): Upload your own audio to the API so it can be used as the source for extend, cover, stem or remaster operations. - sonic [create voice](https://docs.aimusicapi.ai/api-32136919.md): Create a custom voice from reference audio, then reuse it as the singer across future generations. - sonic [Get Music (Sonic) — Poll Task & Retrieve Audio | AI Music API](https://docs.aimusicapi.ai/api-32136920.md): Poll a Sonic generation task and retrieve the finished audio URLs, status and metadata once the track is ready. - riffusion(Deprecated) [create music (with lyrics)](https://docs.aimusicapi.ai/api-32136921.md): Generate a song from lyrics you supply, controlling style, model and voice while keeping your exact words. - riffusion(Deprecated) [create music (with description)](https://docs.aimusicapi.ai/api-32136922.md): Generate a song from a plain-language description, letting the model write the lyrics and choose the arrangement. - riffusion(Deprecated) [cover music](https://docs.aimusicapi.ai/api-32136923.md): Generate a cover of an existing track in a new style or voice while preserving its melody and structure. - riffusion(Deprecated) [extend music](https://docs.aimusicapi.ai/api-32136924.md): Continue an existing track beyond its ending, matching key, tempo and style so the join is seamless. - riffusion(Deprecated) [replace music section](https://docs.aimusicapi.ai/api-32136925.md): Replace a timed section of a track with newly generated audio, specifying the start and end of the region. - riffusion(Deprecated) [swap music sound](https://docs.aimusicapi.ai/api-32136926.md): Swap the instrumental sound of a track for a different style while keeping the vocal performance. - riffusion(Deprecated) [swap music vocals](https://docs.aimusicapi.ai/api-32136927.md): Replace the vocal on a track with a different voice while keeping the backing instrumental unchanged. - riffusion(Deprecated) [Upload Audio (Riffusion) — Add Source Files | AI Music API](https://docs.aimusicapi.ai/api-32136928.md): Upload source audio for use with Riffusion operations such as cover, extend and section replacement. - riffusion(Deprecated) [Get Music (Riffusion) — Poll Task & Retrieve Audio | AI Music API](https://docs.aimusicapi.ai/api-32136929.md): Poll a Riffusion generation task and retrieve the finished audio and metadata once generation completes. - producer [create music](https://docs.aimusicapi.ai/api-34286414.md): Generate a studio-quality Producer track from a text prompt or your own lyrics. Returns a task ID you poll for the finished audio; 10 credits per call. - producer [Upload Audio (Producer) — Add Source Files | AI Music API](https://docs.aimusicapi.ai/api-34286404.md): Upload audio into the Producer workflow so it can be used as the source for arrangement, stems and further production steps. - producer [download](https://docs.aimusicapi.ai/api-34286405.md): Download the finished audio produced by a Producer workflow task. - producer [get task / poll result](https://docs.aimusicapi.ai/api-34286406.md): Poll any Producer task by ID — create_music, make_lyrics, video_clip, upload or download — and collect the result once the task completes. - nuro [create vocal music](https://docs.aimusicapi.ai/api-32136934.md): Generate vocal music through the Sonic API — POST /api/v1/sonic/create, the successor to the Nuro vocal endpoint. Your existing API key works unchanged. - nuro [create instrument music](https://docs.aimusicapi.ai/api-32136935.md): Generate instrumental and BGM tracks through the Producer API — POST /api/v1/producer/create, the successor to the Nuro instrumental endpoint. - nuro [Get Music (Nuro) — Poll Task & Retrieve Audio | AI Music API](https://docs.aimusicapi.ai/api-32136936.md): Poll a generation task and collect the finished audio — the Sonic and Producer task endpoints now cover what the Nuro task poller returned. - lyrics generation [Make Lyrics](https://docs.aimusicapi.ai/api-32136937.md): Generate song lyrics from a description or theme, ready to feed straight into a music generation request. - [get-credits](https://docs.aimusicapi.ai/api-32136898.md): Check your remaining AI Music API credit balance programmatically before submitting a batch of generations.