Flow Music API on APIMart gives developers Google's Flow Music with Lyria 3 Pro and Lyria 3.5: one full song per request from a style prompt, lyrics, BPM and length, plus lyrics, extend, replace, cover, stems, export and music video tasks.
No music generated yet
Your generated music will appear here
Transparent pricing with no hidden fees. Pay only for what you use.
Build AI music features with the Flow Music API: send a style prompt, your lyrics, BPM and a target length to Lyria 3 Pro or Lyria 3.5, get one complete song per request, then extend, replace, cover, split stems or render a music video from the same clip. Billing is per request with no subscription.
Submit a song task, then poll the music task endpoint for the audio URL. The Lyria 3.5 tab adds version lyria-3.5 and your own lyrics.
Send your APIMart key as a Bearer token in the Authorization header of every request.
POST to /v1/music/generations with model flowmusic and a sound_prompt or lyrics. Each request generates one track and returns a task_id.
Poll GET /v1/music/tasks/{task_id} until data.status is completed, then read data.result.music[].audio_url. Keep the clip_id for extend, replace, cover or stems. Results are kept for 72 hours, so download them promptly.
All Flow Music operations and their parameters are in the Flow Music API documentation.
curl -X POST https://api.apimart.ai/v1/music/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "flowmusic",
"sound_prompt": "lo-fi hip hop with soft piano and rain",
"title": "Rainy Night",
"bpm": "90",
"length": 60
}'import os
import time
import requests
API_BASE = "https://api.apimart.ai"
headers = {"Authorization": f"Bearer {os.environ['APIMART_API_KEY']}"}
# 1. Submit the generation task
payload = {
"model": "flowmusic",
"sound_prompt": "lo-fi hip hop with soft piano and rain",
"title": "Rainy Night",
"bpm": "90",
"length": 60
}
resp = requests.post(f"{API_BASE}/v1/music/generations", headers=headers, json=payload, timeout=60)
resp.raise_for_status()
task_id = resp.json()["data"][0]["task_id"]
# 2. Poll the task until it finishes
for _ in range(200):
task_resp = requests.get(f"{API_BASE}/v1/music/tasks/{task_id}", headers=headers, timeout=30)
task_resp.raise_for_status()
task = task_resp.json()["data"]
if task["status"] == "completed":
for song in task["result"]["music"]:
print(song["audio_url"])
break
if task["status"] == "failed":
raise RuntimeError(task.get("error", {}).get("message", "generation failed"))
time.sleep(10)
else:
raise TimeoutError(f"task {task_id} did not finish in time; continue GET polling with this task ID")curl -X POST https://api.apimart.ai/v1/music/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "flowmusic",
"sound_prompt": "cinematic synth pop, female vocal",
"version": "lyria-3.5",
"title": "Morning Light",
"lyrics": "[Verse]\nCity lights fade into morning\n[Chorus]\nWe keep on running into the sun",
"length": 120
}'TASK_ID="task_xxx" # replace with the task_id returned by the POST request
curl "https://api.apimart.ai/v1/music/tasks/$TASK_ID" \
-H "Authorization: Bearer $APIMART_API_KEY"| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Required | Default: — | Must be flowmusic. |
version | string | Optional | Default: — | Leave empty for Lyria 3 Pro, or set lyria-3.5 for Lyria 3.5. |
sound_prompt | string | Optional | Default: — | Music style or sound description. sound_prompt and lyrics cannot both be empty. |
lyrics | string | Optional | Default: — | Lyrics text. You can generate it first with the Lyrics endpoint. |
title | string | Optional | Default: — | Title of the generated song. |
bpm | string | Optional | Default: — | Beats per minute, 1 or higher, for example "120". |
length | integer | Optional | Default: — | Target length of 1 to 240 seconds; the finished length follows the task result. |
seed | string | Optional | Default: — | Random seed for similar results; exact repeats are not guaranteed. |
Explore more models in the same category.

Suno
Suno is an AI model and creative tool designed for music generation. Users can create complete songs from text prompts, including vocals, melodies, arrangements, and lyrics. It is useful for quickly producing demos, musical ideas, short-form video soundtracks, advertising music, and song prototypes across different styles. Compared with traditional music production workflows, Suno lowers the barrier to composing, arranging, and vocal production, allowing people without professional music backgrounds to create music through natural language.
Claude Sonnet 4.5
Claude Sonnet 4.5 is an artificial intelligence model provided by anthropic.
Claude Haiku 4.5
Claude Haiku 4.5 is an artificial intelligence model provided by anthropic.
Claude Opus 4.5
claude-opus-4-5-20251101 is an artificial intelligence model provided by anthropic.
Guides, comparisons and pricing analysis from the APIMart blog.
Generate a song and keep working on the same clip: every follow-up task references the clip_id of a finished result.
Generate one complete track per request from a style prompt (sound_prompt), lyrics and an optional title. At least one of sound_prompt and lyrics is required. Lyria 3 Pro is the default; set version to lyria-3.5 for Lyria 3.5.
Set the tempo with bpm, a target length of 1 to 240 seconds and a seed. The same seed with the same request gives similar results, though exact repeats are not guaranteed.
Write lyrics from a prompt of up to 3,000 characters with the Lyrics endpoint, then pass them into the lyrics field of a music request.
Continue a clip from extend_from_s for extend_s seconds, or regenerate the section between start_s and end_s, each guided by a text instruction.
Rearrange a whole song in a new style with an instruction and a strength from 0 to 1, where higher values change more.
Separate a clip into vocal and instrumental tracks, delivered as a single zip stem package you can download directly.
Import a public audio URL to get a clip_id, then extend, replace, cover or split stems on your own track.
Export a clip as WAV or MP3, or render an MP4 music video from the simple, modern or player template.
Use one API key to add Lyria songs and the editing steps around them to your product.
Let users write a theme, generate lyrics and a full song, then extend or restyle it until it fits.
Generate background tracks for social posts, ads and creator tools, with the length set to fit each clip.
Create intros, outros, loops and brand jingles with a fixed BPM, and reuse a seed to stay close to an approved version.
Produce themes and loops for games and interactive experiences, and split stems so your audio engine can mix vocals and instrumentals.
Render a finished song into an MP4 music video with one of three templates and publish it straight to social channels.
Import a user's track by URL, then cover it in a new style or replace a section without starting over.
Three steps to your first Lyria song with the Flow Music API on APIMart.
Sign up for APIMart, top up your balance and create an API key in your dashboard. The same key calls Flow Music and every other model on APIMart.
Set a style prompt, lyrics, title, BPM and length in the playground above, and choose Lyria 3 Pro or Lyria 3.5.
POST the same JSON from your server to /v1/music/generations with model flowmusic, then poll /v1/music/tasks until the song is ready.
Feedback from developers building AI music features with APIMart.
The Flow Music API gives our app the core music workflow we needed: turn prompts into complete songs with a single request.
The form and JSON modes make it easy to test Flow Music requests before wiring music generation into production.
We tested the Flow Music generation flow in the playground, then reused the same JSON payload in our API.
Common questions about the Flow Music API
You can build AI music workflows that create complete songs from a style prompt and lyrics with Lyria 3 Pro or Lyria 3.5, then extend them, replace sections, cover them in a new style, split stems, export WAV or MP3 or render a music video.
Both use the same Flow Music endpoints, parameters and price per request. Leave version empty for Lyria 3 Pro or set version to lyria-3.5. Google released Lyria 3.5 in Flow Music in July 2026 and describes it as having more expressive vocals and better control over lyrics and tempo.
Every Flow Music request returns a task_id. Poll GET /v1/music/tasks/{task_id} until the status is completed, then read the field for that task type: songs, extends, replaced sections and covers return result.music[].audio_url, stem separation returns a zip at result.music[].file_url, music videos return result.music[].video_url, and lyrics return result.lyrics[]. Each music item has its own clip_id; use the clip_id from the latest result for further edits. Results are kept for 72 hours, so download them promptly.
Yes. The playground supports both Form and JSON modes, so developers can test a structured request and reuse it in backend integrations.
Flow Music is billed per request, not per second, and Lyria 3 Pro and Lyria 3.5 cost the same. As of October 2026, a song generation, extend, replace, cover or stem task costs $0.06 at the Gold member price ($0.075 list), lyrics, export and music video tasks cost $0.02 each, and an audio upload costs $0.01. The pricing table on this page shows current rates.
Sign up for APIMart, open the API Keys page in your dashboard and create a key. The same key calls the Flow Music API and every other model on the platform, with pay-as-you-go billing and no subscription.
POST to /v1/music/generations with model flowmusic, a sound_prompt or lyrics and optional title, bpm, length (1 to 240 seconds) and seed. Each request generates one track. It runs as an asynchronous task: you get a task_id right away and poll /v1/music/tasks until the result is ready. The API example on this page shows the full request, and all parameters are in the APIMart docs.
Yes. Prices on this page are Gold member prices, already 20% off list price. Platinum and Diamond members save more, up to 28%, and you only pay for successful requests.
Yes. Google offers Lyria in the Gemini API: Lyria 3.5 (lyria-3.5) for full-length songs and Lyria 3 Clip (lyria-3-clip-preview) for 30-second clips, according to the Gemini API docs as of October 2026. The Flow Music API on APIMart is a separate route: it runs Flow Music with Lyria 3 Pro or Lyria 3.5 and adds lyrics, extend, replace, cover, stems and music video tasks, billed per request with your APIMart key.
Set length from 1 to 240 seconds in the request. It is a target, so the finished track can be a different length; read the actual duration from the task result instead of assuming the exact value.