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.
Scope: task:create
Billing and effects: Paid operation: credits are authorized when the Task is accepted. Review the quote or preflight and save the receipt.
Recovery: Save one Idempotency-Key with the exact request body before submission. Reuse both after an uncertain response.
Follow this operation’s workflow → · All permission rulesIdempotency-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.Content-Type: application/json · Required body
Required fields apply within their object and selected option. An optional object may be absent; when present, its required fields must be included. Required and nullable are independent: null is allowed only where listed.
Only the listed fields are accepted in this object.
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.metadata[key]Each valueKey pattern: ^(.*)$.
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.
Read the HTTP status and body together. A receipt confirms acceptance; poll the returned Task or product view for terminal execution and media delivery. Example IDs and credit amounts are illustrative, not a price quote.
Complete JSON example (optional fields may be omitted).
{ "success": false, "error": { "code": "INVALID_API_KEY", "message": "Invalid API key" }}application/json
Required fields apply within their object and selected option. An optional object may be absent; when present, its required fields must be included. Required and nullable are independent: null is allowed only where listed.
creditsChargedRequiredCredits charged as reported by this view. Task creditsCharged is final net debit; operation ledger charged is gross, with refunded and net reported separately. Do not subtract a refund twice.
hookRequiredMain memorable lyric phrase generated for the song, typically the chorus hook.
languagePlanRequiredGenerated plan for language use in the lyrics; it describes the result rather than changing the request.
languagePlan.mixStrategyRequiredHuman-readable explanation of how the languages are distributed or blended across sections.
languagePlan.primaryLanguageRequiredMain language used in the generated lyrics.
languagePlan.secondaryLanguagesRequiredAdditional languages included in the lyric package; empty for a single-language result.
languagePlan.secondaryLanguages[]Each itemlanguagePlan.transliterationRequiredTransliteration guidance returned by the lyric model, or null when none is supplied.
May be null.
lyricsRequiredComplete generated lyric text including section markers; this endpoint does not synthesize audio.
modelRequiredModel identifier reported by the lyric-generation result.
modelPathRequiredResolved provider/model/feature route used to create the lyric Task; also returned while processing continues.
notesRequiredCreative and production suggestions accompanying the generated lyric package.
notes[]Each itemproducerRequiredProvider-neutral package for downstream music production: title, lyrics and a sound/style brief.
producer.lyricsRequiredLyric text prepared for downstream music production.
producer.soundPromptRequiredNatural-language description of the intended instrumentation, vocals, mood and sound.
producer.titleRequiredSuggested title in the downstream production package.
sectionOrderRequiredOrdered section labels in the generated song, such as Verse 1, Chorus and Bridge.
sectionOrder[]Each itemstatusRequiredState of the object containing this field. Use its listed values; operation acceptance, Task completion and media delivery are separate states.
sunoRequiredSuggested Suno input package; generating these suggestions does not submit a Suno song request.
suno.promptRequiredSection-marked lyric text intended for the Suno custom-lyrics prompt.
suno.titleRequiredSuggested Suno song title.
taskIdRequiredOperation Task identifier. Save it before polling; a receipt does not mean the operation has completed.
titleRequiredTitle generated for this lyric package.
usageOptionalOptional language-model token usage reported for this generation; not a separate credit charge.
usage.completionTokensOptionalNumber of output tokens reported by the lyric model, when available.
usage.promptTokensOptionalNumber of input tokens reported by the lyric model, when available.
usage.totalTokensOptionalTotal input and output tokens reported by the lyric model, when available.
application/json
Required fields apply within their object and selected option. An optional object may be absent; when present, its required fields must be included. Required and nullable are independent: null is allowed only where listed.
creditsRequiredRequiredCredits required for this operation. A quote is an estimate; an accepted Task records its authorized charge.
messageRequiredHuman-readable explanation. Wording may change; use the machine-readable code for programmatic decisions.
modelPathRequiredResolved provider/model/feature route used to create the lyric Task; also returned while processing continues.
pollUrlRequiredRead URL for the accepted operation. Poll this existing operation instead of resubmitting work.
statusRequiredState of the object containing this field. Use its listed values; operation acceptance, Task completion and media delivery are separate states.
taskIdRequiredOperation Task identifier. Save it before polling; a receipt does not mean the operation has completed.
application/json
Required fields apply within their object and selected option. An optional object may be absent; when present, its required fields must be included. Required and nullable are independent: null is allowed only where listed.
errorRequiredStructured failure information. Branch on code, show message, and interpret details only for that code. The request ID is returned in the X-Request-Id header.
error.codeRequiredApplication-specific error code (see error catalog)
error.messageRequiredHuman readable error message
error.detailsOptionalOptional error-specific context. Read code first; details keys depend on that code. Unknown keys must not break error handling. See /resources/errors/.
error.details[key]Each valueKey pattern: ^(.*)$.
successRequiredAlways false for error responses
application/json
Required fields apply within their object and selected option. An optional object may be absent; when present, its required fields must be included. Required and nullable are independent: null is allowed only where listed.
errorRequiredStructured failure information. Branch on code, show message, and interpret details only for that code. The request ID is returned in the X-Request-Id header.
error.codeRequiredApplication-specific error code (see error catalog)
error.messageRequiredHuman readable error message
error.detailsOptionalOptional error-specific context. Read code first; details keys depend on that code. Unknown keys must not break error handling. See /resources/errors/.
error.details[key]Each valueKey pattern: ^(.*)$.
successRequiredAlways false for error responses
application/json
Required fields apply within their object and selected option. An optional object may be absent; when present, its required fields must be included. Required and nullable are independent: null is allowed only where listed.
errorRequiredStructured failure information. Branch on code, show message, and interpret details only for that code. The request ID is returned in the X-Request-Id header.
error.codeRequiredApplication-specific error code (see error catalog)
error.messageRequiredHuman readable error message
error.detailsOptionalOptional error-specific context. Read code first; details keys depend on that code. Unknown keys must not break error handling. See /resources/errors/.
error.details[key]Each valueKey pattern: ^(.*)$.
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
Required fields apply within their object and selected option. An optional object may be absent; when present, its required fields must be included. Required and nullable are independent: null is allowed only where listed.
errorRequiredStructured failure information. Branch on code, show message, and interpret details only for that code. The request ID is returned in the X-Request-Id header.
error.codeRequiredApplication-specific error code (see error catalog)
error.messageRequiredHuman readable error message
error.detailsOptionalOptional error-specific context. Read code first; details keys depend on that code. Unknown keys must not break error handling. See /resources/errors/.
error.details[key]Each valueKey pattern: ^(.*)$.
successRequiredAlways false for error responses
application/json
Required fields apply within their object and selected option. An optional object may be absent; when present, its required fields must be included. Required and nullable are independent: null is allowed only where listed.
errorRequiredStructured failure information. Branch on code, show message, and interpret details only for that code. The request ID is returned in the X-Request-Id header.
error.codeRequiredApplication-specific error code (see error catalog)
error.messageRequiredHuman readable error message
error.detailsOptionalOptional error-specific context. Read code first; details keys depend on that code. Unknown keys must not break error handling. See /resources/errors/.
error.details[key]Each valueKey pattern: ^(.*)$.
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
Required fields apply within their object and selected option. An optional object may be absent; when present, its required fields must be included. Required and nullable are independent: null is allowed only where listed.
errorRequiredStructured failure information. Branch on code, show message, and interpret details only for that code. The request ID is returned in the X-Request-Id header.
error.codeRequiredRATE_LIMITED for request and task admission rejections.
error.messageRequiredHuman-readable explanation. Wording may change; use the machine-readable code for programmatic decisions.
error.detailsOptionalOptional error-specific context. Read code first; details keys depend on that code. Unknown keys must not break error handling. See /resources/errors/.
error.details.currentOptionalCurrent count for the rate-limit window identified by policy and scope.
Minimum: 0.
error.details.inFlightOptionalCurrent accepted tasks counted against the relevant account or API-key admission limit.
Minimum: 0.
error.details.limitOptionalMaximum count allowed by this response context. A limit is not a throughput guarantee.
Minimum: 0.
error.details.policyOptionalAllowance bucket: query for resource reads, operation for task-producing or operation requests. See the rate-limit response headers.
error.details.retryAfterSecOptionalSuggested delay in seconds before another request. Honor the Retry-After header when present; use bounded backoff.
Minimum: 1.
error.details.scopeOptionalEntity whose allowance was exceeded, such as the user, API key or IP address.
error.details.tierOptionalAccount allowance tier used for this admission or rate-limit decision.
error.details.typeOptionalAdmission limit that rejected the request: rps (continuously refilled requests-per-second bucket), daily or monthly UTC request budget. Interpret with policy, scope and retryAfterSec.
error.details[key]Each valueKey pattern: ^(.*)$.
successRequiredWhether this response reports a successful action; false accompanies the structured error object.
Default: false.
application/json
Required fields apply within their object and selected option. An optional object may be absent; when present, its required fields must be included. Required and nullable are independent: null is allowed only where listed.
errorRequiredStructured failure information. Branch on code, show message, and interpret details only for that code. The request ID is returned in the X-Request-Id header.
error.codeRequiredApplication-specific error code (see error catalog)
error.messageRequiredHuman readable error message
error.detailsOptionalOptional error-specific context. Read code first; details keys depend on that code. Unknown keys must not break error handling. See /resources/errors/.
error.details[key]Each valueKey pattern: ^(.*)$.
successRequiredAlways false for error responses
application/json
Required fields apply within their object and selected option. An optional object may be absent; when present, its required fields must be included. Required and nullable are independent: null is allowed only where listed.
errorRequiredStructured failure information. Branch on code, show message, and interpret details only for that code. The request ID is returned in the X-Request-Id header.
error.codeRequiredApplication-specific error code (see error catalog)
error.messageRequiredHuman readable error message
error.detailsOptionalOptional error-specific context. Read code first; details keys depend on that code. Unknown keys must not break error handling. See /resources/errors/.
error.details[key]Each valueKey pattern: ^(.*)$.
successRequiredAlways false for error responses
application/json
Required fields apply within their object and selected option. An optional object may be absent; when present, its required fields must be included. Required and nullable are independent: null is allowed only where listed.
errorRequiredStructured failure information. Branch on code, show message, and interpret details only for that code. The request ID is returned in the X-Request-Id header.
error.codeRequiredApplication-specific error code (see error catalog)
error.messageRequiredHuman readable error message
error.detailsOptionalOptional error-specific context. Read code first; details keys depend on that code. Unknown keys must not break error handling. See /resources/errors/.
error.details[key]Each valueKey pattern: ^(.*)$.
successRequiredAlways false for error responses