|
| 1 | +# sonilo-cli |
| 2 | + |
| 3 | +Command-line interface for the [Sonilo API](https://github.com/sonilo-ai/sonilo-python) — generate music and sound effects from text or video. |
| 4 | + |
| 5 | +## Install |
| 6 | + |
| 7 | + pip install sonilo-cli |
| 8 | + |
| 9 | +## Auth |
| 10 | + |
| 11 | +Set your API key once: |
| 12 | + |
| 13 | + export SONILO_API_KEY=sk-... |
| 14 | + |
| 15 | +or pass `--api-key sk-...` on any command. |
| 16 | + |
| 17 | +## Commands |
| 18 | + |
| 19 | + sonilo account # plan limits and available services |
| 20 | + sonilo usage --days 7 # usage summary |
| 21 | + sonilo text-to-music --prompt "warm lo-fi piano, rain" --duration 30 |
| 22 | + sonilo video-to-music --video clip.mp4 --prompt "tense synths" --format wav |
| 23 | + sonilo text-to-sfx --prompt "glass shattering on concrete" --duration 3 |
| 24 | + sonilo video-to-sfx --video clip.mp4 --output whoosh.wav |
| 25 | + sonilo video-to-sound --video clip.mp4 \ |
| 26 | + --music-prompt "uplifting orchestral score" --sfx-prompt "match the on-screen action" |
| 27 | + sonilo video-to-video-sound --video clip.mp4 --music-prompt "tense synths" |
| 28 | + sonilo tasks get <task-id> |
| 29 | + sonilo tasks wait <task-id> --poll-interval 2 --timeout 600 |
| 30 | + |
| 31 | +### Notes |
| 32 | + |
| 33 | +- `text-to-music` / `video-to-music` stream a short `.m4a` by default. `--format wav`, |
| 34 | + `--isolate-vocals`, and `--preserve-speech` each switch to the async submit-and-poll path. |
| 35 | +- `text-to-sfx` / `video-to-sfx` are always async; `--format` accepts `wav|mp3|aac|flac`. |
| 36 | +- Output defaults to `./output.<ext>`; override with `--output`. |
| 37 | + |
| 38 | +### Combined soundtracks |
| 39 | + |
| 40 | +`video-to-sound` and `video-to-video-sound` score a clip with a music bed *and* sound effects in one |
| 41 | +call (one charge, instead of chaining two requests). Both are async-only and take the same options — |
| 42 | +they differ only in what comes back: `video-to-sound` writes the mixed **audio** (default |
| 43 | +`output.wav`), `video-to-video-sound` writes the **source video with that audio muxed in** (default |
| 44 | +`output.mp4`). |
| 45 | + |
| 46 | + sonilo video-to-sound --video clip.mp4 \ |
| 47 | + --music-prompt "uplifting orchestral score" \ |
| 48 | + --sfx-prompt "match the on-screen action" \ |
| 49 | + --output soundtrack.wav --stem music --stem sfx |
| 50 | + |
| 51 | +- `--music-prompt` / `--sfx-prompt` steer the two layers separately; both are optional. |
| 52 | +- `--preserve-speech` keeps speech from the source video in the mix. |
| 53 | +- **Ducking is on by default** (music dips under speech). Pass `--no-ducking` to opt out — omitting |
| 54 | + the flag leaves the server default untouched. |
| 55 | +- `--stem` is repeatable (`music`, `music_processed`, `sfx`) and saves the individual layers next to |
| 56 | + the combined output, so you can re-balance the mix yourself. With `--output soundtrack.wav`, the |
| 57 | + music stem lands at `soundtrack.music.m4a`. `music_processed` exists only when `--preserve-speech` |
| 58 | + or ducking altered the music bed. |
| 59 | + |
| 60 | +## Free trial |
| 61 | + |
| 62 | +Accounts created through self-serve signup start with free runs on every endpoint — no card |
| 63 | +required: |
| 64 | + |
| 65 | +| Free runs | Endpoints | |
| 66 | +| --- | --- | |
| 67 | +| 2 each | text-to-music, text-to-sfx, audio-ducking | |
| 68 | +| 1 each | video-to-music, video-to-sfx, video-to-video-music, video-to-video-sfx, video-to-sound, video-to-video-sound | |
| 69 | + |
| 70 | +Once an endpoint's free runs are used up, calls to it bill at the normal rate. `sonilo account` |
| 71 | +shows the services available to your key. |
0 commit comments