music

Generate music from a reference audio

Changed on
post/v1/music/reference-audio-to-music

Request

  • Base URL
    https://api.beatra.ai (the document declares no server; this is the origin it was published from)
  • Auth
    none declared. Required headers: Idempotency-Key

Headers

x-request-id, string nullable
Idempotency-Key, string required
authorization, string nullable

Request body

ReferenceAudioToMusicRequest required

Generate music from a prompt, optional lyrics, and reference audio.

metadata, object nullable

Caller-supplied metadata; limited by task creation policy.

callback_url, string nullable

HTTPS URL beatra will POST the final Task envelope to when the Task reaches a terminal state

callback_signing_key_id, string nullable

Optional standalone callback signing key. Omit for unsigned callback delivery; requires callback_url when provided.

model, 'auto' | 'minimax-music-3.0' | 'suno-6' required
prompt, string required

Style, mood, genre, and instrumentation. When lyrics are supplied (or Suno custom mode is on) this maps to the provider's style-conditioning field; otherwise it is the song description the model writes the song from. Either way it is not an instruction field: execution directives written here (for example "do not omit anything", "sing it verbatim", "make chapter three differ from chapter one") are not read as instructions and will not be obeyed. Put the words to be sung in lyrics, or set instrumental to true for a track with no vocals.

lyrics, string nullable

Optional lyrics text. Must be omitted for instrumental music.

instrumental, boolean

When true, generate instrumental music without vocals.

title, string nullable
model_options, MusicModelOptions nullable

Model-family scoped public options for music generation.

duration_seconds, integer nullable

Target length in seconds (10–360). Results of 30 seconds or longer land within about 10%; shorter targets are generated at 30 seconds and trimmed. Not combinable with references or reference_audio.

duration_fit, 'approx' | 'exact' nullable

approx keeps the generated length; exact trims to the target with a short fade-out. Only with duration_seconds.

persona_id, string nullable

A singer from GET /v1/music/personas (saved from a song or created from the user's own voice); the new song keeps that singer's voice and style.

references, MusicReferences nullable
reference_audio, union required

Response

Task accepted

TaskEnvelope required

Standard Task envelope.

Returned by every async-creation endpoint, GET /v1/tasks/{id}, and the body of customer callback POSTs.

object, 'task'
task_id, string required
status, 'queued' | 'running' | 'succeeded' | 'failed' | 'canceled' required
capability, string required
workload_type, 'model' | 'social_operation'
model, string nullable

Caller-requested model verbatim (may be 'auto'). Null for social_operation tasks.

resolved_model, string nullable

Actual model that ran (null until execution starts; equals model for explicit-model calls)

model_selection_reason, unknown
social, SocialTaskIdentity nullable
metadata, object nullable
input, object nullable
progress, AppApiV1SchemasCommonTaskProgress nullable
output, object nullable
warnings, TaskWarning[]
error, AppApiV1SchemasCommonTaskError nullable
usage, UsageObject nullable
billing, TaskBilling nullable
callback, TaskCallback nullable
created_at, string date-time required
started_at, string date-time nullable
deadline_at, string date-time nullable
completed_at, string date-time nullable
cancel_requested_at, string date-time nullable
links, TaskLinks required

Changes

    • info

      added the new optional request property duration_fit

    • info

      added the new optional request property duration_seconds

    • info

      added the new optional request property persona_id

    5 more changes in this revision