Scripting & JSON output
Extract a task ID and wait for it#
TASK_ID=$(suno generate "rock song" --json | jq -r '.task_id')
suno wait "$TASK_ID" --json | jq -r '.data[0].audio_url'Batch jobs from a file#
while IFS= read -r prompt; do
suno generate "$prompt" --json >> results.jsonl
done < prompts.txtThe same pattern works with flux generate, luma generate, serp search, or any other CLI in this catalog — swap the binary, keep the loop.
Run in Docker#
Each CLI ships a container image, useful for CI runners that don't want a Python environment:
docker run --rm -e ACEDATACLOUD_API_TOKEN=your_token \
ghcr.io/acedatacloud/suno-cli generate "A happy song"
# or with docker-compose
docker compose run --rm suno-cli generate "A happy song"Query multiple tasks at once#
Most CLIs support batch status checks so a pipeline can poll several jobs in one call instead of looping:
flux tasks task-1 task-2 task-3 --jsonNext
Pick the CLI for what you're generating
Video, image, music, and search each have their own tool — or use the unified CLI for all of them.
