List music generation jobs

May 15, 2025

Table of contents

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

This endpoint retrieves a list of previously generated music items. You can filter the results by type and paginate through them using the cursor parameter.

https://api.useapi.net/v1/tempolor/music/?…

Request Headers
Authorization: Bearer {API token}
Query Parameters
  • user_id is optional when only one account configured. However, if you have multiple accounts configured, this parameter becomes required.

  • type is optional. Filter results by the type of music generation.
    Supported values:
    • song - Show music with vocals (default)
    • instrumental - Show instrumental music only
  • cursor is optional. Pagination cursor for fetching additional pages of results.
Responses
  • 200 OK

    Example Response
    {
      "records": [
        {
          "bizType": "ai_material_music",
          "childType": "lyric_to_material",
          "matChildType": "lyric_to_material",
          "sourceType": "sm_user_gen",
          "itemId": "abcdef123456789",
          "job_id": "user:12345-tempolor:user_id-job:abcdef123456789",
          "genItemId": "abcdef123456789",
          "userId": "user_id",
          "titleEn": "Epic Orchestral",
          "cover": "https://example.com/cover.png",
          "mp3OssId": "ai_material/ai_material/mp3/abcdef123456789.mp3",
          "wavOssId": "ai_material/ai_material/wav/abcdef123456789.wav",
          "ossWatermarkMp3": "",
          "officialPlaylistSong": false,
          "status": 30,
          "status_name": "COMPLETED",
          "status_final": true,
          "progress": 100,
          "downloadTotal": 0,
          "likeTotal": 0,
          "collectTotal": 0,
          "musicMaterial": {
            "style": "Orchestral",
            "chord": "",
            "mood": "",
            "inst": "",
            "instInfo": "",
            "scene": "",
            "otherInfo": "A cinematic orchestral piece with dramatic string sections",
            "otherInfoCn": "",
            "key": "F:minor",
            "bpm": 130,
            "dur": 180,
            "seed": 1234567890,
            "waveformUrl": "https://example.com/waveform.json"
          },
          "readStatus": false,
          "downloadStatus": false,
          "createTime": 1716565425000,
          "updateTime": 1716565700000,
          "materialQualityScore": 0,
          "ltmMaterialExtendDto": {
            "lyricsPrompt": "Sample lyrics here",
            "description": "A cinematic orchestral piece with dramatic string sections",
            "ltmVocalModel": false,
            "ltmMidiModel": false,
            "genItemId": "abcdef123456789",
            "prompt": "A cinematic orchestral piece with dramatic string sections",
            "genMode": 0,
            "model": "v1-dit-obleck-stereo-zh-en-270-wf",
            "modelShowName": "v3.5"
          },
          "editType": "gen",
          "operatorType": "gen",
          "rootItemId": "abcdef123456789",
          "parentItemId": "abcdef123456789",
          "canExtend": true,
          "canEditLyrics": true,
          "canFixVocals": true,
          "canReplaced": false
        }
      ],
      "hasNext": true,
      "cursor": "next_page_cursor_token"
    }
    
  • 400 Bad Request

    {
      "error": "Invalid type parameter. Must be 'song' or 'instrumental'",
      "code": 400
    }
    
  • 401 Unauthorized

    {
      "error": "Unauthorized",
      "code": 401
    }
    
Model
{   // TypeScript, all fields are optional
    records: {
        bizType: string
        childType: string
        matChildType: string
        sourceType: string
        itemId: string
        job_id: string
        genItemId: string
        userId: string
        titleEn: string
        cover: string
        mp3OssId: string
        wavOssId: string
        ossWatermarkMp3: string
        officialPlaylistSong: boolean
        status: number
        status_name: string 
        status_final: boolean
        progress: number
        downloadTotal: number
        likeTotal: number
        collectTotal: number
        musicMaterial: {
            style: string
            chord: string
            mood: string
            inst: string
            instInfo: string
            scene: string
            otherInfo: string
            otherInfoCn: string
            key: string
            bpm: number
            dur: number
            seed: number
            src: string
            ossSrc: string
            waveformOssId: string
            waveformUrl: string
            batchId: string
        }
        readStatus: boolean
        downloadStatus: boolean
        createTime: number
        updateTime: number
        materialQualityScore: number
        ltmMaterialExtendDto: {
            lyricsPrompt: string
            description: string
            ltmVocalModel: boolean
            ltmMidiModel: boolean
            lrcTimestamp: string
            genItemId: string
            prompt: string
            genMode: number
            model: string
            modelShowName: string
            dynamicModel: string
            oriCacheDir: string
        }
        editType: string
        operatorType: string
        rootItemId: string
        parentItemId: string
        canExtend: boolean
        canEditLyrics: boolean
        canFixVocals: boolean
        canReplaced: boolean
    }[]
    hasNext: boolean
    cursor: string
    error: string
    code: number
}
Examples
  • # List all song generations (default)
    curl -H "Authorization: Bearer …" \
         https://api.useapi.net/v1/tempolor/music/?user_id=user_id
    
    # List only instrumental music
    curl -H "Authorization: Bearer …" \
         https://api.useapi.net/v1/tempolor/music/?user_id=user_id&type=instrumental
    
    # Paginate through results using cursor
    curl -H "Authorization: Bearer …" \
         "https://api.useapi.net/v1/tempolor/music/?user_id=user_id&cursor=next_page_cursor_token"
    
  • const token = "API token";
    const user_id = "user_id"; 
    const type = "song"; // or "instrumental"
    const cursor = ""; // for pagination
    
    // Build the URL with query parameters
    let apiUrl = `https://api.useapi.net/v1/tempolor/music/?user_id=${user_id}`;
    if (type) apiUrl += `&type=${type}`;
    if (cursor) apiUrl += `&cursor=${cursor}`;
    
    const response = await fetch(apiUrl, {
      method: "GET",
      headers: {
        "Authorization": `Bearer ${token}`
      }
    });
    const result = await response.json();
    console.log(`Found ${result.records?.length || 0} music items`);
    
    // Example of fetching all pages
    async function fetchAllMusicItems(userId, type) {
      let allRecords = [];
      let nextCursor = "";
      let hasMore = true;
      
      while (hasMore) {
        let url = `https://api.useapi.net/v1/tempolor/music/?user_id=${userId}`;
        if (type) url += `&type=${type}`;
        if (nextCursor) url += `&cursor=${nextCursor}`;
        
        const response = await fetch(url, {
          method: "GET",
          headers: { "Authorization": `Bearer ${token}` }
        });
        
        const data = await response.json();
        
        if (data.records && data.records.length > 0) {
          allRecords = [...allRecords, ...data.records];
        }
        
        hasMore = data.hasNext;
        nextCursor = data.cursor;
        
        // Break if no more pages or no cursor
        if (!hasMore || !nextCursor) break;
      }
      
      return allRecords;
    }
    
  • import requests
    
    token = "API token"
    user_id = "user_id"
    type_param = "song"  # or "instrumental"
    cursor = ""  # for pagination
    
    # Build the URL with query parameters
    apiUrl = f"https://api.useapi.net/v1/tempolor/music/?user_id={user_id}"
    if type_param:
        apiUrl += f"&type={type_param}"
    if cursor:
        apiUrl += f"&cursor={cursor}"
    
    headers = {
        "Authorization": f"Bearer {token}"
    }
    
    response = requests.get(apiUrl, headers=headers)
    result = response.json()
    print(f"Found {len(result.get('records', []))} music items")
    
    # Example of fetching all pages
    def fetch_all_music_items(user_id, type_param=None):
        all_records = []
        next_cursor = ""
        has_more = True
        
        while has_more:
            url = f"https://api.useapi.net/v1/tempolor/music/?user_id={user_id}"
            if type_param:
                url += f"&type={type_param}"
            if next_cursor:
                url += f"&cursor={next_cursor}"
            
            response = requests.get(url, headers=headers)
            data = response.json()
            
            if data.get('records'):
                all_records.extend(data.get('records'))
            
            has_more = data.get('hasNext', False)
            next_cursor = data.get('cursor', "")
            
            # Break if no more pages or no cursor
            if not has_more or not next_cursor:
                break
        
        return all_records
    
Try It