AI Music API: Add Song Generation to Your App with Kie.ai
This page is for developers. To make songs yourself, use AIMusic; to generate music inside your own product, use the Kie AI Music API on kie.ai.
music.toolTips
relatedTools.title
AI Meditation Music Generator: Music for Stillness | AIMusic
Music for Reading: AI Reading Music Generator | AIMusic
AI Reggae Music Generator: Reggae Tracks from Text | AIMusic
Sad Song Generator: AI Sad Music and Songs | AIMusic
Free Fundo Musical Generator by AIMusic - Create Custom Music
AI Beat Maker: Make Beats from a Text Prompt | AIMusic
Copyright-Free Music Generator for Projects | AIMusic
Free Musicgen Tool by AIMusic – Create Songs & Custom Lyrics Easily
What the Kie AI Music API Offers
Three V6 Models on One Endpoint
The Kie AI Music API supports V6, V6 Mini and V6 Wild. You pick the model with one parameter on the same task endpoint, POST /api/v1/jobs/createTask.
Vocal or Instrumental Tracks from Text
It turns a text prompt into a full vocal or instrumental track, and each request returns more than one variation.
Custom Mode and Simple Mode
In custom mode you send a title, a style and your own lyrics (up to 5,000 characters of lyrics and 1,000 of style) and can set a target length of 10 to 360 seconds. In simple mode the lyrics are written from your idea, and you can guide the song with image, video or audio references.
More Than Song Generation
The same API family covers lyrics generation, extending a track, separating vocals and instrument stems, upload and cover, timestamped lyrics and MP4 music videos.
Callbacks or Polling
Pass a callback URL to be notified at the text, first and complete stages, or poll the task by its task ID. Generated files are kept for 14 days.
Pay per Request in Credits
Requests are paid in kie.ai credits, and the credits for each request are shown in the playground on the API page. New kie.ai users receive 80 free credits to test.
Documentation on docs.kie.ai
Endpoints, parameters, callbacks and response formats are documented at docs.kie.ai.
How to Start with the Kie AI Music API
Step 1: Create a kie.ai Account and API Key
Sign up on kie.ai and get your API key from the dashboard.
Step 2: Send a Generation Request
Send a POST request to /api/v1/jobs/createTask with your prompt and set the model parameter to V6, V6_MINI or V6_WILD.
Step 3: Collect the Results
Wait for the callbacks or poll by task ID, then save the tracks you need within 14 days.
Who an AI Music API Is For
App Developers
Add song generation to a music, video or social app through an API call.
Video and Game Tools
Generate background music or instrumentals from a short description of the mood and pace.
Lyrics and Songwriting Apps
Let users turn their own lyrics into songs, using custom mode for the title, style and lyrics.
Teams Testing an Idea
Start with the 80 free credits that new kie.ai users receive, then pay per request in credits.
Example Uses
A lyrics app sends a user's verses in custom mode and shows the variations that come back so the user can pick one.
Lyrics to song
Example useA video editor requests an instrumental from a mood description, such as "calm lo-fi beat, soft piano".
Video background
Example useA music tool extends a generated track from a chosen point instead of generating a new one.
Longer track
Example useA karaoke app separates the vocals from an uploaded song to get the instrumental part.
Karaoke version
Example use
AI Music API FAQ
Is this page the API itself?
No. This page explains where developers can get an AI music API. The Kie AI Music API, with its playground and pricing, is on kie.ai.
Which models does the Kie AI Music API support?
V6, V6 Mini and V6 Wild, chosen with the model parameter on POST /api/v1/jobs/createTask.
Is it free?
New kie.ai users receive 80 free credits to test. After that, each request costs credits, and the cost per request is shown in the playground on the API page.
How long can a generated track be?
In custom mode you can set a target length between 10 and 360 seconds.
Can I send my own lyrics?
Yes. In custom mode you can send up to 5,000 characters of lyrics together with a title and a style.
Can I generate instrumentals?
Yes. Turn on the instrumental option to get a track with no vocals.
How do I get the results?
Pass a callback URL to be notified at the text, first and complete stages, or poll the task by its task ID.
How long are generated files kept?
14 days, so download the tracks you want to keep before then.
Where is the documentation?
At docs.kie.ai, which covers endpoints, parameters, callbacks and response formats.
Can I generate lyrics without music?
Yes. The lyrics endpoint writes lyrics from a short prompt of up to 200 characters without creating audio, and returns several variations.