---
name: generate-music
description: Compose royalty-free songs from text prompts with AudioPod's music generation engine.
license: MIT
---

# Skill: generate-music

Generate full songs (vocals + instrumentation) from a natural-language prompt
using AudioPod AI's music generation engine.

## When to use

Invoke when the user wants:

- A new song from a text caption, lyrics, or mood description
- Background music for a video or podcast
- Royalty-free music for commercial projects
- A specific genre, BPM, key, language, or duration

## API

`POST https://api.audiopod.ai/api/v1/music/text2music`

Task variants (same response + polling shape): `text2music` (prompt → full
song), `cover` (re-sing an uploaded track), `prompt2instrumental`,
`lyric2vocals`, `text2rap`, `extend`, `retake`. Pick the path that matches
the task, e.g. `POST /api/v1/music/cover`.

Headers:

- `Authorization: Bearer <access_token>` (OAuth — see `/.well-known/oauth-protected-resource`)
- `Content-Type: application/json`

Body:

```json
{
  "caption": "lo-fi hip hop, rainy ambient pads, 90 BPM, 60 seconds",
  "duration_seconds": 60,
  "dit_variant": "standard"
}
```

`dit_variant: "xl"` selects the higher-fidelity premium variant — requires a paid tier.

## Response

```json
{ "job_id": 12345, "status": "PENDING" }
```

`job_id` is an integer, unique within the music tool (job IDs are
per-tool — a music job and a stems job can share the same number).

Poll `GET /api/v1/music/jobs/{job_id}/status` for `COMPLETED` and an
`audio_url`. Note the `/status` suffix — `GET /api/v1/music/jobs/{job_id}`
without it is the DELETE/PATCH route and returns 405, and there is no
generic `/api/v1/jobs/{job_id}` endpoint (it would be ambiguous across
tools).

## Errors

- `402 PREMIUM_TIER_REQUIRED` — premium variant requested on free/basic tier
- `429` — rate limit; retry with exponential backoff
- `400 invalid_caption` — caption is empty or violates safety policy

## Pricing

Free tier available. Paid plans from $20/mo (Creator). See https://www.audiopod.ai/pricing.
