Skip to main content
POST
/
music
curl --request POST \ --url https://api.varg.ai/v1/music \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "model": "music_v1", "prompt": "epic cinematic orchestral score, building tension, dramatic strings, brass crescendo", "duration": 30 } '
{
  "job_id": "job_a1b2c3d4",
  "status": "completed",
  "model": "fal:kling-v2.5",
  "created_at": "2026-02-13T10:00:00Z",
  "completed_at": "2026-02-13T10:02:30Z",
  "output": {
    "url": "https://s3.varg.ai/o/job_a1b2c3d4.mp4",
    "media_type": "video/mp4"
  },
  "cache": {
    "hit": false,
    "key": "sha256:abc123..."
  },
  "error": "Provider returned an error"
}

Authorizations

Authorization
string
header
required

API key from varg.ai/dashboard.

Pass as Authorization: Bearer varg_xxx.

Body

application/json
model
string
required

Music model to use. Currently music_v1 is the only available model.

Example:

"music_v1"

prompt
string
required

Description of the music to generate. Include genre, mood, tempo, and instruments.

Example:

"upbeat electronic pop, energetic, 120bpm"

duration
number

Duration in seconds

Example:

30

provider_options
object

Additional options passed directly to the provider

Response

Job created

job_id
string
required

Unique job identifier

Example:

"job_a1b2c3d4"

status
enum<string>
required

Current job status

Available options:
queued,
processing,
completed,
failed,
cancelled
Example:

"completed"

model
string
required

Resolved model identifier (provider:model format)

Example:

"fal:kling-v2.5"

created_at
string<date-time>
required

When the job was created

Example:

"2026-02-13T10:00:00Z"

completed_at
string<date-time>

When the job finished (completed, failed, or cancelled)

Example:

"2026-02-13T10:02:30Z"

output
object

Job output, present when status is completed

cache
object

Cache metadata

error
string

Error message, present when status is failed

Example:

"Provider returned an error"