Pick a score from three Lyria takes: cost and idempotency keys

Three music takes on Sume cost three generations. Use one idempotency key per take, name the differences in the prompt, and keep the pick for the timeline.

4 min readSume
All posts

To choose a score from three takes, submit three music jobs with three different idempotency keys and pay for three generations. At the public rate of $0.125 per generation that is $0.375 before the render. Music 1.0 has no seed, so you cannot reproduce a take by resending the prompt. Keep the file of the one you like.

One key per take

An idempotency key tells Sume that two requests are the same request. If you reuse a key with an unchanged body, you are retrying, and you should get the original job back. If you want a new take, send a new key. A key that is reused for a request with a different body is a conflict, not a new take.

Make the takes differ

Do not send three identical prompts and hope for variety. Change one thing in each: the lead instrument, the tempo, or the key. The Sume docs suggest that scenes which need to contrast differ by at least 12 BPM and change the lead instrument. Write the tempo as a number, and end with "Instrumental, no vocals." if you do not want a voice.

for i in 1 2 3; do
  curl -s -X POST https://api.sume.com/v1/music-1.0/generate \
    -H "Authorization: Bearer $SUME_API_KEY" \
    -H "Content-Type: application/json" \
    -H "Idempotency-Key: score-take-$i-v1" \
    -d "{\"prompt\": \"Take $i: product reveal bed, $((60 + i * 12)) BPM, warm Rhodes. Instrumental, no vocals.\"}"
  echo
done

Compare against the picture

Poll each job with GET /v1/jobs/:id/status and read /result when result_ready is true. Listen to all three against the cut, not on their own. A music bed that sounds good alone can fight a voiceover.

The cost of takes, read 2026-10-06:

Music takes at the public rate, read 2026-10-06
TakesGenerationsCost at $0.125 each
11$0.125
33$0.375
55$0.625

Naming keys so retries are safe

Build the key from the thing that makes the request unique, for example the project, the take number and a version suffix. A network retry then reuses the same key and returns the same job, while a new take gets a new key.

Never reuse a key after you edit the prompt. If you change the body, change the key. Keep a table of key, prompt and job id, so the chosen file can be traced to the request that made it.

The public rate comes from the repository's pricing fixtures, and the docs tell you to confirm the live rate in GET /v1/catalog. Place the chosen take as a soundtrack in a Timeline 1.0 render, where duck_db lowers it under the voice.

Sources

Related posts

More in Pricing

All Pricing posts

Written by Sume