apimaxDocs
DocsPricingConsole
API ReferenceIntegration GuideUser GuideChangelog

Music Series

POSTRelink Audio URLsPOSTUpsample Style TagsGETGet Style Inspiration SuggestionsPOSTGet MIDIPOSTGet Lyrics TimingPOSTSubmit a Lyrics Generation TaskPOSTGet Lossless WAV AudioPOSTGet MP4 VideoPOSTCrop an Audio ClipPOSTAdd Fade In/OutPOSTAdjust Audio SpeedPOSTRemaster or UpsamplePOSTGet Downbeat AnalysisPOSTReverse Audio PlaybackPOSTGet Waveform Aggregates

Image Series

Video series

Task Management

Error Code ReferenceQuery Task StatusGET

Account Management

Query Quota UsageGET

Docs / Music Series / Suno / Utilities

UtilitiesPOSTSunoLYRICSLyricssuno_lyrics

Submit a Lyrics Generation Task

Submit a LYRICS task that generates one set of lyrics from a prompt.

POSThttps://api.apimax.ai/v1/music/lyrics
Try it
Bearer API KeyJSONServer-side call

Purpose#

Submit a lyrics generation (LYRICS) task. This endpoint invokes Suno's standalone lyrics capability to generate a piece of lyric text from a prompt, and is often used to polish the lyrics before composing the song.

The endpoint is asynchronous: once validation passes, the service immediately returns a public task_id and does not wait for the task to finish. Poll the task status and result afterwards with GET /v1/tasks/:id.

LYRICS only cares about a single field: prompt. Each task returns one set of lyrics: in the query result, data is a single object, not a list of candidates.

Request Fields#

FieldTypeRequiredDefaultDescription
promptstringYes—The lyric generation prompt describing the theme, mood, or style. Leaving it empty or whitespace-only returns 400 with error.message set to prompt_empty
callback_urlstringNo—Callback URL notified when the task reaches a terminal state
modelstringNosuno_lyricsModel name. It does not need to be sent; if sent it must be suno_lyrics, and any other model is rejected

prompt is required. If the request body is missing prompt or its value is an empty or whitespace-only string, the endpoint returns 400 (with error.message set to prompt_empty) and no task is created.

callback_url must be a publicly accessible HTTPS URL no longer than 2048 characters. Local, intranet, loopback, and link-local addresses are prohibited, as are domains that resolve to such addresses. An invalid URL does not fail the submission, but the task receives no callback.

When the task completes or fails, the service sends a POST with a JSON payload to this URL. The receiving endpoint must return any 2xx status code within 10 seconds; timeouts, network errors, and non-2xx responses are all treated as failures.

After a failure, the service retries after 1, 2, and 4 seconds respectively, sending the request at most 4 times including the first attempt. The receiver should use the task ID for idempotent processing to avoid handling duplicates.

Example callback payload (note that the callback status is the uppercase SUCCESS / FAILURE, unlike the query endpoint's completed / failed):

json
{
  "task_id": "task_9ZVk0sGXDUQ3nOE8hS3t679E8YnwoG0E",
  "status": "SUCCESS",
  "data": {
    "id": "f6a26010-7745-40b7-ab43-f104a5073305",
    "status": "complete",
    "title": "漫长的季节",
    "text": "[Verse 1]\n秋风吹过老街\n..."
  },
  "platform": "suno",
  "model": "suno_lyrics",
  "progress": "100%",
  "created": 1795400785,
  "finished_at": 1795400796,
  "timestamp": 1795400800
}

Request Example#

cURL
curl --request POST \
  --url https://api.apimax.ai/v1/music/lyrics \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "prompt": "Write Chinese pop lyrics about a summer-night city walk, with a gentle, slightly nostalgic mood"
  }'

Success Response#

200
{
  "id": "task_9ZVk0sGXDUQ3nOE8hS3t679E8YnwoG0E",
  "task_id": "task_9ZVk0sGXDUQ3nOE8hS3t679E8YnwoG0E",
  "status": "queued",
  "model": "suno_lyrics",
  "created_at": 1795400785
}

Response Fields#

FieldTypeDescription
task_idstringPublic task ID, used for subsequent queries and callbacks
idstringSame value as task_id
statusstringAlways queued right after submission
modelstringModel name, always suno_lyrics
created_atintegerTask creation time (Unix seconds)

Error Response#

Errors use the structure below, where error.code is the error code and error.message is the specific reason:

400
{
  "error": {
    "code": "plugin_request_invalid",
    "message": "prompt_empty",
    "type": "max_api_error"
  }
}
HTTPerror.codeerror.messageScenario
400plugin_request_invalidprompt_emptyprompt is missing, empty, or whitespace-only
400plugin_request_invalidmodel_action_mismatch: ...model is set to a model other than suno_lyrics
400invalid_requestThe parse errorThe request body is not a valid JSON object
503model_not_foundNo available channel (includes group and model name)model does not exist, or no channel is currently available
502plugin_submit_response_failedThe message returned upstreamThe upstream task service rejected the submission

Querying the Task Result#

After a successful submission, poll with the returned task_id:

  • Single task query: GET /v1/tasks/:id

status Enum#

ValueDescription
queuedTask created, waiting to be processed
in_progressTask is being processed
completedTask finished; data is readable
failedTask failed; error is readable

completed and failed are terminal states; keep polling for any other status.

When a task fails, error.message is the reason. Some prompts are rejected upstream (in testing, very short prompts beginning with “write one line of…”): the task turns failed about 10 seconds after submission with error set to {"code": "upstream_error", "message": "Prompt likely malformed"}, and the charge is refunded.

Response Fields#

FieldTypeDescription
idstringPublic task ID
objectstringAlways task
modelstringModel name, always suno_lyrics
platform / typestringAlways suno
statusstringTask status; see the enum above
progressintegerProgress percentage, 0–100
created_atintegerSubmission time (Unix seconds)
started_atintegerProcessing start time (Unix seconds); omitted until the task starts
finished_atintegerFinish time (Unix seconds); omitted until the task finishes
dataobjectLyrics result; returned only when completed
errorobjectFailure details; returned only when failed, with code and message

Lyrics Result Fields (data)#

data is a single object, not an array:

FieldTypeDescription
idstringLyric record ID (a UUID generated upstream, not the task ID)
statusstringLyrics generation status; complete when finished
titlestringLyrics title
textstringGenerated lyrics body, with structure markers such as [Verse] and [Chorus]

Below is a complete query response example of a successful task (text truncated):

json
{
  "id": "task_9ZVk0sGXDUQ3nOE8hS3t679E8YnwoG0E",
  "object": "task",
  "type": "suno",
  "platform": "suno",
  "status": "completed",
  "progress": 100,
  "model": "suno_lyrics",
  "created_at": 1795400785,
  "started_at": 1795400785,
  "finished_at": 1795400796,
  "data": {
    "id": "f6a26010-7745-40b7-ab43-f104a5073305",
    "status": "complete",
    "title": "漫长的季节",
    "text": "[Verse 1]\n秋风吹过老街\n枯叶跳舞不停歇\n老照片泛黄了边\n故事讲了一整夜\n\n[Chorus]\n漫长的季节啊\n心里的雪花\n不融化\n..."
  }
}

The generated lyrics body (data.text) can be passed as the lyrics field of the music generation task (custom-lyrics mode, which also requires title and style) to enter the formal composition flow.

Next steps

All docs
Upsample Style TagsPolish and expand style tags and lyrics into a fuller style description.Get Style Inspiration SuggestionsGet random style or inspiration suggestions from the Suno upstream.Method 1: Create a Voice from an Existing SongCreate a vocal voice directly from a song clip already generated in this pool.Upload AudioImport user audio as a Suno-owned clip; returns an async upload task ID. With copyright=true the request switches to the copyright pipeline.Get MIDIRetrieve a MIDI file for a clip generated by this service.Get Lyrics TimingGet the lyric alignment timing of a generated clip.
On this page
OverviewPurposeRequest FieldsRequest ExampleSuccess ResponseResponse FieldsError ResponseQuerying the Task Resultstatus EnumResponse FieldsLyrics Result Fields (data)Next steps
API

POST /v1/music/lyrics