ClavueClavue
AI platform · IDE · agents · models

Music generation

clavue-music is the official song product id (premium pool). Call POST /v1/audio/speech on api.clavue.com. Default clip is 30 seconds and one seed. Do not send 180 or 240 as a single engine call. Do not ship upstream names in product code.

How to generate

  • POST /v1/audio/speech with model=clavue-music
  • input = tagged lyrics (tags on their own line)
  • instructions = English Structured Caption (Global Metadata / Vocal Details / Arrangement), 250–450 words
  • audio_duration default 30; engine max 110; seed default 11
  • Public clients should also send voice as the same number of seconds (string)
  • For 180s: two parallel 90s calls, same instructions, reused Chorus — never audio_duration 180
curl -sS https://api.clavue.com/v1/audio/speech \
  -H "Authorization: Bearer $CLAVUE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model":"clavue-music",
    "input":"[Verse]\nMorning light filtering through the pine\n[Chorus]\nStay with me in this light",
    "instructions":"Global Metadata\nAcoustic pop, 96 BPM, intimate morning.\nVocal Details\nSoft female lead, close-mic.\nArrangement\nFingerpicked guitar, soft piano, brushed snare in the chorus.",
    "audio_duration":30,
    "voice":"30",
    "seed":11,
    "response_format":"wav"
  }' --output song.wav --max-time 600

Recommended settings

Engine sampling is locked. Send duration, seed, lyrics, and caption only. Timeout ≥600s per clip. Do not send temperature, top_p, speed, or named voices.

  • audio_duration: 30 (default) · engine max 110 · product max 240 as 90∥90 or 110∥110
  • voice: the same seconds as a string, e.g. "30"
  • seed: 11 on the hot path; change seed only when the user asks for another take
  • response_format: wav · read the real WAV duration, not just HTTP 200
{
  "model": "clavue-music",
  "audio_duration": 30,
  "voice": "30",
  "seed": 11,
  "response_format": "wav"
}

Prompt demo (30s acoustic)

Rewrite the user one-liner with auto or clavue-2.1-fast (thinking off) into lyrics + Structured Caption, then send those to /v1/audio/speech. Tags must sit on their own line. Weak caption: Genre: pop. BPM: 96.

# User intent
Duration: 30 seconds. Acoustic pop. Soft female, close-mic, no belting.
Theme: pine needles at a morning window, a quiet street.
No full drum kit, no celebrity names.

# Caption rewriter system
You are a song caption engineer. Expand the user's intent into an English Structured Caption.
Output only three headings. No title, no lyrics, no explanation.
### Global Metadata — genre, BPM, mood arc, scene, production
### Vocal Details — gender, register, verse vs chorus, harmony, space
### Arrangement — instrument entries by section; 2–3 lead instruments; 250–450 words

# Lyrics rewriter system
Write lyrics for the target duration. Tags on their own line.
Allowed: [Intro] [Verse] [Pre-Chorus] [Chorus] [Bridge] [Outro]
Chorus short and repeatable. ~2–3 Chinese characters per second.
30s = Verse + Chorus, 8–12 lines. Lyrics only.

# Example input (lyrics)
[Verse]
晨光穿过窗边的松针
这条安静的街像只属于我们
把昨夜的 rumble 轻轻放下
让呼吸自己找到节奏

[Chorus]
世界慢慢醒来
你走在我左边
别说话,先听风
把名字吹成一天

# Example instructions (caption)
Global Metadata
Basic Attributes: bpm is 96. key is C, and scale is major. Contemporary acoustic pop.
Global Emotional Progression: Opens intimate and still, then lifts into a wider, hopeful chorus without turning anthemic.
Application Scenarios & Imagery: Early morning apartment, pine light through a window.
Sonics & Production Profile: Intimate, mid-focused, warm low mids, no harsh cymbals.

Vocal Details
Soft female lead, breathy, close to the microphone. Conversational verse; sustained chorus; no belting.
Light stacked doubles only in the chorus. Short plate, almost dry in the verse.

Arrangement
Intro: fingerpicked steel-string guitar alone.
Verse: guitar plus very soft piano; no full drum kit.
Chorus: brushed snare, upright bass, piano opens; keep the guitar pattern continuous.

Limits

Single engine call 10–110s. Timeout ≥600s per clip. Do not send temperature, speed, or named voices. Lyrics shorter than the request end early — read the WAV duration. 180/240 must be two parallel clips.

Sending audio_duration 180 or 240 to one call fails. Defaulting to a 3-minute single shot is the path that takes ~19 minutes.

Next