Command line

Sonilo CLI docs

Use the Sonilo CLI for terminal smoke tests, account checks, usage checks, and generation workflows. The CLI reads SONILO_API_KEY from the environment.

Install

npm install -g sonilo-cli
# or
pip install sonilo-cli

export SONILO_API_KEY="sk_your_api_key"

Full CLI reference: https://platform.sonilo.com/docs/cli

Common commands

CommandUse
sonilo accountConfirm the API key is valid and the account is reachable.
sonilo usageCheck usage and remaining balance before generation.
sonilo text-to-musicGenerate prompt-based music from the command line.
sonilo video-to-musicGenerate a video-aligned soundtrack.
sonilo text-to-sfxGenerate prompt-based sound effects.
sonilo video-to-sfxGenerate sound effects aligned to a video.
sonilo tasks getInspect an async task by id.
sonilo tasks waitWait for an async task to complete before downloading output.

Generation verification

Real generation requires available balance or credits. If a CLI generation command receives 402 Payment Required, insufficient balance, a failed async task, or an empty output file, report the blocker directly. Do not create placeholder audio.