---
title: "Generate Music Audio"
method: POST
path: "/api/projects/{project_id}/scenes/{scene_id}/audio-clips/generate-music"
---

# Generate Music Audio

`POST /api/projects/{project_id}/scenes/{scene_id}/audio-clips/generate-music`

## Request

- Base URL: `https://api.latted.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.latted.com/api/projects/{project_id}/scenes/{scene_id}/audio-clips/generate-music`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Generate a music audio clip using ElevenLabs music API.

This endpoint:
1. Validates the project and scene
2. Calls ElevenLabs Music API to generate music
3. Uploads audio to CDN
4. Creates AudioClip record in database
5. Returns the created audio clip

## Path parameters

- `project_id` string, required
- `scene_id` string, required

## Request body

- GenerateMusicRequest: Request schema for generating a music audio clip
  - `prompt` string, required: Text description of the music to generate
  - `startTimestamp` integer, required: Start time in milliseconds
  - `durationSeconds` integer: Duration in seconds (10-300)
  - `audioClipId` string, nullable: Existing audio clip ID to update (for regeneration)

## Response `201`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/latted/apis/motion-graphics-designer-api.md) · [All operations](https://skmtc.dev/latted/apis/motion-graphics-designer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/latted/apis/motion-graphics-designer-api/revisions/cf96730699f5?raw)
