CLI reference › PixelLab utilities

music

Makes a song with PixelLab's /music. Every request returns two takes, so it writes <out>.mp3 (take 1), <out>.take2.mp3, and <out>.music.json, a record of the request, each take's PixelLab song id, hash and length, and what was billed. A trailing .mp3 or .music.json on --out is treated as part of the base. Needs a PixelLab Tier 2 subscription or higher.

pixelkiln music --description "Calm chiptune town theme: a soft square-wave melody over a bouncy bass, light noise drums" --bpm 100 --seconds 60 --loop --out audio/town
pixelkiln music --loop-of <song id> --out audio/town
pixelkiln music style --description "cozy farming village" --bpm 96
pixelkiln music lyrics --about "a blacksmith waking the forge at dawn"
  • --description is the style: a sentence or two that gives each instrument a role, the mood, and how it ends. A bare list of tags comes out flat, and PixelLab refuses artist names. --improve first expands a short idea ("spooky swamp level") into a full style and prints it; music style does only that.
  • --bpm is 60-180; --seconds is the length to aim for, 10-360 (PixelLab fits it to the song; a 60 s request came back as 60.6 s and 61.2 s). --exclude keeps sounds out (--exclude "fade out, electric guitar"), --style-weight is 0-1, and --name names it in your PixelLab library.
  • A song is instrumental unless it has words: --lyrics <file> sings a text file (section tags such as [Verse] and [Chorus] on their own lines), or --auto-lyrics has them written, optionally --about "<topic>". --voice describes the singer. music lyrics --about "<topic>" prints two drafts.
  • --loop also makes seamless loops of take 1: <out>.loop.mp3 and <out>.loop.take2.mp3, each with a loop start and loop end in the record. Play to the loop end, then jump back to the loop start; the intro plays once and the ending never does. A loop take is a longer file than the song (two loops of a 60 s song were 122 s and 136 s). --loop-of <song id> loops a song you already have instead of making one. Instrumental songs only.
  • A loop needs at least 36 seconds of music between the song's intro and its ending, so a short song cannot be looped: --loop with --seconds of 36 or less is refused before anything is sent, and 60 or more is safe. If PixelLab refuses a loop anyway, the song's takes and record are kept and nothing is charged for the loop.
  • --restyle <song id> makes one of your songs again in the new style, keeping its melody.
  • Costs 10 generations for the two takes and 4 for a loop, both confirmed against live bills (November 2026); music style and music lyrics bill 0.05 each. The command prints the cost and asks first; --yes skips the question, --budget <n> refuses when n is below it, and --dry-run sends nothing. PixelLab charges only once the takes are made.
  • It waits for the takes (about 35 s for a song, about 2 minutes for a loop) and downloads them. Existing files are replaced only with --force.