Audio API
Create one asynchronous music task with a stable BeatAPI model ID. One endpoint carries every music model: write a song, then work on it by naming the task that made it. A call is billed at one fixed price, whatever the song’s length.
POST https://api.beatapi.io/v1/audios/tasks
POST /v1/audios/generations is the same route under a second name, so a client written for another gateway’s /v1/audios/generations only needs its base URL and API key changed. The reply is 201 with {"data": task}; save data.id and poll GET /v1/tasks/{task_id} until status is succeeded or failed, as for images and videos. GET /v1/media/models?media_type=audio lists the models.
Beta. The music models are served through third-party routes, not the model makers’ own APIs. A model may be briefly unavailable or queue longer than usual, and its options may change. A task that fails is not billed.
Models
Every model takes model and action (default generate); each family has its own actions and fields, listed on its page. A field the model and action do not read is refused with 400 bad_request, never ignored, so a call is not billed for a song that is not the one you asked for.
Make a song
(The task object also carries usage, request_id, poll_after_seconds and the other fields every task has; they are left out here.)
Work on a song you made
A follow-up names the task that made the song in source_task_id and, when the task made more than one song, the song in audio_id. audio_id is one of output.tracks[].id; leave it out for the first song. source_task_id must be one of your own tasks, otherwise the call returns 400 bad_request (source_task_id does not name a task of yours). Do not send audio_id without source_task_id.
A follow-up uses a model of the same family as the song: a Suno song is extended with a Suno model and a Lyria song with a Lyria model. Naming a song of the other family returns 400 bad_request with source_task_id was made by suno-v6, which lyria-3.5 cannot work on; use a suno model for this follow-up.
Each follow-up is a new task with its own id, its own price and its own result.
The result
When the task succeeds, output carries the files in media, the primary file in url, and two audio-only fields:
The ids and URLs above are illustrative; read the ids from your own task. tracks and data appear only on audio tasks.
Completion callback
Any request may carry callback_url, the same optional field the image and video endpoints take. It is not part of the action tables on the model pages because every action accepts it. It is not available in the web playground.
An address to notify when this task succeeds or fails: a public HTTPS URL on the same scheme, host and port as one of your enabled webhook endpoints, which signs the delivery with its secret.
Length: ≤ 2048 characters
- Register the endpoint first with
POST /v1/webhooks. BeatAPI sendstask.succeededortask.failedwith the same body, headers and retries as an account webhook; an account endpoint subscribed to the event receives it too, and an address identical to that endpoint’s is notified once. - The callback stops when the signing endpoint is deleted, disabled or moved to another host.
If the value is wrong
- The value is not a string:
"callback_url" must be a string. - The address is longer than 2048 characters:
"callback_url" must be at most 2048 characters. - It is not a URL, or has no host or no
httporhttpsscheme:"callback_url" must be a valid https URL. - It uses
http, or points to a private or otherwise non-public address:"callback_url" must be a public HTTPS URL. - No enabled webhook endpoint has the same scheme, host and port:
"callback_url" must be on the host of one of your active webhook endpoints, whose secret signs it; register one with POST /v1/webhooks.
Errors
A request the gateway refuses returns an error envelope and is not billed:
Each model page lists the messages you will meet most often. Terminal task failures follow the error codes of every other task; a failed task is refunded.
Files and expiry
Songs, stems and WAV files are hosted on BeatAPI’s media storage and stay available for at least 72 hours after the task finishes. Download and keep what you need within that time; the link stops working afterwards. Your webhook endpoints receive the same output when a task finishes; callback_url adds a one-off address for a single task.
Prices
Every call costs one fixed price per action, the same for a 30-second and a four-minute song. Each model page has its price list; GET /v1/pricing shows one row per action.

