Write structured lyrics
Describe a song idea and get lyrics with a title, sections, and a music prompt.
This structured package costs 8 standard credits; check your account price
in the catalog. Use an API key with
task:create and task:read.
For lyrics without the structured package, use Suno lyrics.
Generate
Section titled “Generate”For a new job, generate and save a key once. Retry with the same route, key, and body.
export REQUEST_KEY="$(uuidgen)"curl -X POST https://api.omnapi.com/api/v1/lyrics/generate \ -H "x-api-key: $OMNAPI_KEY" \ -H "Idempotency-Key: $REQUEST_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Write a hopeful pop song about meeting again on a rainy evening.", "language": "English" }'Use genre, mood, or languages only when you need more control.
All optional fields.
Completed response
Section titled “Completed response”Expand the complete JSON example
HTTP 200 · Complete response example
{ "taskId": "task_01J...", "status": "COMPLETED", "model": "gpt-4.1-mini", "modelPath": "gpt/gpt-4.1-mini/lyrics-generation", "creditsCharged": 8, "title": "After the Rain", "lyrics": "[Verse 1]\n...", "languagePlan": { "primaryLanguage": "English", "secondaryLanguages": [], "mixStrategy": "English throughout.", "transliteration": null }, "sectionOrder": [ "Verse 1", "Chorus" ], "hook": "Stay with me in the neon rain tonight", "suno": { "title": "After the Rain", "prompt": "[Verse 1]\n...", "tags": "pop, hopeful, warm", "negativeTags": "heavy metal, aggressive rap" }, "producer": { "title": "After the Rain", "lyrics": "[Verse 1]\n...", "soundPrompt": "Hopeful pop, warm vocals, gentle rhythm" }, "notes": [], "usage": { "promptTokens": 520, "completionTokens": 860, "totalTokens": 1380 }}producer is retained in the lyrics response for compatibility; Producer
generation is currently paused. Use lyrics and suno for supported workflows.
usage is optional. When present, its token counters describe the completed
lyrics generation call.
Accepted response
Section titled “Accepted response”When generation needs more time, the endpoint returns 202:
HTTP 202 · Complete response example
{ "taskId": "task_01J...", "status": "PROCESSING", "modelPath": "gpt/gpt-4.1-mini/lyrics-generation", "creditsRequired": 8, "message": "Lyrics task is still processing. Query the task endpoint for the final result.", "pollUrl": "/api/v1/tasks/task_01J..."}Poll the pollUrl or receive task.* webhooks when config.webhookUrl is set.
On COMPLETED, the generic Task’s outputResults contains the structured lyrics
package; the synchronous 200 response above places those package fields at its
top level. Read outputResults.lyrics and outputResults.suno after polling.
On FAILED or CANCELLED, inspect the error and settlement instead of reading
lyrics. Save the receipt and resume polling after a local timeout; do not submit
another paid request merely because the inline wait returned 202.
Body fields
Section titled “Body fields”Required, optional and null
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.
-
Request ·
promptRequiredstringCore song brief, story, scene, or hook idea.
Maximum characters: 2000.
-
Request ·
configOptionalobjectStandard task configuration: priority, tags, metadata, and webhookUrl.
4 fields
-
Request ·
config.metadataOptionalobjectFree-form caller metadata, echoed back on read. Stored as opaque JSON; the server never mutates it.
1 field
-
Request ·
config.metadata[key]Each valueany JSON valueKey pattern: ^(.*)$.
-
-
Request ·
config.priorityOptionalnumberTask priority 1-10 (higher = sooner). Default 5.
Minimum: 1. Maximum: 10. Default: 5.
-
Request ·
config.webhookUrlOptionalstringURL to receive task.* lifecycle events via the central webhook service.
Format: uri.
-
-
Request ·
durationSecOptionalnumberTarget duration in seconds.
Minimum: 30. Maximum: 480.
-
Request ·
explicitOptionalbooleanWhether explicit language is acceptable.
-
Request ·
extraGuidanceOptionalstringAdditional creative guidance or constraints.
Maximum characters: 2000.
-
Request ·
genreOptionalstringRequested musical genre direction.
Maximum characters: 200.
-
Request ·
languageOptionalstringPrimary lyric language. Use 'auto' to let the model decide.
Maximum characters: 80.
-
Request ·
languagesOptionalarray<string>Additional languages to include or consider.
1 field
-
Request ·
languages[]Each itemstringAdditional languages to consider for multilingual lyrics.
Maximum characters: 80.
-
-
Request ·
modeOptional"gpt"Lyrics generation mode. GPT is the supported mode.
-
Request ·
moodOptionalstringRequested musical or visual mood.
Maximum characters: 200.
-
Request ·
multilingualModeOptional"auto" | "sectioned" | "blended" | "call_and_response"How multiple languages should be mixed.
-
Request ·
negativeConstraintsOptionalarray<string>Topics, styles, or tropes the output should avoid.
1 field
-
Request ·
negativeConstraints[]Each itemstringStyles, topics, or tropes to avoid.
Maximum characters: 80.
-
-
Request ·
perspectiveOptional"first_person" | "second_person" | "third_person" | "mixed"Requested lyric narrative perspective.
-
Request ·
structureOptionalarray<string>Requested lyric section order.
1 field
-
Request ·
structure[]Each itemstringRequested section order, e.g. Verse 1, Chorus, Bridge.
Maximum characters: 50.
-
-
Request ·
themeKeywordsOptionalarray<string>Short theme keywords to anchor the lyrics.
1 field
-
Request ·
themeKeywords[]Each itemstringMaximum characters: 60.
-
-
Request ·
vocalStyleOptionalstringRequested vocal performance direction.
Maximum characters: 200.
Related endpoints
Section titled “Related endpoints”| Endpoint | Use when |
|---|---|
POST /api/v1/lyrics/generate | You need a full structured lyric package and music-ready prompt fields. |
POST /api/v1/subtitles | You already have audio and need timed lyrics or subtitle files. |