♪Suno API Guide

Suno API batch generation without duplicate charges

A batch is a queue with a budget, not a loop that fires hundreds of requests. The difference shows up in your bill.

There is no batch endpoint

Each generation is its own request and returns two tracks. A batch is your own job table around those requests: one row per track, a stable request id, the provider task id, and a status. Do not treat a loop over 100 prompts as one operation you can retry.

A queue that survives restarts

WorkerJobGuard
SubmitSend one generation and store the task idCap in-flight requests
PollQuery every 3–5 seconds until terminalOne poller per task
DownloadFetch a fresh media URL and store the fileIdempotent by task id
ReconcileFind rows with no terminal stateRun after restarts

Dedupe and storage

Make your request id unique in the database. On a timeout, query the existing task instead of inserting a new row. When the task completes, download immediately and store the file in your own bucket; keep the task id, not the temporary media URL, as the permanent reference.

常见问题 / FAQ

Can I send 100 generations at once?

Start with a small number in flight and watch 429s. Queue the rest; more parallel requests do not make renders finish sooner.

How do I know which item failed?

Track one row per track with its task id and terminal status. Failed tasks are refunded and should not be retried blindly.

Do I need separate workers?

Not necessarily, but separating submit, poll and download makes rate limits and retries much easier to reason about.

Is there an official Suno API? What you can actually use, and what it costs.
注册只需要邮箱,一次生成 0.6 元出 2 首,MP3 与 WAV 下载不限次。
See the task lifecycle