---
title: "Generate an instrumental music track"
method: POST
path: "/generate/music"
---

# Generate an instrumental music track

`POST /generate/music`

## Request

- Base URL: `https://api.bamf.ai/v1`
- URL: `https://api.bamf.ai/v1/generate/music`
- Auth: HTTP bearer

Requires images:generate. Generates a 10-30 second instrumental MP3 (default 15 seconds) from a prompt of up to 2000 characters, stores it in the creator media bucket, and returns its URL. Returns 503 music_provider_unavailable when the music provider is not configured.

## Request body

- object
  - `prompt` string, required
  - `duration_seconds` integer
  - `creator_id` string, uuid
  - `author_id` string, uuid

## Response `201`

Generated track: url, storage_path, duration_seconds, license

## Other responses

- `400`: invalid_prompt
- `503`: Music provider unavailable

---

[API](https://skmtc.dev/bamf/apis/bamf-developer-platform-api.md) · [All operations](https://skmtc.dev/bamf/apis/bamf-developer-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bamf/apis/bamf-developer-platform-api/revisions/a390dd3294bd?raw)
