Skip to main content
POST
Generate music

Authorizations

Authorization
string
header
required

Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.

Scopes

full_access
PersonalAccessTokenAuth
full_access
WorkspaceApiKeyAuth
full_access
WorkspaceApiKeyBearerAuth

Headers

Idempotency-Key
string

One key per operation, 1 to 128 characters. A retry with the same key and request within 24 hours returns the first response.

Example:

"7f3c9a2e-retry-1"

X-Active-Branch-Id
string

ID of the branch the editor shows. Used when branch_id is omitted, for users who work on protected-main branches.

Path Parameters

app_id
string
required

ID of the app to generate media for.

Body

application/json
prompt
string
required

required; style, mood and optional lyrics, with sections marked by tags such as [Verse] and [Chorus]. Never name a real artist or use copyrighted lyrics, which the provider refuses

Required string length: 1 - 10000
Example:

"Upbeat acoustic jingle for a bakery"

dry_run
boolean
default:false

true returns a credit estimate without generating or charging; omit or false to generate

model
string | null

model alias or vendor ID; prefer "automatic" (or omit it), which selects a fixed default

Maximum string length: 100
Example:

"automatic"

duration_seconds
integer | null

whole seconds within the model's range; omitted uses the default. An approximate model treats it as a target and may run longer

instrumental
boolean
default:false

true asks for a track without vocals (a best effort model may still sing, so keep lyrics out of an instrumental prompt)

response_format
string | null

only "mp3"

Maximum string length: 20

Response

The stored track, or an estimate for a dry run.

url
string
required

Public URL of the stored track. Anyone with the link can open it, and the link doesn't expire.

model
string
required

The model that made it.

Example:

"lyria_3_5"

duration_seconds
integer
required

The requested length in seconds.

Example:

30

usage
MediaUsage · object
required