Skip to main content

Suno by Ace Data Cloud — CLI

Install the Ace integration

This integration is maintained by Ace Data Cloud and uses your Ace API key. It is not an official client published by the model owner. Check the PyPI package and its AceDataCloud repository before installing.

python -m pip install suno-cli
suno --help
suno models

The commands above show local help/reference information and do not submit a generation. Then follow Get API Token below: register/sign in, initialize General application if needed, copy the General application API key, and store it in the terminal's ACEDATACLOUD_API_TOKEN environment variable. Do not use a platform management token.

Generation follows your account's current service access, balance and pricing. Save the returned task ID and query that same ID; do not repeat generation while a task is pending.

A successful command or running preview does not prove a completed media result. Check the task's terminal outcome and returned media link. 中文首次使用指南 · Service-name package directory

PyPI version PyPI downloads Python 3.10+ License: MIT CI

A command-line tool for AI music generation using Suno through the AceDataCloud API.

Generate AI music, lyrics, and manage audio projects directly from your terminal — no MCP client required.

Features

  • Music Generation — Generate from prompts, custom lyrics, extend, cover, remaster, concat
  • Lyrics — Generate lyrics, mashup, optimize style descriptions
  • Media Conversion — Get MP4, WAV, MIDI, timing, extract vocals
  • Task Management — Query tasks, batch query, wait with polling
  • Custom Models — Train, inspect, generate with, and archive custom music models
  • Rich Output — Beautiful terminal tables and panels via Rich
  • JSON Mode — Machine-readable output with --json for piping
  • File Input — Read lyrics from files with @filename syntax

Quick Start

1. Get API Token

  1. Open Ace Data Cloud → Applications. Sign in, or register an account first.
  2. Find General application. If it has not been created, choose Initialize General Application. A general key can use the services available to your account; a dedicated application's key is limited to its service. Check the required service/model access and current pricing.
  3. In General application → API KEY, click the copy button marked 1 below. Use the raw token value without quotes, spaces or Bearer . A platform-... account-management token cannot replace it.

Check the key's service access and balance before submitting; task lookup permission alone does not permit generation. See the detailed key guide (English).

Copy an application API key or open Manage Keys

Save the key in the client's credential store or the environment variable shown below. Never put it in a prompt, shared workflow, screenshot, or Git commit. If authentication fails, check the full copied value, application/service access, expiration, usage limit, and balance before creating another key.

2. Install

# Install with pip
pip install suno-cli

# Or with uv (recommended)
uv pip install suno-cli

# Or from source
git clone https://github.com/AceDataCloud/SunoCli.git
cd SunoCli
pip install -e .

3. Configure

# Set your API token
export ACEDATACLOUD_API_TOKEN=your_token_here

# Or use .env file
cp .env.example .env
# Edit .env with your token

4. Generate music

suno generate "A song for Christmas" --model chirp-v6 --json

Successful response excerpt from the public music guide (delivery fields only; your IDs and songs will differ):

{
  "success": true,
  "task_id": "e72fb249-bd5b-4e2a-b20c-8a06fea5ac14",
  "trace_id": "7dbc5b6a-b2c0-4d85-9d39-fa8a8a785ccf",
  "data": [{"id": "b481b17a-bf50-4e10-8adc-4d5635050893", "title": "Under the Mistletoe", "audio_url": "https://cdn.acedata.cloud/assets/examples/fish/5ade0339-5f11-487e-aacc-06a908271706-8e3fcb0e5547.mp3", "state": "succeeded", "duration": 154.92}]
}

The excerpt shows the first song from the guide, not a guarantee of a particular model's output. Open data[].audio_url to listen. Without --async this command waits for the generated songs; see the music guide (English) for full response fields.

More examples

# Generate music from a prompt
suno generate "A happy birthday song with acoustic guitar"

# Generate with custom lyrics
suno custom -l "[Verse]\nHello world\n[Chorus]\nLa la la" -t "Hello" -s "pop, upbeat"

# Read lyrics from a file
suno custom -l @lyrics.txt -t "My Song" -s "rock, powerful"

# Generate lyrics
suno lyrics "A love song about the ocean at sunset"

# Check task status
suno task <task-id>

# Wait for completion with polling
suno wait <task-id> --interval 5

# Get MP4 video
suno mp4 <audio-id>

# List available models
suno models

Commands

Music Generation

Command Description
suno generate <prompt> Generate music from a text prompt (Inspiration Mode)
suno custom Generate with custom lyrics, title, and style
suno extend <audio_id> Extend an existing song from a timestamp
suno cover <audio_id> Create a cover/remix version
suno remaster <audio_id> Remaster a song to improve quality
suno concat <audio_id> Merge extended segments into complete audio
suno generate-persona <audio_id> Generate music using a saved persona
suno generate-persona-vox <audio_id> Generate music using a persona's vocal style
suno stems <audio_id> Separate a song into vocals + instrumental
suno all-stems <audio_id> Separate a song into all individual stems
suno replace-section <audio_id> Replace a time range with new content
suno upload-extend <audio_id> Extend uploaded audio with AI continuation
suno upload-cover <audio_id> Create a cover of uploaded audio
suno mashup <id1> <id2>... Blend multiple songs into a mashup
suno underpainting <audio_id> Add AI accompaniment to uploaded audio
suno overpainting <audio_id> Add AI vocals to uploaded audio
suno samples <audio_id> Add AI samples to uploaded audio
suno inspo <audio_id> Generate a new song inspired by an existing audio

Cover with a specified voice

cover and upload-cover accept --persona-id to select a voice. A vocal gender preference is not a substitute for the voice ID, and no extra vocal_gender is needed.

Voices created by suno voice are private resources. To cover a song with one, create the voice, upload the source song with that voice's persona_id, then pass the returned data.audio_id and the same persona ID to upload-cover. Use the same service channel for voice creation, upload and cover; do not reuse an older audio ID that was not linked to this voice.

The following commands submit API requests; replace the placeholder IDs with the values returned by the preceding step:

suno voice "https://example.com/voice.mp3" --name "My Voice" --json
suno upload "https://example.com/my-song.mp3" --mode standard --persona-id "<persona_id>" --json
suno upload-cover "<data.audio_id>" --persona-id "<persona_id>" --style "jazz, smooth piano" --async --json

upload --persona-id requires a nonempty ID and supports only --mode standard (the default), not enhanced. Save the cover task ID and use suno task or suno wait with that same ID instead of resubmitting. Voice similarity depends on the reference material and generated result.

Replace a section and review the full song

Use --lyric for the local new lyrics in the selected time range, not the whole song. For lyric edits, supply the same local text with --prompt; here it is lyrics, not a style or inspiration description. Existing lyric-only requests remain supported, but adding a prompt does not guarantee that the audio will sing every word.

The following submits a billable editing task. Replace the audio ID and times with your completed source song and its actual selection:

NEW_LYRICS=$'Evening winds across the quiet street\nWe sing the story where the rivers meet'
suno replace-section "<completed-audio-id>" --start 30 --end 50 \
  --lyric "$NEW_LYRICS" --prompt "$NEW_LYRICS" --model chirp-v6 --async --json
suno task "<returned-task-id>" --json

--result-mode full_song is the default: it returns two complete songs without another concat. After completion, inspect the task's response.data for the songs' id, audio_url and duration, then listen and select one. For manual selection before joining, use --result-mode candidates, choose a candidate's audio ID and run suno concat "<candidate-audio-id>".

Listen to the source and use suno timing "<completed-audio-id>" to help select complete musical phrases. Match the new lyrics' length and rhythm to the selection. Full-song results need not match the source duration; --duration is only a generation option and cannot lock replacement length. Returned lyric is metadata, not a transcription: it may combine full lyrics when source timing is available or be empty otherwise. Neither new words in that field nor task success proves the edit was sung correctly.

For another edit, use the chosen complete result's audio ID, not its task ID or an unjoined candidate. Recheck its duration and time range; earlier coordinates can shift. Do not reuse the entire returned lyrics as local input. If words or duration are wrong, check the selection and the other result; retain the task ID, source audio ID, request fields and result audio for support rather than expecting more polling to change completed content.

Processing request billing

Successful suno lyrics requests cost 0.08 Credits each, even when several lyric candidates are returned. Successful suno voice creation costs 0.15 Credits per request. Successful suno stems (action=stems) costs 0.56 Credits per request, with vocals and accompaniment counted together. Failed requests are not charged; applicable consumption discounts follow the actual bill. These prices do not apply to other actions such as all_stems or extract_stem.

Audio and persona availability precheck

Use the song's audio_id from a completed Suno task, not its task_id. To check a voice instead, pass --persona-id from voice creation, using the original application and caller on a creation channel that supports persona checks. Supply exactly one UUID. Both checks call authenticated POST /suno/availability synchronously, currently consume no Credits, and do not submit a generation or poll a task.

suno availability 33333333-3333-4333-8333-333333333333 --json
{
  "success": true,
  "task_id": "11111111-1111-4111-8111-111111111111",
  "trace_id": "22222222-2222-4222-8222-222222222222",
  "data": {"id": "33333333-3333-4333-8333-333333333333", "available": true}
}
suno availability --persona-id 33333333-3333-4333-8333-333333333333 --json
{
  "success": true,
  "task_id": "11111111-1111-4111-8111-111111111111",
  "trace_id": "22222222-2222-4222-8222-222222222222",
  "data": {"id": "33333333-3333-4333-8333-333333333333", "available": true}
}

These are the public guide's example responses; replace its resource UUID with your own. available: true is positive evidence, not a guarantee of later generation. A verified private clone whose associated account is offline can return HTTP 200 with available: false; recheck later. Unknown availability, including unverifiable ownership or an offline public singer-style creation account, returns 503 availability_unknown, not false. Song checks still return true only when availability is confirmed.

Invalid or conflicting IDs are rejected locally. Authentication, rate-limit and service errors exit nonzero without automatic retries. Keep returned task/trace IDs for support. --json preserves the full successful response; otherwise only data is printed. See the availability guide (English).

Audio generation and processing failures

An audio_id identifies reference music for operations such as cover, extend and stem separation. A downloadable audio file does not guarantee that its ID remains available for further processing.

HTTP status Error code Meaning
500 api_error the account may have been offline
500 suno_processing_unavailable Music processing is unavailable.
500 suno_model_unavailable The selected model is unavailable for this operation.
500 suno_processing_failed Music processing returned no audio.

The optional boolean error.retryable describes the public operation: true permits a later retry with the same parameters, false means not to retry unchanged, and an absent field is not permission to resend based on HTTP status or error text. Retry success is billed normally. The CLI displays the error and exits nonzero without automatic retries. If acceptance or delivery is uncertain, query the original task_id instead of generating again; retain its trace_id for support. A working download link does not prove that processing will succeed.

Lyrics

Command Description
suno lyrics <prompt> Generate song lyrics from a prompt
suno mashup-lyrics Generate mashup lyrics from two sources
suno optimize-style <prompt> Optimize a style description

Media Conversion

Command Description
suno mp4 <audio_id> Get MP4 video version
suno wav <audio_id> Get lossless WAV format
suno midi <audio_id> Get MIDI data
suno timing <audio_id> Get timing/subtitle data
suno vocals <audio_id> Extract vocal track

Task Management

Command Description
suno task <task_id> Query a single task status
suno tasks <id1> <id2>... Query multiple tasks at once
suno wait <task_id> Wait for task completion with polling

Custom Models

Command Description
suno custom-model-create Train a model from 6–24 authorized audio URLs
suno custom-model <model_id> Retrieve a custom model
suno custom-models List custom models for the current application
suno custom-model-generate <model_id> Generate a song with a ready custom model
suno custom-model-delete <model_id> Archive a custom model

Utilities

Command Description
suno persona <audio_id> Create a saved voice style
suno personas List saved voice styles
suno persona-delete <persona_id> Delete a saved voice style
suno voice <audio_url> Create a voice style from an external voice recording
suno upload <audio_url> Upload external audio for processing
suno availability [audio_id] [--persona-id <uuid>] Check exactly one song or persona synchronously
suno models List available Suno models
suno actions List available API actions
suno lyric-format Show lyrics formatting guide
suno config Show current configuration

suno personas --user-id <user_id> (GET /suno/persona) and suno persona-delete <persona_id> (DELETE /suno/persona) are free of charge. They still require an API token, but no additional billing-exemption header. Creating a persona with suno persona <audio_id> --name "My Voice" (POST /suno/persona) remains billed according to the API pricing rules.

Global Options

--token TEXT    API token (or set ACEDATACLOUD_API_TOKEN env var)
--version       Show version
--help          Show help message

Most commands support:

--json          Output raw JSON (for piping/scripting)
--model TEXT    Suno model version (default: chirp-v6)

The generate and custom commands also support:

--duration INT  Target track length in seconds

--negative-style maps to the API's negative_tags field for custom generation (suno custom, which sends custom: true) and is also supported by replace-section. There is currently no fixed character limit for this field, but overly long input may still fail; keep it concise. The option on suno generate is preserved, but that command does not enable custom mode.

suno custom -l @lyrics.txt -t "My Song" -s "pop, upbeat" --negative-style "metal, harsh vocals"

Processing boundaries and Inspo controls

extend and upload-extend require a positive --continue-at; fractional seconds such as 30.792 are preserved. Lyrics guide only the new segment after that boundary, not the earlier song. samples --end is required and must exceed --start (default: 0). Replacement start/end are required, start is nonnegative, and end must exceed start. End times must not exceed the source duration.

inspo accepts 1–4 --audio-url references without requiring a positional audio ID. It supports --instrumental, --persona-id, --custom and --lyric-prompt; auto-lyrics apply when custom mode has no lyrics. Use only authorized references. Persona IDs identify voices, not songs. Persona-based generation and covers use the voice ID; extension does not use an extra persona ID. Inspo/mashup voice support depends on the selected service channel.

suno extend <audio-id> --continue-at 30.792 --lyric "[Verse] New lyrics"
suno replace-section <audio-id> --start 0 --end 10.5 --negative-style "metal"
suno inspo --audio-url https://example.com/authorized.mp3 --instrumental --async --json

duration is used only by the API's generate action (including the CLI's generate and custom commands), is an integer from 10–360 seconds, and remains a target rather than guaranteed output length. For all-stems, playable URLs while processing do not mean every stem is complete; wait for the successful terminal task outcome before using the complete set.

Scripting & Piping

The --json flag outputs machine-readable JSON suitable for piping:

# Generate and extract task ID
TASK_ID=$(suno generate "rock song" --json | jq -r '.task_id')

# Wait for completion and get audio URL
suno wait $TASK_ID --json | jq -r '.data[0].audio_url'

# Batch generate from a file of prompts
while IFS= read -r prompt; do
  suno generate "$prompt" --json >> results.jsonl
done < prompts.txt

Available Models

Model Version Max Duration Notes
chirp-v6 V6 — Latest, best quality (default)
chirp-v6-wild V6 Wild — V6 wild variant
chirp-v6-mini V6 Mini — V6 compact variant
chirp-v5-5 V5.5 8 min High quality
chirp-v5 V5 8 min High quality
chirp-v4-5-plus V4.5+ 8 min Enhanced quality
chirp-v4-5 V4.5 4 min Vocal gender control
chirp-v4 V4 150s Stable
chirp-v3-5 V3.5 120s Fast
chirp-v3-0 V3 120s Legacy

Configuration

Environment Variables

Variable Description Default
ACEDATACLOUD_API_TOKEN API token from AceDataCloud Required
ACEDATACLOUD_API_BASE_URL API base URL https://api.acedata.cloud
SUNO_DEFAULT_MODEL Default model chirp-v6
SUNO_REQUEST_TIMEOUT Timeout in seconds 1800

Development

Setup Development Environment

# Clone repository
git clone https://github.com/AceDataCloud/SunoCli.git
cd SunoCli

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # or `.venv\Scripts\activate` on Windows

# Install with dev dependencies
pip install -e ".[dev,test]"

Run Tests

# Run unit tests
pytest

# Run with coverage
pytest --cov=suno_cli

# Run integration tests (requires API token)
pytest tests/test_integration.py -m integration

Code Quality

# Format code
ruff format .

# Lint code
ruff check .

# Type check
mypy suno_cli

Build & Publish

# Install build dependencies
pip install -e ".[release]"

# Build package
python -m build

# Upload to PyPI
twine upload dist/*

Docker

# Pull the image
docker pull ghcr.io/acedatacloud/suno-cli:latest

# Run a command
docker run --rm -e ACEDATACLOUD_API_TOKEN=your_token \
  ghcr.io/acedatacloud/suno-cli generate "A happy song"

# Or use docker-compose
docker compose run --rm suno-cli generate "A happy song"

Project Structure

SunoCli/
├── suno_cli/               # Main package
│   ├── __init__.py
│   ├── __main__.py        # python -m suno_cli entry point
│   ├── main.py            # CLI entry point
│   ├── core/              # Core modules
│   │   ├── client.py      # HTTP client for Suno API
│   │   ├── config.py      # Configuration management
│   │   ├── exceptions.py  # Custom exceptions
│   │   └── output.py      # Rich terminal formatting
│   └── commands/          # CLI command groups
│       ├── generate.py    # Music generation commands (12 commands)
│       ├── lyrics.py      # Lyrics & style commands
│       ├── media.py       # Media conversion commands
│       ├── persona.py     # Persona & upload commands
│       ├── task.py        # Task management commands
│       └── info.py        # Info & utility commands
├── tests/                  # Test suite (80+ tests)
├── .github/workflows/      # CI/CD (lint, test, publish to PyPI)
├── Dockerfile             # Container image
├── deploy/                # Kubernetes deployment configs
├── .env.example           # Environment template
├── pyproject.toml         # Project configuration
└── README.md

Suno CLI vs MCP Suno

Feature Suno CLI MCP Suno
Interface Terminal commands MCP protocol
Usage Direct shell, scripts, CI/CD Claude, VS Code, MCP clients
Output Rich tables / JSON Structured MCP responses
Automation Shell scripts, piping AI agent workflows
Install pip install suno-cli pip install mcp-suno

Both tools use the same AceDataCloud API and share the same API token.

API Reference

This tool wraps the AceDataCloud Suno API:

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing)
  5. Open a Pull Request

License

MIT License - see LICENSE for details.


Made with ❤️ by AceDataCloud

Metadata

Release files for suno-cli 2026.11.29.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for suno-cli 2026.11.29.0
File Size Uploaded Provenance Actions
suno_cli-2026.11.29.0.tar.gz 48.0 kB Without provenance Details for suno_cli-2026.11.29.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for suno-cli 2026.11.29.0
File Interpreter ABI Platform Actions
suno_cli-2026.11.29.0-py3-none-any.whl Python 3 none any Details for suno_cli-2026.11.29.0-py3-none-any.whl

Total release size: 81.2 kB

Release files / suno_cli-2026.11.29.0.tar.gz

Download URL suno_cli-2026.11.29.0.tar.gz
Size 48.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0ecbd4e95d12491227f70d689aec05e8bff5c4da4bf2e4c11324aa9588a2becc
BLAKE2b-256 checksum
How to use checksums
d47f5d406d87a67672169f83c2fc8372840256d4702f2e53bb17cc69003aef10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / suno_cli-2026.11.29.0-py3-none-any.whl

Download URL suno_cli-2026.11.29.0-py3-none-any.whl
Size 33.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e43fab73a00c95c4e163ab45285603097b77a16557ec5815353e4763f305395
BLAKE2b-256 checksum
How to use checksums
1cee25d81d5cdcb05097cb694632644ea424e439011411caf3299eec41e211e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for suno-cli 2026.11.29.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2026.11.29.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page