Idempotency-Keyheader · OptionalUnique key for one logical write. Retrying the same body with the same key replays the original result; reusing it with a different body returns 409.
Maximum characters: 255./api/v1/lyrics/generateAuthentication · x-api-key
Create a GPT lyrics-generation task, persist it through the unified task pipeline, and wait briefly for the completed result.
Idempotency-Keyheader · OptionalUnique key for one logical write. Retrying the same body with the same key replays the original result; reusing it with a different body returns 409.
Maximum characters: 255.Unknown fields are not accepted.
promptRequiredCore song brief, story, scene, or hook idea.
Maximum characters: 2000.
configOptionalStandard task configuration: priority, tags, metadata, and webhookUrl.
config.metadataOptionalFree-form caller metadata, echoed back on read. Stored as opaque JSON; the server never mutates it.
config.priorityOptionalTask priority 1-10 (higher = sooner). Default 5.
Minimum: 1. Maximum: 10. Default: 5.
config.webhookUrlOptionalURL to receive task.* lifecycle events via the central webhook service.
Format: uri.
durationSecOptionalTarget duration in seconds.
Minimum: 30. Maximum: 480.
explicitOptionalWhether explicit language is acceptable.
extraGuidanceOptionalAdditional creative guidance or constraints.
Maximum characters: 2000.
genreOptionalRequested musical genre direction.
Maximum characters: 200.
languageOptionalPrimary lyric language. Use 'auto' to let the model decide.
Maximum characters: 80.
languagesOptionalAdditional languages to include or consider.
languages[]Each itemAdditional languages to consider for multilingual lyrics.
Maximum characters: 80.
modeOptionalLyrics generation mode. GPT is the supported mode.
moodOptionalRequested musical or visual mood.
Maximum characters: 200.
multilingualModeOptionalHow multiple languages should be mixed.
negativeConstraintsOptionalTopics, styles, or tropes the output should avoid.
negativeConstraints[]Each itemStyles, topics, or tropes to avoid.
Maximum characters: 80.
perspectiveOptionalRequested lyric narrative perspective.
structureOptionalRequested lyric section order.
structure[]Each itemRequested section order, e.g. Verse 1, Chorus, Bridge.
Maximum characters: 50.
themeKeywordsOptionalShort theme keywords to anchor the lyrics.
themeKeywords[]Each itemMaximum characters: 60.
vocalStyleOptionalRequested vocal performance direction.
Maximum characters: 200.
application/json
creditsChargedRequiredhookRequiredlanguagePlanRequiredlanguagePlan.mixStrategyRequiredlanguagePlan.primaryLanguageRequiredlanguagePlan.secondaryLanguagesRequiredlanguagePlan.secondaryLanguages[]Each itemlanguagePlan.transliterationRequiredMay be null. Must match at least one alternative.
languagePlan.transliteration · anyOf 1AlternativelanguagePlan.transliteration · anyOf 2AlternativelyricsRequiredmodelRequiredmodelPathRequirednotesRequirednotes[]Each itemproducerRequiredproducer.lyricsRequiredproducer.soundPromptRequiredproducer.titleRequiredsectionOrderRequiredsectionOrder[]Each itemstatusRequiredsunoRequiredsuno.promptRequiredsuno.titleRequiredtaskIdRequiredtitleRequiredusageOptionalusage.completionTokensOptionalusage.promptTokensOptionalusage.totalTokensOptionalapplication/json
application/json
errorRequirederror.codeRequiredApplication-specific error code (see error catalog)
error.messageRequiredHuman readable error message
error.detailsOptionalAdditional error details (optional)
successRequiredAlways false for error responses
application/json
errorRequirederror.codeRequiredApplication-specific error code (see error catalog)
error.messageRequiredHuman readable error message
error.detailsOptionalAdditional error details (optional)
successRequiredAlways false for error responses
application/json
errorRequirederror.codeRequiredApplication-specific error code (see error catalog)
error.messageRequiredHuman readable error message
error.detailsOptionalAdditional error details (optional)
successRequiredAlways false for error responses
Forbidden: the API key lacks the required scope or its IP policy rejects this request. Forbidden: API-key scope/IP restrictions or billing hold. A positive balance does not bypass payment review. Check GET /api/v1/account/credits billingStatus before further paid requests.
application/json
errorRequirederror.codeRequiredApplication-specific error code (see error catalog)
error.messageRequiredHuman readable error message
error.detailsOptionalAdditional error details (optional)
successRequiredAlways false for error responses
application/json
errorRequirederror.codeRequiredApplication-specific error code (see error catalog)
error.messageRequiredHuman readable error message
error.detailsOptionalAdditional error details (optional)
successRequiredAlways false for error responses
Request allowance or task admission capacity exceeded. Follow Retry-After when present; otherwise wait for active tasks and use bounded backoff. Limits do not guarantee throughput. For SSE, this is the HTTP connection response, not an event.
application/json
errorRequirederror.codeRequiredRATE_LIMITED for request and task admission rejections.
error.messageRequirederror.detailsOptionalOptional and scope-dependent. Request limits supply scope/policy/type/limit/current/retryAfterSec. Task admission supplies inFlight/limit/tier, plus scope=apiKey for a key cap. IP rejection can omit details. In-flight rejection does not promise Retry-After.
error.details.currentOptionalMinimum: 0.
error.details.inFlightOptionalMinimum: 0.
error.details.limitOptionalMinimum: 0.
error.details.policyOptionalerror.details.retryAfterSecOptionalMinimum: 1.
error.details.scopeOptionalerror.details.tierOptionalerror.details.typeOptionalsuccessRequiredDefault: false.
application/json
errorRequirederror.codeRequiredApplication-specific error code (see error catalog)
error.messageRequiredHuman readable error message
error.detailsOptionalAdditional error details (optional)
successRequiredAlways false for error responses
application/json
errorRequirederror.codeRequiredApplication-specific error code (see error catalog)
error.messageRequiredHuman readable error message
error.detailsOptionalAdditional error details (optional)
successRequiredAlways false for error responses
application/json
errorRequirederror.codeRequiredApplication-specific error code (see error catalog)
error.messageRequiredHuman readable error message
error.detailsOptionalAdditional error details (optional)
successRequiredAlways false for error responses