List artist voices
May 15, 2025
Table of contents
This endpoint retrieves a list of predefined artist voices that you can use for music generation without uploading your own voice samples. These artist voices can be used with POST music/song by providing the artistVoiceItemId
parameter.
https://api.useapi.net/v1/tempolor/music/artist-voices/?…
Request Headers
Authorization: Bearer {API token}
API token
is required, see Setup useapi.net for details.
Query Parameters
-
user_id
is optional when only one account configured. However, if you have multiple accounts configured, this parameter becomes required. -
cursor
is optional. Pagination cursor for fetching additional pages of results.
Responses
-
{ "records": [ { "ucid": "9999999", "bizType": "ai_voice_cloned", "itemId": "voice_12345", "name": "Deep Male Voice", "resourceUrl": "https://example.com/vocals/deep-male-sample.mp3", "coverUrl": "https://example.com/voice-covers/deep-male.jpg", "vocalUrl": "https://example.com/vocals/deep-male-sample.mp3", "weight": 100, "isAddRel": false, "relSource": "", "labels": ["male", "deep", "dramatic"] }, { "ucid": "9999999", "bizType": "ai_voice_cloned", "itemId": "voice_67890", "name": "Soprano Female Voice", "resourceUrl": "https://example.com/vocals/soprano-female-sample.mp3", "coverUrl": "https://example.com/voice-covers/soprano-female.jpg", "vocalUrl": "https://example.com/vocals/soprano-female-sample.mp3", "weight": 90, "isAddRel": false, "relSource": "", "labels": ["female", "soprano", "clear"] } ], "hasNext": false, "cursor": "", "sysTime": 1716565425000 }
-
{ "error": "Unauthorized", "code": 401 }
Model
{ // TypeScript, all fields are optional
records: {
ucid: string
bizType: string
itemId: string
name: string
resourceUrl: string
coverUrl: string
vocalUrl: string
weight: number
isAddRel: boolean
relSource: string
labels: string[]
}[]
hasNext: boolean
cursor: string
sysTime: number
error: string
code: number
}
Examples
-
# List all artist voices curl -H "Authorization: Bearer …" \ https://api.useapi.net/v1/tempolor/music/artist-voices/?user_id=user_id # Paginate through results using cursor curl -H "Authorization: Bearer …" \ "https://api.useapi.net/v1/tempolor/music/artist-voices/?user_id=user_id&cursor=next_page_cursor_token"
-
const token = "API token"; const user_id = "user_id"; const cursor = ""; // for pagination // Build the URL with query parameters let apiUrl = `https://api.useapi.net/v1/tempolor/music/artist-voices/?user_id=${user_id}`; 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} artist voices`); // Example of fetching all pages async function fetchAllArtistVoices(userId) { let allRecords = []; let nextCursor = ""; let hasMore = true; while (hasMore) { let url = `https://api.useapi.net/v1/tempolor/music/artist-voices/?user_id=${userId}`; 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" cursor = "" # for pagination # Build the URL with query parameters apiUrl = f"https://api.useapi.net/v1/tempolor/music/artist-voices/?user_id={user_id}" 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', []))} artist voices") # Example of fetching all pages def fetch_all_artist_voices(user_id): all_records = [] next_cursor = "" has_more = True while has_more: url = f"https://api.useapi.net/v1/tempolor/music/artist-voices/?user_id={user_id}" 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