Skip to content

    Lyrics

    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.

    For a new job, generate and save a key once. Retry with the same route, key, and body.

    Terminal window
    export REQUEST_KEY="$(uuidgen)"
    Terminal window
    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.

    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.

    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.

    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 · promptRequired

      string

      Core song brief, story, scene, or hook idea.

      Maximum characters: 2000.

    • Request · configOptional

      object

      Standard task configuration: priority, tags, metadata, and webhookUrl.

      4 fields
      • Request · config.metadataOptional

        object

        Free-form caller metadata, echoed back on read. Stored as opaque JSON; the server never mutates it.

        1 field
      • Request · config.priorityOptional

        number

        Task priority 1-10 (higher = sooner). Default 5.

        Minimum: 1. Maximum: 10. Default: 5.

      • Request · config.tagsOptional

        array<string>

        Free-form labels for filtering. Up to 20, 100 chars each.

        Maximum items: 20.

        1 field
        • Request · config.tags[]Each item

          string

          Maximum characters: 100.

      • Request · config.webhookUrlOptional

        string

        URL to receive task.* lifecycle events via the central webhook service.

        Format: uri.

    • Request · durationSecOptional

      number

      Target duration in seconds.

      Minimum: 30. Maximum: 480.

    • Request · explicitOptional

      boolean

      Whether explicit language is acceptable.

    • Request · extraGuidanceOptional

      string

      Additional creative guidance or constraints.

      Maximum characters: 2000.

    • Request · genreOptional

      string

      Requested musical genre direction.

      Maximum characters: 200.

    • Request · languageOptional

      string

      Primary lyric language. Use 'auto' to let the model decide.

      Maximum characters: 80.

    • Request · languagesOptional

      array<string>

      Additional languages to include or consider.

      1 field
      • Request · languages[]Each item

        string

        Additional languages to consider for multilingual lyrics.

        Maximum characters: 80.

    • Request · modeOptional

      "gpt"

      Lyrics generation mode. GPT is the supported mode.

    • Request · moodOptional

      string

      Requested musical or visual mood.

      Maximum characters: 200.

    • Request · multilingualModeOptional

      "auto" | "sectioned" | "blended" | "call_and_response"

      How multiple languages should be mixed.

    • Request · negativeConstraintsOptional

      array<string>

      Topics, styles, or tropes the output should avoid.

      1 field
      • Request · negativeConstraints[]Each item

        string

        Styles, topics, or tropes to avoid.

        Maximum characters: 80.

    • Request · perspectiveOptional

      "first_person" | "second_person" | "third_person" | "mixed"

      Requested lyric narrative perspective.

    • Request · structureOptional

      array<string>

      Requested lyric section order.

      1 field
      • Request · structure[]Each item

        string

        Requested section order, e.g. Verse 1, Chorus, Bridge.

        Maximum characters: 50.

    • Request · themeKeywordsOptional

      array<string>

      Short theme keywords to anchor the lyrics.

      1 field
    • Request · vocalStyleOptional

      string

      Requested vocal performance direction.

      Maximum characters: 200.

    EndpointUse when
    POST /api/v1/lyrics/generateYou need a full structured lyric package and music-ready prompt fields.
    POST /api/v1/subtitlesYou already have audio and need timed lyrics or subtitle files.