Generate lyrics

June 3, 2026 (November 16, 2026)

Table of contents

  1. Request Headers
  2. Request Body
  3. Responses
  4. Model
  5. Examples
  6. Try It

Generate [Verse]/[Chorus]-structured lyrics from a prompt, without producing audio. It runs the agent, so it uses a very small amount of credit (token usage), but renders no song.

Google Flow Music has no model that only writes lyrics. This call asks the song agent to write lyrics and a matching sound_prompt without making audio. We read the agent’s structured lyrics result, so lyrics come back even when its chat reply only talks. A 422 happens only when the agent wrote no lyrics at all. For lyrics that belong to a real track, use POST /music. Every clip it makes returns clip.lyrics.

https://api.useapi.net/v1/flowmusic/music/lyrics

Request Headers

Authorization: Bearer {API token}
Content-Type: application/json
# Or send the same fields as multipart/form-data:
# Content-Type: multipart/form-data

Request Body

{
  "prompt": "a nostalgic song about a long road trip home",
  "structure": "Verse 1 / Chorus / Verse 2 / Chorus / Bridge / Outro"
}
  • prompt is required. The song concept.
    Maximum length: 2000 characters.
  • structure is optional. A free-text section layout, such as Verse 1 / Chorus / Verse 2 / Chorus.
    Maximum length: 2000 characters.
  • email is optional. The Google Flow Music account. Left out, any healthy account is used.

Responses

  • 200 OK

    The lyrics and their title, with the account that wrote them. sound_prompt is a style prompt that fits the lyrics, when Google Flow Music sends one.

    {
      "email": "[email protected]",
      "title": "April Gray",
      "lyrics": "[Verse 1]\nCoffee's cold on the window sill\nSky turned heavy over Bluebell Hill\nFirst few drops hitting dry red brick\nClock on the wall ticking slow and thick\n\n[Chorus]\nLet the rain fall down on the avenue\nWashing out the dust, bringing something new\nListen to the rhythm on the roof tonight\nEverything is quiet, everything is right\n(let it pour)\n\n[Verse 2]\nPuddles forming down the gravel lane\nHeadlights flashing through the streaky pane\nDon't need a jacket, don't need to run\nI'll sit right here till the dark is done\n\n[Chorus]\nLet the rain fall down on the avenue\nWashing out the dust, bringing something new\nListen to the rhythm on the roof tonight\nEverything is quiet, everything is right\n(let it fall)\n\n[Bridge]\nClouds rolling low, hiding up the sun\nNowhere to be, nothing to be done\nJust the cool wind knocking at the door\nAnd the steady water on the porch\n\n[Outro]\nSteady water falling down\nSoaking up this little town\nLet it wash away\nJust an April gray\n(mmm, let it fall)",
      "sound_prompt": "Indie acoustic folk, warm fingerpicked acoustic guitar, subtle piano chords, soft brushed snare drums, close-mic relaxed male vocal timbre, cozy, melancholic atmosphere, intimate production, slow tempo 72 BPM",
      "source": "lyrics-create",
      "audio_create_song_fired": false,
      "credits_burned": 0
    }
    
  • 400 Bad Request

    The request itself is wrong, or no usable Google Flow Music account is added. The error text says what to change.

    {
      "error": "No healthy Google Flow Music accounts available",
      "code": 400
    }
    
    {
      "error": "Please configure at least one account at https://useapi.net/docs/api-flowmusic-v1/post-flowmusic-accounts",
      "code": 400
    }
    
    {
      "error": "Invalid JSON: Unexpected token 'o', \"not json\" is not valid JSON",
      "code": 400
    }
    
  • 401 Unauthorized

    The useapi.net API token is missing or wrong.

    A step at Google Flow Music failed with 401: it refused the account’s sign-in. The error text names the step.

    {
      "error": "Google Flow Music conversation failed (401): {\"detail\":\"Unauthorized\"}",
      "code": 401
    }
    
    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 402 Payment Required

    The useapi.net subscription is not active.

    The Google Flow Music account has too few credits. Top it up, or send the request to an account with credits.

    {
      "error": "Google Flow Music conversation failed (402): {\"detail\":\"User has insufficient credits\"}",
      "code": 402
    }
    
    {
      "error": "useapi.net ⁝ Your account has no subscription, please subscribe to our services before submitting requests",
      "code": 402
    }
    
  • 404 Not Found

    The account, job or clip does not exist, or is no longer there.

    {
      "error": "Account [email protected] not found",
      "code": 404
    }
    
  • 422 Unprocessable Content

    No lyrics

    The agent wrote no lyrics. You get error.code no_lyrics and the reason in error.message. Send the request again, or use POST /music, whose clips carry their lyrics.

    The agent wrote nothing

    {
      "email": "[email protected]",
      "error": {
        "code": "no_lyrics",
        "message": "No lyrics emitted — likely upstream issue",
        "sse_terminated": "complete"
      }
    }
    

    The agent replied without tagged lyrics

    {
      "email": "[email protected]",
      "error": {
        "code": "no_lyrics",
        "message": "No lyrics found — the agent returned neither a lyrics__create result nor a tagged [Verse]/[Chorus] block. Retry, or use POST /music (every generated clip returns server-composed lyrics in clip.lyrics)."
      },
      "agent_text": "I can write lyrics for that. Do you want a slow ballad or something upbeat?"
    }
    
  • 429 Too Many Requests

    Google Flow Music refused the request because this account sent too many at once. Retry once a running generation finishes, or a little later.

    {
      "error": "Google Flow Music conversation failed (429): {\"detail\":\"Too Many Requests\"}",
      "code": 429
    }
    
  • 500 Internal Server Error

    Something failed on our side.

    A step at Google Flow Music failed with 500. The error text names the step.

    {
      "error": "Cannot read properties of undefined (reading 'email')",
      "code": 500
    }
    
    {
      "error": "Google Flow Music conversation failed (500): \"Internal Server Error\"",
      "code": 500
    }
    
  • 502 Bad Gateway

    Google Flow Music answered with an error, or did not answer. The error text says what happened.

    {
      "error": "Upstream network failure after 4 attempts: Network connection lost.",
      "code": 502
    }
    
    {
      "error": "Upstream fetch produced no response",
      "code": 502
    }
    
    {
      "error": "Google Flow Music returned no job_id",
      "code": 502
    }
    
  • 503 Service Unavailable

    The Google Flow Music sign-in service did not answer, or another request is renewing the account’s sign-in right now. The account is unchanged. Retry in a minute, or after Retry-After when it is sent. On any call, it can also mean our service was busy for a moment.

    {
      "error": "Another request is refreshing the Google Flow Music sign-in of [email protected] right now. Retry in a few seconds.",
      "code": 503
    }
    
    {
      "error": "Google Flow Music's sign-in service did not answer (500). Retry in a minute.",
      "code": 503
    }
    
  • 596 Account Error

    The account is in an error state. Add it again with POST /accounts.

    {
      "error": "Account [email protected] in error state: Google Flow Music signed out [email protected]: its sign-in can no longer be refreshed (refresh_token_already_used), usually because it was refreshed somewhere else. Add the account again: https://useapi.net/docs/start-here/setup-flowmusic",
      "code": 596
    }
    
    {
      "error": "Google Flow Music signed out [email protected]: its sign-in can no longer be refreshed (refresh_token_already_used), usually because it was refreshed somewhere else. Add the account again: https://useapi.net/docs/start-here/setup-flowmusic",
      "code": 596
    }
    

Model

The [Verse]/[Chorus]-tagged lyrics, plus a title and a matching sound_prompt when the agent wrote them.

The lyrics
{ // TypeScript, fields marked ? may be absent
  email: string  // the Google Flow Music account that wrote them
  title: string | null  // a title for the song, when the agent gave one
  lyrics: string  // the lyrics, [Verse] / [Chorus] tagged
  sound_prompt: string | null  // a matching style and production prompt, when the agent wrote one
  source: "lyrics-create" | "text-part-fallback"  // lyrics-create: the agent's own lyrics result. text-part-fallback: read from its chat reply
  audio_create_song_fired: boolean  // true only when the agent also started a song (normally false)
  credits_burned: number | null  // 0 when no song was made. null when the agent also started a song
}

Examples

  • curl -X POST "https://api.useapi.net/v1/flowmusic/music/lyrics" \
         -H "Authorization: Bearer YOUR_API_TOKEN" \
         -H "Content-Type: application/json" \
         -d '{"prompt":"a nostalgic song about a long road trip home","structure":"Verse 1 / Chorus / Verse 2 / Chorus / Bridge / Outro"}'
    
  • const response = await fetch('https://api.useapi.net/v1/flowmusic/music/lyrics', {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_API_TOKEN',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        "prompt": "a nostalgic song about a long road trip home",
        "structure": "Verse 1 / Chorus / Verse 2 / Chorus / Bridge / Outro"
      })
    })
    console.log(response.status, await response.json())
    
  • import requests
    
    response = requests.post(
        'https://api.useapi.net/v1/flowmusic/music/lyrics',
        headers={'Authorization': 'Bearer YOUR_API_TOKEN'},
        json={
            'prompt': 'a nostalgic song about a long road trip home',
            'structure': 'Verse 1 / Chorus / Verse 2 / Chorus / Bridge / Outro'
        },
    )
    print(response.status_code, response.json())
    

Try It