---
title: "Generate music"
method: POST
path: "/v1/tools/generate-music"
tags: ["Tools"]
---

# Generate music

`POST /v1/tools/generate-music`

Generate an instrumental music track from a text description. The returned track is approximately 30 seconds long. VideoGen automatically routes each request to the most effective state-of-the-art music model for your prompt, so you don't pick a model.

## Request body

- GenerateMusicRequest
  - `prompt` string, required — A text description of the music to generate. Include genre, mood, instrumentation, and tempo for best results.
  - `numResults` integer — Number of output results to generate. Defaults to 1.
  - `isOutputTemporary` boolean — When true, generated files are temporary. Temporary files are guaranteed to be available for 24 hours, after which they may be archived at any time. Temporary files are not analyzed (no description, transcript, or embedding will be generated), so they will not appear in search results. Defaults to false.
  - `hideFromUi` boolean — When true, generated files are hidden from the VideoGen Media page by default. They remain accessible through the API. Defaults to false.

## Response `202`

Execution accepted; poll until complete.

- StartToolExecutionResponse — Returned when a tool execution is started. Use `toolExecutionId` to poll for results or cancel.
  - `toolExecutionId` string, required — Execution id (e.g. `vg_tool_...`).

## Other responses

- `default` — Error

---

[API](https://skmtc.dev/videogen/apis/videogen-api.md) · [All operations](https://skmtc.dev/videogen/apis/videogen-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/videogen/videogen-api/revisions/33dda0455d67/schema)
