You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v0.5.2 — fix generation against new /api/generate/v2-web/ endpoint
Suno migrated their generation endpoint server-side: `/api/generate/v2/`
now returns `Token validation failed.` for everything, while the live
web app posts to `/api/generate/v2-web/` with a substantially extended
body schema. Captured the new request shape from a real browser session,
ported the CLI to match, and end-to-end verified generate → wait →
download → MP3 with embedded ID3/lyrics tags.
API changes
- POST `/api/generate/v2-web/` (was `/api/generate/v2/`)
- New required body: `negative_tags` (empty string default),
`user_uploaded_images_b64`, `metadata.{web_client_pathname,
is_max_mode, is_mumble, create_mode, user_tier, create_session_token,
disable_volume_normalization}`, `override_fields`, `cover_start_s`,
`cover_end_s`, `artist_clip_id`, `artist_start_s`, `artist_end_s`,
`continued_aligned_prompt`, `transaction_uuid`
- `gpt_description_prompt` and `task` fields are gone — describe mode
now uses `create_mode: "inspiration"` with the prompt in the same
`prompt` field as custom mode
- `create_session_token` and `transaction_uuid` are random UUIDs per
request (verified server-side does not validate them)
- `user_tier` is also not validated server-side (verified with empty
string and arbitrary text — both succeed) so we send empty string
JWT staleness fix
- Suno's generation endpoint silently rejects JWTs older than ~30 min
with `Token validation failed.` even when the JWT's own `exp` claim
says it's still valid. Auto-refresh threshold widened from 30s to
30min so every cold-start command lands with a fresh token.
- `Token validation failed` body pattern now maps to `CliError::AuthExpired`
so the user gets the right hint instead of an opaque API dump.
Separate `suno credits` fix
- `RemasterModelInfo.can_use` is missing from billing/info responses
in the wild — added `#[serde(default)]` so deserialization stops
failing with "error decoding response body".
New `suno update` command
- Self-update from GitHub Releases via the `self_update` crate, ported
from the agent-cli-framework reference implementation.
- `suno update --check` (peek) and `suno update` (install) both return
the standard JSON envelope. Added to agent-info commands list.
Schema-drift error mapper
- `check_response()` now detects pydantic-style `loc: ['body','params'…]`
failures and returns `CliError::Api { code: "schema_drift" }` with a
suggestion to run `suno update`. Future schema changes will surface
the right action automatically.
Cover / remaster (best-effort port)
- Both still route through `/api/generate/v2-web/` but with `cover_clip_id`
set instead of the legacy `task: "cover"` field. NOT verified against
the real web app — separate captures still needed for those flows.
Cleanup
- Removed the dead `check_captcha()` helper. Its field-name check
(`captcha_required`) was wrong anyway — Suno's `/api/c/check` returns
`{"required": ...}`, not `{"captcha_required": ...}`, so the warning
it gated never fired.
README + SKILL.md updated to mention `suno update` and the new endpoint.
Codex review (gpt-5.4 xhigh) approved the patch with two notes that have
been addressed (captcha helper removed cleanly, schema_drift mapper added).
Verified end-to-end:
- `suno credits` → success JSON
- `suno generate --instrumental --wait --download` → 2 complete MP3s
- `suno generate --lyrics-file --wait --download` → 2 complete MP3s
with prompt embedded in metadata
- `suno info`, `suno list`, `suno models`, `suno agent-info` → success
- `suno update --check` → reports current 0.5.2 vs latest 0.5.1
Copy file name to clipboardExpand all lines: README.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,17 @@ cargo install suno
53
53
54
54
Download from [GitHub Releases](https://github.com/199-biotechnologies/suno-cli/releases) — binaries for macOS (Apple Silicon + Intel), Linux (x86_64 + ARM), and Windows.
55
55
56
+
### Self-update
57
+
58
+
Already have `suno` installed? Pull the latest binary from GitHub Releases without touching your package manager:
59
+
60
+
```bash
61
+
suno update --check # see what's available
62
+
suno update # install the latest release
63
+
```
64
+
65
+
> Tip: when Suno changes their API mid-cycle, run `suno update` first — it's faster than `cargo install suno` or waiting for the Homebrew bottle to refresh.
66
+
56
67
## Quick Start
57
68
58
69
```bash
@@ -128,6 +139,7 @@ suno auth Set up authentication
- Captcha is **not** required for Premier accounts with 200+ credits consumed.
188
-
- All generation paths (normal, voice persona, cover, extend) go through `/api/generate/v2/` with different `task` values — but you don't need to know that, just use the subcommands.
188
+
- All generation paths (normal, voice persona, cover, extend) go through `/api/generate/v2-web/` — but you don't need to know that, just use the subcommands.
189
+
- When the CLI returns `schema_drift` (Suno changed their API), run `suno update` to pull the latest binary from GitHub Releases.
189
190
- When unsure about flags, run `suno <command> --help` or `suno agent-info`.
0 commit comments