canonical: https://jentic.com/apis/musicgpt.com/musicgpt

# MusicGPT API

The MusicGPT API generates music, transforms voices, and processes audio through AI models exposed as a single-bearer-token REST surface. It covers full-song generation from prompts or images, remixing, sound effect generation, audio inpainting and extension, voice changing, text-to-speech, MIDI extraction, and stem separation. The API spans 28 endpoints organized into music generation, voice processing, and audio utility tags.

## For AI agents

Generate songs, change voices, separate stems, and convert audio to MIDI through MusicGPT's AI music platform. Returns generated audio URLs and job results across 28 operations.

## Scope

Does not handle music streaming, licensing, or distribution to platforms - use for AI music generation, voice transformation, and audio processing only.

## Capabilities

- Generate complete songs from a text prompt via the Music AI endpoints
- Remix an existing track by changing genre, tempo, or instrumentation
- Extend an audio clip seamlessly or inpaint a missing section
- Convert a recorded voice to a different singer using Cover and VoiceChanger
- Transcribe audio to MIDI for use in a DAW or score editor
- Separate a song into vocal, drum, bass, and other stems via Extraction
- Generate vocal tracks over an instrumental with Sing Over Instrumental

## Use cases

### Prompt-to-Song Generation

Turn a written prompt into a full song with vocals, instrumentation, and structure. The `/v2/MusicAI` endpoint accepts a prompt, optional genre and mood, and returns a generated track URL. For batch creative exploration, `/v2/MusicAI/batch` accepts multiple prompts in a single call. This collapses creative iteration that would otherwise involve a producer and session musicians.

Example prompt: Call POST `/v2/MusicAI` with a prompt like 'lo-fi hip hop track with rain sounds and a saxophone melody' and return the generated audio URL.

### Stem Separation for Remixing

Split a finished song into individual vocal, drum, bass, and instrument stems for remixing or sampling. The `/v1/Extraction` endpoint runs source separation and returns each stem as a downloadable file. Producers and content creators get clean stems in seconds rather than running local separation models on their own hardware.

Example prompt: Submit a song URL to POST `/v1/Extraction` and return the URLs for the vocal and drum stems for use in a remix.

### Voice Cover Generation

Re-sing an existing song in a different voice for cover videos, fan art, or creative experiments. POST `/v1/Cover` takes a source song and a target voice and returns the cover. POST `/v1/VoiceChanger` does the same for spoken or sung audio without requiring a full re-render. Both expose model selection and quality controls in the request body.

Example prompt: Submit a song URL and target singer voiceId to POST `/v1/Cover` and return the generated cover audio URL.

### Audio-to-MIDI Conversion

Convert a hummed or sung melody into a MIDI file for use in a digital audio workstation. POST `/v1/audio_to_midi` accepts audio and returns the transcribed MIDI, which a downstream DAW can import directly. This collapses the manual transcription step that producers traditionally perform note by note.

Example prompt: Submit a hummed melody to POST `/v1/audio_to_midi` and store the returned MIDI file in the user's project folder.

### AI Agent Music Workflow

Drive a Jentic-powered agent that composes, remixes, and reshapes audio in response to user instructions. The agent searches Jentic for 'generate a song from a prompt', loads the schema for `/v2/MusicAI`, and chains it with `/v1/Extraction` or `/v1/VoiceChanger` as needed. Jentic injects the bearer token at execution time, so the agent never sees the MusicGPT secret.

Example prompt: Through Jentic, search for 'generate a song from prompt', call POST `/v2/MusicAI`, then chain POST `/v1/Extraction` on the result to return individual stems.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v2/MusicAI` | Generate a song from a prompt (V2) |
| POST | `/v1/Remix` | Remix an existing track |
| POST | `/v1/Extraction` | Separate audio into stems |
| POST | `/v1/Cover` | Generate a cover in a different voice |
| POST | `/v1/VoiceChanger` | Change the voice on a recording |
| POST | `/v1/audio_to_midi` | Transcribe audio to MIDI |
| POST | `/v1/sound_generator` | Generate sound effects from a prompt |
| POST | `/v1/TextToSpeech` | Synthesize speech from text |

## Key resources

- **Music Generation** — Generate songs, remixes, extensions, and inpainting
- **Voice Processing** — Voice changer and cover song endpoints
- **Audio Processing** — Stem extraction, audio-to-MIDI, and sound generation
- **Text to Speech** — Synthesize speech from text
- **Utilities** — Lyrics generation and image-to-song endpoints
- **Streaming** — Streaming audio generation operations

## Why Jentic

- **Setup:** Wiring the MusicGPT API by hand means learning its bearer auth and managing the mix of v1 and v2 generation endpoints for tasks like remix, stem extraction, and voice change yourself. Through Jentic you install once, import the MusicGPT API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Each generation request passes its prompt and options in the request body, so limit the agent to the operations it needs, such as generating a song or separating stems. You choose which operations are in scope, so a call like voice change is not included unless you add it.
- **Credential handling:** Your MusicGPT bearer token is stored once, encrypted, by your own Jentic One instance and injected into the Authorization header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'generate a song' or 'separate stems from a track', and Jentic returns the matching MusicGPT operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **ElevenLabs API** — ElevenLabs focuses on AI voice generation and cloning rather than song generation.
- **Replicate API** — Replicate hosts open-source music generation models such as MusicGen as alternatives to MusicGPT's hosted models.
- **OpenAI API** — Pair OpenAI for prompt and lyric generation with MusicGPT for the actual audio.

## FAQ

### What authentication does the MusicGPT API use?

MusicGPT uses HTTP bearer token authentication. Each request must include an Authorization header with a token issued from the MusicGPT dashboard. Through Jentic, the bearer token is stored in your Jentic One instance and applied to every request automatically, so agent code never handles the raw secret.

### Can I generate a full song from a text prompt with the MusicGPT API?

Yes. POST `/v2/MusicAI` accepts a prompt and optional genre or mood parameters and returns a generated song. Use POST `/v2/MusicAI/batch` when generating multiple variants from different prompts in a single call.

### How do I separate a song into stems through Jentic?

Through Jentic, search for 'separate a song into stems', load POST `/v1/Extraction`, and submit the source audio URL. The response contains URLs for each stem (vocals, drums, bass, other) which Jentic returns to the agent without exposing the bearer token.

### What are the rate limits for the MusicGPT API?

The OpenAPI spec does not declare specific rate limit values. MusicGPT publishes plan-based limits on its pricing page; respect Retry-After headers on 429 responses and stagger batch jobs to stay within the limits on your tier.

### Can I convert a hummed melody into MIDI?

Yes. POST `/v1/audio_to_midi` accepts an audio file and returns a MIDI transcription suitable for import into a DAW. This is one of 28 endpoints covering generation, processing, and conversion workflows.

### Does the MusicGPT API support streaming generation?

Yes. The Streaming tag covers operations that emit audio progressively as it is generated, which is useful for long-form tracks where the agent wants to start playback before the full file is ready.

### Can I limit what my agent is allowed to do with the MusicGPT API?

Yes. Because you run Jentic One yourself, your own rules decide which MusicGPT operations and credentials the agent can use, so you can grant only what a task needs, such as generating a song with POST `/v2/MusicAI` or separating stems with POST `/v1/Extraction.` Each request carries its prompt and options in the body, so an operation like voice change through POST `/v1/VoiceChanger` stays out of reach unless you add it to the agent's scope. Your bearer token is injected at execution time and never enters the agent's prompt or logs.
