Text to Music
POST /api/v1/text-to-music/submit
description is required.
Required inputs
descriptionstring- Describe the music style / mood / scene in plain text (1-400 chars).
Edit the sample inputs for your own task before submitting.
# Set VIDMAGE_IDEMPOTENCY_KEY to a unique value for this task; preserve it for transport retries.
curl -X POST "https://vidmage.ai/api/v1/text-to-music/submit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: ${VIDMAGE_IDEMPOTENCY_KEY}" \
-H "Content-Type: application/json" \
-d '{"description":"ambient electronic music for a calm evening","makeInstrumental":false}'
# -> { "success": true, "taskId": "...", "creditsConsumed": ... }Parameters and input rules3 fields
| Field | Type | Required | Default | Meaning and limits |
|---|---|---|---|---|
description | string | Yes | Not specified | Describe the music style / mood / scene in plain text (1-400 chars). Minimum length: 1 · Maximum length: 400 |
title | string | No | Not specified | Song title (0-80 chars). Auto-generated if empty. Maximum length: 80 |
makeInstrumental | boolean | No | false | Generate instrumental music without vocals. Default: false |
Retrieve the result
Save taskId from the accepted submission and send it to this endpoint:
POST /api/v1/text-to-music/query
Use the same Bearer API key. On completion, read the audioUrl result field.
curl -X POST "https://vidmage.ai/api/v1/text-to-music/query" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "taskId": "TASK_ID_FROM_SUBMIT" }'
# -> { "success": true, "data": { "status": "...", "audioUrl": "https://..." } }