Create a song using custom lyrics, styles, vocals and reference song

December 2, 2024 (January 27, 2026)

Table of contents

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

Mureka supports up to 10 parallel generations per account in near real-time fashion, with an average generation time of 45 seconds (each generation produces two songs). Generated songs can be up to 5 minutes long depending on your lyrics.

https://api.useapi.net/v1/mureka/music/create-advanced

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
Request Body
{
    "account": "Optional Mureka API account",
    "lyrics": "Required song lyrics",
    "title": "Optional song title",
}
  • account is optional when only one account is configured or if the motif_id parameter is provided. However, if you have multiple accounts configured and the motif_id parameter is not provided, this parameter becomes required.

  • lyrics is required. Lyrics for the song.
    Maximum length: 5000 characters.

  • title is optional. Song title.
    Maximum length: 50 characters.

  • desc is optional. To guide song generation, provide a comma-separated list of genres, moods, and desired vocals. See supported values using GET /music/moods-and-genres. This parameter is not compatible with parameters ref_id, vocal_id or motif_id. Example: pop, electronic, happy, female vocal” Maximum length: 1000 characters.

  • vocal_id is optional. Specify the desired vocal. See supported vocals using GET /music/vocals.

  • ref_id is optional. Create songs inspired by a reference track. See available tracks using GET /music/refs. You can upload your own track using POST /files. To see a list of tracks you have already uploaded, use GET /files.

  • motif_id is optional. Create songs inspired by a melody idea to kickstart your song. Upload the melody using POST /files/motif and use the returned id value. This parameter is not compatible with parameters ref_id, vocal_id or desc.

  • model is optional. Supported values: V8 (default), O2, V7.6, V7.5.

  • vocal_gender is optional. Specify desired vocal gender. Supported values: female, male.

Note: V7, O1, V6, and V5.5 are retired models that now redirect to V7.6.

  • async is optional, enables fire-and-forget mode (default: false). When true, returns immediately with 201 Created and job metadata. Poll GET /jobs/jobid for completion status. Useful for avoiding long request timeouts since music generation takes 30-90 seconds.

  • replyUrl is optional, webhook URL for job status callbacks. Receives POST requests with job status updates (created, completed, failed). The JSON payload shape matches GET /jobs/jobid response.

  • replyRef is optional, custom reference string passed back in webhook callbacks. Useful for tracking jobs on your end.

Responses
  • 200 OK

    {
        "jobid": "j0121061432017475905m-u777-a12345678901234-bot:mureka",
        "feed_id": 11223344,
        "state": 3,
        "songs": [
            {
                "song_id": "user:777-mureka:123456789-song:33445566",
                "title": "<title>",
                "version": "1",
                "duration_milliseconds": 234567,
                "generate_at": 12345677,
                "genres": [
                    "electronic",
                    "indie"
                ],
                "moods": [
                    "quirky",
                    "angry",
                    "restless"
                ],
                "mp3_url": "https://<download link>.mp3",
                "share_key": "<share key>",
                "recall": true,
                "machine_audit_state": 4,
                "credit_type": 1,
                "cover": "https://<cover image>.png",
                "share_link": "https://<share link>"
            },
            {
                "song_id": "user:777-mureka:123456789-song:33445566",
                "title": "<title>",
                "version": "2",
                "duration_milliseconds": 1234567,
                "generate_at": 12345667,
                "genres": [
                    "electronic",
                    "world-music"
                ],
                "moods": [
                    "dark",
                    "quirky",
                    "energetic"
                ],
                "mp3_url": "https://<download link>.mp3",
                "share_key": "<share key>",
                "machine_audit_state": 1,
                "credit_type": 1,
                "cover": "https://<cover image>.png",
                "share_link": "https://<share link>"
            }
        ]
    }
    
  • 201 Created

    Job created in async mode (async: true). Music generation is processing in the background.

    Use GET /jobs/jobid to poll for completion status.

    {
        "jobid": "j0121061432017475905m-u777-a12345678901234-bot:mureka",
        "verb": "music/create-advanced",
        "jobType": "music",
        "status": "created",
        "created": "2026-01-20T12:34:56.789Z",
        "request": {
            "account": "12345678901234",
            "lyrics": "Your song lyrics here",
            "title": "My Song",
            "model": "V7.6",
            "async": true,
            "replyUrl": "https://your-domain.com/webhook",
            "replyRef": "my-custom-ref-123"
        }
    }
    
  • 400 Bad Request

    {
      "error": "<Error message>",
      "code": 400
    }
    
  • 401 Unauthorized

    {
      "error": "Wrong username/password combination.",
      "code": 401
    }
    
  • 429 Too Many Requests

    • Rate limit exceeded.
      Endpoint called too frequently. Wait at least 3 seconds before making another call.
      {
      "code": 9008,
      "msg": "Too frequently, please try again later."
      }
      
    • Concurrent job limit exceeded. All job slots are taken (typically 10 concurrent generations per account). Wait at least 5 seconds before retrying.
      {
      "error": "Generate multiple task exceed limit. (6323)"
      }
      
  • 596 Account Error

    Returned when the account has an error state preventing API calls.

    {
        "error": "Session refresh failed 2026-01-19T14:31:15.000Z, manual update required",
        "code": "REFRESH_FAILED"
    }
    

    Possible error codes:

    • ACCOUNT_ERROR - Account has a blocking error
    • REFRESH_FAILED - Automatic token refresh failed
    • REFRESH_IN_PROGRESS - Token refresh already in progress, retry shortly
    • SESSION_EXPIRED - Session expired and no auto-refresh available
    • COOKIE_EXPIRED - Google cookie has expired

    To resolve, update your account configuration via POST /accounts.

Model
  • Music generation completed. Returns full song data with MP3 URLs.

    {
        jobid: string                              // Job identifier (for later lookup)
        feed_id: number
        state: number
        songs?: {
            song_id: string
            title: string
            version: string
            duration_milliseconds: number
            generate_at: number
            genres: string[]
            moods: string[]
            mp3_url: string
            share_key: string
            machine_audit_state: number
            credit_type: number
            cover: string
            share_link: string
        }[]
        error?: string
        code?: number
        msg?: string
    }
    
  • Job created and processing in background. Structure matches GET /jobs/jobid response.

    {
        jobid: string                              // Job identifier
        verb: 'music/create-advanced'              // Job verb
        jobType: 'music'                           // Job type
        status: 'created'                          // Job status
        created: string                            // ISO 8601 timestamp
        request: {
            account?: string
            lyrics: string
            title?: string
            desc?: string
            vocal_id?: string
            ref_id?: string
            motif_id?: string
            model?: string
            vocal_gender?: string
            async: true
            replyUrl?: string
            replyRef?: string
        }
    }
    
  • Error response structure (applies to both sync and async modes).

    {
        jobid?: string                             // Present for job-related errors
        error: string                              // Error summary message
        code?: number                              // HTTP status code or error code
        msg?: string                               // Additional error message
    }
    
Examples
  • curl -H "Accept: application/json" \
         -H "Content-Type: application/json" \
         -H "Authorization: Bearer …" \
         -X POST https://api.useapi.net/v1/mureka/music/create-advanced \
         -d '{"account": "…", "lyrics": "…"}'
    
  • const account = "Mureka account";      
    const lyrics = "<Your song lyrics here>";      
    const apiUrl = `https://api.useapi.net/v1/mureka/music/create-advanced`; 
    const api_token = "API token";
    const data = { 
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${api_token}`,
        'Content-Type': 'application/json' }
    };
    data.body = JSON.stringify({ 
      account, lyrics
    });
    const response = await fetch(apiUrl, data);
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    account = "Mureka account"
    lyrics = "<Your song lyrics here>"
    apiUrl = f"https://api.useapi.net/v1/mureka/music/create-advanced" 
    api_token = "API token"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {api_token}"
    }
    body = {
        "account": f"{account}",
        "lyrics": f"{lyrics}"
    }
    response = requests.post(apiUrl, headers=headers, json=body)
    print(response, response.json())
    
Try It

It takes an average of 45 seconds to generate a song.