Tunova

Migrating from PiAPI (Suno) to Tunova

PiAPI dropped Suno. If your app called PiAPI’s task API for Suno music, it needs a new backend. Tunova is a drop-in managed Suno API: it runs the Suno accounts, exposes a stable REST (and MCP) API, and — unlike a per-credit hub — only bills you when a render actually delivers. This guide maps PiAPI’s shape to Tunova’s so you can move in under an hour.

The shape is the same: create → poll/webhook

Both APIs are async. With PiAPI you POSTed a unified task and then GET-polled it by task_id. Tunova is the same two calls — a job instead of a task — plus an optional signed webhook so you can drop the polling loop entirely.

Endpoint mapping

What you did on PiAPIOn Tunova
Auth header (API key)X-API-Key: sk_live_…
Create task (Suno generate)POST /api/generate — body {prompt, model?, make_instrumental?, callback_url?}202 {job_id}
Create task with your own lyricsPOST /api/custom_generate{prompt: lyrics, tags, title, …}
Get task by id (poll)GET /api/jobs/{id}{status, clips:[{audio_url, duration}]}
(no native push)pass callback_url → HMAC-signed webhook on completion
List your tasksGET /api/jobs?limit=50
Check credit balanceGET /api/me{token_balance, song_cost, lyrics_cost}
Lyrics generationPOST /api/lyrics{prompt} (2 tokens)

Three real differences (in your favor)

  • Billed only on success. A failed render is auto-refunded to your token balance as its own ledger line — no per-credit charge for output you never got. Why that matters.
  • Signed webhooks + idempotency. Completion is delivered as an X-Webhook-Signature: sha256=… HMAC over <timestamp>.<body>; a retried submit with the sameIdempotency-Key returns the same job (no double charge). See the webhooks guide.
  • Agent-native. A hosted MCP server, llms.txt, OpenAPI, and a per-request X-Request-Id on every response — so an AI agent (or your support thread) has what it needs in one call.

Drop-in code

# 1 — submit (was: POST PiAPI /api/v1/task). Returns 202 + a job_id; costs 10 tokens, settled on success. curl https://api.tunova.ai/api/generate \ -H "X-API-Key: $TUNOVA_API_KEY" \ -H "Content-Type: application/json" \ -d '{"prompt":"calm rainy-night lofi","model":"v5.5","callback_url":"https://you.app/hooks/tunova"}' # → {"job_id":"8f3a…","status":"queued","status_url":"/api/jobs/8f3a…"} # 2 — poll (was: GET PiAPI /api/v1/task/{task_id}) — or skip polling and use the webhook above. curl https://api.tunova.ai/api/jobs/8f3a… -H "X-API-Key: $TUNOVA_API_KEY" # → {"status":"complete","clips":[{"audio_url":"https://…mp3","duration":187.4}]} # a failed render auto-refunds the 10 tokens — you never pay for it.

Same two steps you already had on PiAPI — new base URL, new auth header, job_id instead oftask_id. Prefer a higher-level call? The zero-dependency Python & Node SDKswrap submit → wait → audio URL (and verify the webhook) in one function.

Get moving

Every account starts with 50 free tokens, no card (≈ 5 songs), so you can port and smoke-test before you top up (crypto; tokens never expire). Models v4.5 / v5 / v5.5. See the quickstart (cURL / Python / Node / MCP), or grab a key.

FAQ

Did PiAPI remove its Suno API?

Yes. PiAPI discontinued its Suno music endpoint and now points users elsewhere. If your integration called PiAPI's task API for Suno, it needs a new backend — Tunova is a drop-in replacement that runs the Suno accounts for you.

How hard is the migration?

Small. Both APIs are async: you create a task/job, then poll or receive a webhook. You swap the base URL and auth header, map one create-call and one status-call, and adjust field names. Most integrations move in well under an hour.

What's different about billing?

PiAPI charged per credit regardless of outcome. Tunova is billed in tokens on success only — a failed render is automatically refunded to your balance, posted as its own ledger line. You never pay for a render that didn't deliver.

Do I have to poll, or are there webhooks?

Both. Poll GET /api/jobs/{id} until status is complete, or pass a callback_url and Tunova POSTs an HMAC-SHA256-signed webhook the moment the job settles — lower latency and no polling loop.

Is there an MCP server for agents?

Yes. Tunova exposes a hosted MCP server at https://api.tunova.ai/mcp (tools generate_song / wait_for_song / check_song), so a Claude/Cursor agent can make music in one tool call with the same API key.

Tunova is an independent service, not affiliated with or endorsed by Suno or PiAPI. “Suno” and “PiAPI” are trademarks of their respective owners.