=== useapi.net — universal note === Generated: 2026-10-14 19:29 UTC Authentication (applies to every useapi.net API). Header: Authorization: Bearer user:- Use the COMPLETE token, including the `user:` prefix and the alphanumeric suffix. Do not truncate. Do not URL-encode. A single token authorizes every API under the user's subscription. Service-specific patterns. Identifier names (jobid / taskId / musicId / etc.), job lifecycle, response shapes, webhook semantics, and synchronous-vs-async behavior vary PER API. Use ONLY the service-specific documentation below to determine the correct request body, response shape, polling endpoint, and status values for THIS API. Do not assume conventions from another useapi.net API carry over. For cross-service context (e.g. which APIs expose the same underlying model, billing tiers, model availability matrix), see https://useapi.net/llms.txt === END universal note === === URL: https://useapi.net/docs/start-here/setup-tempolor === Document URL: https://useapi.net/docs/start-here/setup-tempolor --- layout: default title: Setup TemPolor description: "How to set up TemPolor for the useapi.net API — connect your account and start generating via the API." parent: Start Here nav_order: 260 --- # Setup TemPolor May 15, 2025 ## Table of contents Approximately 5 minutes to complete setup steps. --- > This is the setup guide for [TemPolor API](/docs/api-tempolor-v1). An active [TemPolor](https://www.tempolor.com) subscription and a [useapi.net subscription](/docs/subscription) are required for the API to work. [TemPolor](https://www.tempolor.com), an AI-powered, royalty-free **music generation** service that creates high-quality soundtracks from text prompts, custom lyrics, MIDI, and supports voice cloning. TemPolor offers extensive customization for instrumental tracks, including chords and BPM. Supports export in mp3, wav, and stems, and it can generate stems from users' audio files. Up to 10 tracks can be generated concurrently, with **unlimited** generations available on the [Ultra](https://www.tempolor.com/pricing) plan. ## Create TemPolor account Create a [TemPolor](https://www.tempolor.com) account if you don't have one already. ## Locate your TemPolor `requestParams` Open a Chromium-compatible browser (e.g. [Google Chrome](https://www.google.com/chrome/), [Microsoft Edge](https://www.microsoft.com/en-us/edge), or [Opera](https://www.opera.com/)) and navigate to your TemPolor account profile page [https://www.tempolor.com/account/profile](https://www.tempolor.com/account/profile) `1`. ![](/assets/images/tempolor_setup_1.png) Refresh the page `2`. Once the page is fully loaded, ensure that you're logged in and current page is [https://www.tempolor.com/account/profile](https://www.tempolor.com/account/profile). Open [Developer Tools](https://developer.chrome.com/docs/devtools) by right-clicking on the page and selecting "Inspect Element" or via [keyboard shortcuts](https://developer.chrome.com/docs/devtools/shortcuts): Mac `Command+Option+I` or Windows `F12` or `Control+Shift+I`. Select Developer Tools » Network `3`: * Make sure that `All` or `Fetch/XHR` is selected `4`. * Type `/getWebSelfUserInfo` in the filter box `5` and hit Enter. * You should see a single HTTP call entry as shown below `6` and click on that entry. * Select the "Payload" tab `7`. * Locate and select the "Request Payload" header `8`. * Right-click on the `requestParams` and copy its content `9`. This is your `requestParams`.
As an example above, the requestParams (JSON) ```json { "requestParams": { "sv": "alpha/beta/release", "ver_code": 20000, "lang": "french", "la": "fr-FR", "di": "e23c9f7db8ced478b8574923817c2b6a", "pf": "100", "mi": "Windows", "biz": 378, "utdid": "e23c9f7db8ced478b8574923817c2b6a", "ts": 1849982225671, "service_ticket": "hUUCp7MeIAXpXKo9AOP5zPlJLqVZh81C2MWlZdTuqoGbNqzlgQNjBwtxdYnJPRA52Wn=", "ucid": "100349856", "user_id": "100349856", "member_level": 0, "is_visitor": 0, "vip_type": 20, "app_id": "material", "app": "web", "ve": "2.0.0", "entry": "web_main", "fr": "web", "ip": "88.222.199.44", "business_type": "material", "la_multi": "fr", "b_ts": "1849512371543", "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.39 (KHTML, like Gecko) Chrome/122.1.0.0 Safari/537.39 OPR/123.0.0.0", "web_terminal": "web_pc" } } ```
## Verify and add account Use the form below to verify your credentials and add your TemPolor account. Select **Add Account** to complete setup, or **Verify** to test your credentials first. You should receive response `200` if successful. You can also use [POST /accounts](/docs/api-tempolor-v1/post-tempolor-accounts) directly.
=== URL: https://useapi.net/docs/api-tempolor-v1 === Document URL: https://useapi.net/docs/api-tempolor-v1 --- layout: default title: TemPolor API v1 description: "useapi.net TemPolor API v1 — REST API for TemPolor, an AI royalty-free music generator: create songs from a prompt, lyrics or MIDI with voice cloning, chord/BPM control, and mp3/wav/stems export." nav_order: 8000 has_children: true permalink: /docs/api-tempolor-v1 --- # TemPolor API v1 May 15, 2025 (September 25, 2026) This is an [experimental](/docs/legal) API for [TemPolor](https://www.tempolor.com), an AI-powered, royalty-free **music generation** service that creates high-quality soundtracks from text prompts, custom lyrics, MIDI, and supports voice cloning. TemPolor offers extensive customization for instrumental tracks, including chords and BPM. Supports export in mp3, wav, and stems, and it can generate stems from users' audio files. Up to 10 tracks can be generated concurrently, with **unlimited** generations available on the [Ultra](https://www.tempolor.com/pricing) plan. **Song model:** - `v4.8` (default) — Next-gen proprietary model with better melody, structure and vocals, 30+ languages. Max 5 min **Instrumental model:** - `i4` (default) — Better musicality and prompt adherence Using the [Ultra $30/m](https://www.tempolor.com/pricing) TemPolor web subscription used by this API, you can generate an **unlimited** number of songs. Compare this to the official API pricing, which starts at [$300/m](https://platform.tempolor.com/pricing) for 10,000 songs per month. [Setup TemPolor](/docs/start-here/setup-tempolor) [Postman collection](https://www.postman.com/useapinet/useapi-net/collection) (September 25, 2026) [LLM-friendly API spec](https://useapi.net/assets/aibot/api-tempolor-v1.txt) Feed this to your LLM to build integrations Articles: * [Four AI Music APIs on the Same Six Briefs: TemPolor v4.8, MiniMax Music-3.0, Lyria 3.5 and Mureka V9.5](/docs/articles/ai-music-flagships-compared) * [TemPolor v4.5+ Multilingual Song](/blog/260321) * [TemPolor API Samples](/blog/250515) Developer Community: * Discord Server * Telegram Channel === URL: https://useapi.net/docs/api-tempolor-v1/del-tempolor-accounts-user_id === Document URL: https://useapi.net/docs/api-tempolor-v1/del-tempolor-accounts-user_id --- layout: default title: DELETE accounts/`user_id` description: "Delete a TemPolor API account configuration by user_id via DELETE accounts/user_id in the useapi.net TemPolor API v1." parent: TemPolor API v1 nav_order: 400 --- ## Delete TemPolor API account May 15, 2025 --- This endpoint deletes a TemPolor API account configuration. [Setup TemPolor](/docs/start-here/setup-tempolor) > **https://api.useapi.net/v1/tempolor/accounts/`user_id`** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Responses **204** **204 No Content** Account configuration was successfully deleted. **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** Account configuration not found. ##### Examples **Curl** ``` bash curl -X DELETE https://api.useapi.net/v1/tempolor/accounts/ \ -H "Accept: application/json" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const user_id = "Previously configured account"; const apiUrl = `https://api.useapi.net/v1/tempolor/accounts/${user_id}`; const response = await fetch(apiUrl, { method: 'DELETE', headers: { "Authorization": `Bearer ${token}`, } }); console.log("response", response); ``` **Python** ``` python import requests token = "API token" user_id = "Previously configured account" apiUrl = f"https://api.useapi.net/v1/tempolor/accounts/{user_id}" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } response = requests.delete(apiUrl, headers=headers) print(response) ``` === URL: https://useapi.net/docs/api-tempolor-v1/del-tempolor-scheduler-job_id === Document URL: https://useapi.net/docs/api-tempolor-v1/del-tempolor-scheduler-job_id --- layout: default title: DELETE scheduler/`job_id` description: "Cancel API tracking of a running music generation job by job_id via DELETE scheduler/job_id in the useapi.net TemPolor API v1." parent: TemPolor API v1 nav_order: 2100 --- ## Cancel a running job May 15, 2025 --- This endpoint cancels a running API job from being tracked by the scheduler. The job will still be executed by TemPolor, but the API will no longer track its progress. > **https://api.useapi.net/v1/tempolor/scheduler/`job_id`** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Path Parameters - `job_id` is **required**. The job to cancel, as returned from [POST music/song](/docs/api-tempolor-v1/post-tempolor-music-song), [POST music/instrumental](/docs/api-tempolor-v1/post-tempolor-music-instrumental), or [GET scheduler](/docs/api-tempolor-v1/get-tempolor-scheduler). ##### Responses **204** **204 No Content** Job was successfully cancelled. **400** **400 Bad Request** The job_id format is invalid. ```json { "error": "job_id has incorrect format", "code": 400 } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** The specified job was not found or could not be cancelled. ```json { "error": "Unable to locate running job_id", "code": 404 } ``` ##### Examples **Curl** ``` bash curl -X DELETE "https://api.useapi.net/v1/tempolor/scheduler/" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const job_id = "user:12345-tempolor:user_id-job:abcdef123456789"; const apiUrl = `https://api.useapi.net/v1/tempolor/scheduler/${job_id}`; const response = await fetch(apiUrl, { method: "DELETE", headers: { "Authorization": `Bearer ${token}` } }); if (response.status === 204) { console.log("Job cancelled successfully"); } else { const errorData = await response.json(); console.error("Failed to cancel job:", errorData); } ``` **Python** ``` python import requests token = "API token" job_id = "user:12345-tempolor:user_id-job:abcdef123456789" api_url = f"https://api.useapi.net/v1/tempolor/scheduler/{job_id}" headers = { 'Authorization': f'Bearer {token}' } response = requests.delete(api_url, headers=headers) if response.status_code == 204: print("Job cancelled successfully") else: try: error_data = response.json() print(f"Failed to cancel job: {error_data}") except: print(f"Failed to cancel job: {response.status_code}") ``` === URL: https://useapi.net/docs/api-tempolor-v1/delete-tempolor-music-cloned-voices-clonedVoiceItemId === Document URL: https://useapi.net/docs/api-tempolor-v1/delete-tempolor-music-cloned-voices-clonedVoiceItemId --- layout: default title: DELETE music/cloned-voices description: "Delete a previously created cloned voice by clonedVoiceItemId via DELETE music/cloned-voices in the useapi.net TemPolor API v1." parent: TemPolor API v1 nav_order: 1900 --- ## Delete a cloned voice May 15, 2025 --- This endpoint deletes a previously created cloned voice. > **https://api.useapi.net/v1/tempolor/music/cloned-voices/`clonedVoiceItemId`** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Path Parameters - `clonedVoiceItemId` is **required**. The cloned voice ID returned from a previous [POST music/cloned-voices](/docs/api-tempolor-v1/post-tempolor-music-cloned-voices) request. ##### Responses **200** **200 OK** ```json { "result": true } ``` **400** **400 Bad Request** ```json { "error": "clonedVoiceItemId has incorrect format", "code": 400 } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** ```json { "error": "No record found for user:12345-tempolor:user_id-voice:abcdef123456789", "code": 404 } ``` ##### Model ```typescript { // TypeScript, all fields are optional result: boolean error: string code: number } ``` ##### Examples **Curl** ``` bash curl -X DELETE -H "Authorization: Bearer …" \ https://api.useapi.net/v1/tempolor/music/cloned-voices/user:12345-tempolor:user_id-voice:abcdef123456789 ``` **JavaScript** ``` javascript const clonedVoiceItemId = "user:12345-tempolor:user_id-voice:abcdef123456789"; const token = "API token"; const apiUrl = `https://api.useapi.net/v1/tempolor/music/cloned-voices/${clonedVoiceItemId}`; const response = await fetch(apiUrl, { method: "DELETE", headers: { "Authorization": `Bearer ${token}` } }); const result = await response.json(); console.log("Delete result:", result.result); ``` **Python** ``` python import requests cloned_voice_item_id = "user:12345-tempolor:user_id-voice:abcdef123456789" token = "API token" apiUrl = f"https://api.useapi.net/v1/tempolor/music/cloned-voices/{cloned_voice_item_id}" headers = { "Authorization": f"Bearer {token}" } response = requests.delete(apiUrl, headers=headers) result = response.json() print(f"Delete result: {result.get('result')}") ``` === URL: https://useapi.net/docs/api-tempolor-v1/delete-tempolor-music-job_id === Document URL: https://useapi.net/docs/api-tempolor-v1/delete-tempolor-music-job_id --- layout: default title: DELETE music/`job_id` description: "Delete a previously generated TemPolor music item by job_id via DELETE music/job_id in the useapi.net TemPolor API v1." parent: TemPolor API v1 nav_order: 1100 --- ## Delete a music generation May 15, 2025 --- This endpoint deletes a previously generated music item. > **https://api.useapi.net/v1/tempolor/music/`job_id`** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Path Parameters - `job_id` is **required**. The job returned from a previous [POST music/song](/docs/api-tempolor-v1/post-tempolor-music-song) or [POST music/instrumental](/docs/api-tempolor-v1/post-tempolor-music-instrumental) request. ##### Responses **200** **200 OK** ```json { "result": true } ``` **400** **400 Bad Request** ```json { "error": "job_id has incorrect format", "code": 400 } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** ```json { "error": "No record found for user:12345-tempolor:user_id-job:abcdef123456789", "code": 404 } ``` ##### Model ```typescript { // TypeScript, all fields are optional result: boolean error: string code: number } ``` ##### Examples **Curl** ``` bash curl -X DELETE -H "Authorization: Bearer …" \ https://api.useapi.net/v1/tempolor/music/user:12345-tempolor:user_id-job:abcdef123456789 ``` **JavaScript** ``` javascript const job_id = "user:12345-tempolor:user_id-job:abcdef123456789"; const token = "API token"; const apiUrl = `https://api.useapi.net/v1/tempolor/music/${job_id}`; const response = await fetch(apiUrl, { method: "DELETE", headers: { "Authorization": `Bearer ${token}` } }); const result = await response.json(); console.log("Delete result:", result.result); ``` **Python** ``` python import requests job_id = "user:12345-tempolor:user_id-job:abcdef123456789" token = "API token" apiUrl = f"https://api.useapi.net/v1/tempolor/music/{job_id}" headers = { "Authorization": f"Bearer {token}" } response = requests.delete(apiUrl, headers=headers) result = response.json() print(f"Delete result: {result.get('result')}") ``` === URL: https://useapi.net/docs/api-tempolor-v1/delete-tempolor-music-midi-midiItemId === Document URL: https://useapi.net/docs/api-tempolor-v1/delete-tempolor-music-midi-midiItemId --- layout: default title: DELETE music/midi description: "Delete a previously uploaded MIDI file by midiItemId via DELETE music/midi/midiItemId in the useapi.net TemPolor API v1." parent: TemPolor API v1 nav_order: 1600 --- ## Delete a MIDI file May 15, 2025 --- This endpoint deletes a previously uploaded MIDI file. > **https://api.useapi.net/v1/tempolor/music/midi/`midiItemId`** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Path Parameters - `midiItemId` is **required**. The MIDI file ID returned from a previous [POST music/midi](/docs/api-tempolor-v1/post-tempolor-music-midi) request. ##### Responses **200** **200 OK** ```json { "result": true } ``` **400** **400 Bad Request** ```json { "error": "midiItemId has incorrect format", "code": 400 } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** ```json { "error": "No record found for user:12345-tempolor:user_id-midi:abcdef123456789", "code": 404 } ``` ##### Model ```typescript { // TypeScript, all fields are optional result: boolean error: string code: number } ``` ##### Examples **Curl** ``` bash curl -X DELETE -H "Authorization: Bearer …" \ https://api.useapi.net/v1/tempolor/music/midi/user:12345-tempolor:user_id-midi:abcdef123456789 ``` **JavaScript** ``` javascript const midiItemId = "user:12345-tempolor:user_id-midi:abcdef123456789"; const token = "API token"; const apiUrl = `https://api.useapi.net/v1/tempolor/music/midi/${midiItemId}`; const response = await fetch(apiUrl, { method: "DELETE", headers: { "Authorization": `Bearer ${token}` } }); const result = await response.json(); console.log("Delete result:", result.result); ``` **Python** ``` python import requests midi_item_id = "user:12345-tempolor:user_id-midi:abcdef123456789" token = "API token" apiUrl = f"https://api.useapi.net/v1/tempolor/music/midi/{midi_item_id}" headers = { "Authorization": f"Bearer {token}" } response = requests.delete(apiUrl, headers=headers) result = response.json() print(f"Delete result: {result.get('result')}") ``` === URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-accounts-user_id === Document URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-accounts-user_id --- layout: default title: GET accounts/`user_id` description: "Retrieve configuration details for a specific TemPolor account by user_id via GET accounts/user_id in the useapi.net TemPolor API v1." parent: TemPolor API v1 nav_order: 300 --- ## Retrieve TemPolor API account configuration for `user_id` May 15, 2025 --- This endpoint retrieves the details of a specific TemPolor account. [Setup TemPolor](/docs/start-here/setup-tempolor) > **https://api.useapi.net/v1/tempolor/accounts/`user_id`** The `user_id` value should correspond to an account configured previously via a [POST accounts](/docs/api-tempolor-v1/post-tempolor-accounts) request. ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Responses **200** **200 OK** ```json { "user_id": "user_id1", "updated": 1715791234567, "updatedUTC": "2025-05-15T14:30:34.567Z", "maxJobs": 10, "requestParams": {} } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** Configuration not found. To create configuration use [POST accounts](/docs/api-tempolor-v1/post-tempolor-accounts). ##### Model ```typescript { // TypeScript user_id: string updated: number // timestamp in milliseconds updatedUTC: string // ISO date string maxJobs: number requestParams: {} } ``` ##### Examples **Curl** ``` bash curl https://api.useapi.net/v1/tempolor/accounts/ \ -H "Accept: application/json" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const user_id = "Previously configured account"; const apiUrl = `https://api.useapi.net/v1/tempolor/accounts/${user_id}`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" user_id = "Previously configured account" apiUrl = f"https://api.useapi.net/v1/tempolor/accounts/{user_id}" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-accounts === Document URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-accounts --- layout: default title: GET accounts description: "List all configured TemPolor API accounts via GET accounts in the useapi.net TemPolor API v1 — view each account's maxJobs and request settings." parent: TemPolor API v1 nav_order: 200 --- ## Get List of Accounts May 15, 2025 --- This endpoint retrieves the complete list of configured API accounts for TemPolor. [Setup TemPolor](/docs/start-here/setup-tempolor) > **https://api.useapi.net/v1/tempolor/accounts** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Responses **200** **200 OK** ```json { "user_id1": { "user_id": "user_id1", "updated": 1715791234567, "updatedUTC": "2025-05-15T14:30:34.567Z", "maxJobs": 10, "requestParams": {} }, "user_id2": { "user_id": "user_id2", "updated": 1715791234567, "updatedUTC": "2025-05-15T14:30:34.567Z", "maxJobs": 20, "requestParams": {} } } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** Returned when no accounts are configured. ##### Model ```typescript { // TypeScript [user_id: string]: { user_id: string updated: number // timestamp in milliseconds updatedUTC: string // ISO date string maxJobs: number requestParams: {} } } ``` ##### Examples **Curl** ``` bash curl -H "Accept: application/json" \ -H "Authorization: Bearer …" \ -X GET https://api.useapi.net/v1/tempolor/accounts ``` **JavaScript** ``` javascript const apiUrl = `https://api.useapi.net/v1/tempolor/accounts`; const api_token = "API token"; const data = { method: 'GET', headers: { 'Authorization': `Bearer ${api_token}`, 'Content-Type': 'application/json' } }; const response = await fetch(apiUrl, data); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests apiUrl = f"https://api.useapi.net/v1/tempolor/accounts" api_token = "API token" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {api_token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-music-artist-voices === Document URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-music-artist-voices --- layout: default title: GET music/artist-voices description: "Browse predefined artist voices for song generation via GET music/artist-voices in the useapi.net TemPolor API v1 — use artistVoiceItemId in POST music/song." parent: TemPolor API v1 nav_order: 1300 --- ## List artist voices May 15, 2025 --- 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](/docs/api-tempolor-v1/post-tempolor-music-song) by providing the `artistVoiceItemId` parameter. > **https://api.useapi.net/v1/tempolor/music/artist-voices/?...** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `user_id` is optional when only one [account](/docs/api-tempolor-v1/get-tempolor-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `cursor` is optional. Pagination cursor for fetching additional pages of results. ##### Responses **200** **200 OK** ```json { "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 } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // 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 **Curl** ``` bash # 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" ``` **JavaScript** ``` javascript 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; } ``` **Python** ``` python 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 ``` === URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-music-cloned-voices === Document URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-music-cloned-voices --- layout: default title: GET music/cloned-voices description: "List cloned voices you have created for use in song generation via GET music/cloned-voices in the useapi.net TemPolor API v1." parent: TemPolor API v1 nav_order: 1800 --- ## List cloned voices May 15, 2025 --- This endpoint retrieves a list of cloned voices that you've previously created using [POST music/cloned-voices](/docs/api-tempolor-v1/post-tempolor-music-cloned-voices). These cloned voices can be used in music generation with [POST music/song](/docs/api-tempolor-v1/post-tempolor-music-song). > **https://api.useapi.net/v1/tempolor/music/cloned-voices/?...** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `user_id` is optional when only one [account](/docs/api-tempolor-v1/get-tempolor-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `cursor` is optional. Pagination cursor for fetching additional pages of results. ##### Responses **200** **200 OK** ```json { "records": [ { "isAddRel": false, "relSource": "", "ucid": "user_id", "bizType": "user", "operatorType": "gen", "itemId": "abcdef123456789", "rootItemId": "abcdef123456789", "parentItemId": "abcdef123456789", "name": "My Custom Voice", "resourceUrl": "voice_cloned/audio/abcdef123456789.mp3", "coverUrl": "", "readStatus": 0, "status": 30, "vocalUrl": "https://example.com/cloned-voice/abcdef123456789.mp3", "createTime": 1716565425000, "updateTime": 1716565700000, "labels": [], "clonedVoiceItemId": "user:12345-tempolor:user_id-voice:abcdef123456789" }, { "isAddRel": false, "relSource": "", "ucid": "user_id", "bizType": "user", "operatorType": "gen", "itemId": "fedcba987654321", "rootItemId": "fedcba987654321", "parentItemId": "fedcba987654321", "name": "Second Voice Sample", "resourceUrl": "voice_cloned/audio/fedcba987654321.mp3", "coverUrl": "", "readStatus": 0, "status": 30, "vocalUrl": "https://example.com/cloned-voice/fedcba987654321.mp3", "createTime": 1716475425000, "updateTime": 1716475700000, "labels": [], "clonedVoiceItemId": "user:12345-tempolor:user_id-voice:fedcba987654321" } ], "hasNext": false, "cursor": "" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // TypeScript, all fields are optional records: { isAddRel: boolean relSource: string ucid: string bizType: string operatorType: string itemId: string rootItemId: string parentItemId: string name: string resourceUrl: string coverUrl: string readStatus: number status: number vocalUrl: string createTime: number updateTime: number labels: string[] clonedVoiceItemId: string }[] hasNext: boolean cursor: string error: string code: number } ``` ##### Examples **Curl** ``` bash # List all cloned voices curl -H "Authorization: Bearer …" \ https://api.useapi.net/v1/tempolor/music/cloned-voices?user_id=user_id # Paginate through results using cursor curl -H "Authorization: Bearer …" \ "https://api.useapi.net/v1/tempolor/music/cloned-voices?user_id=user_id&cursor=next_page_cursor_token" ``` **JavaScript** ``` javascript 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/cloned-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} cloned voices`); // Example of fetching all pages async function fetchAllClonedVoices(userId) { let allRecords = []; let nextCursor = ""; let hasMore = true; while (hasMore) { let url = `https://api.useapi.net/v1/tempolor/music/cloned-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; } ``` **Python** ``` python 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/cloned-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', []))} cloned voices") # Example of fetching all pages def fetch_all_cloned_voices(user_id): all_records = [] next_cursor = "" has_more = True while has_more: url = f"https://api.useapi.net/v1/tempolor/music/cloned-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 ``` === URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-music-download-job_id === Document URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-music-download-job_id --- layout: default title: GET music/download/`job_id` description: "Retrieve a download URL for a completed TemPolor music generation job via GET music/download/job_id in the useapi.net TemPolor API v1." parent: TemPolor API v1 nav_order: 1200 --- ## Download generated music May 15, 2025 --- This endpoint retrieves a download URL for a completed music generation job. The `job_id` must be from a successfully completed generation job that can be verified with [GET music/`job_id`](/docs/api-tempolor-v1/get-tempolor-music-job_id). > **https://api.useapi.net/v1/tempolor/music/download/`job_id`** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Path Parameters - `job_id` is **required**. The job returned from a previous [POST music/song](/docs/api-tempolor-v1/post-tempolor-music-song) or [POST music/instrumental](/docs/api-tempolor-v1/post-tempolor-music-instrumental) request. ##### Query Parameters - `file_format` is optional. Specifies the format of the generated music to download. Supported values: * `mp3` - MP3 format (default) * `wav` - WAV format (higher quality) * `stems` - ZIP archive containing separated stems (vocals, instruments, etc.) ##### Responses **200** **200 OK** ```json { "url": "https://ugc-cdn.api.instabeat.ai/ai_material/ai_material/mp3/abcdef123456789.mp3?auth_key=1747536678-0-0-9c67b3d5f8a2c41e0d7f6eab3f82fb45", "remainSeconds": 0 } ``` The download URL expires after `remainSeconds` seconds. **400** **400 Bad Request** ```json { "error": "Generation is not completed yet (0)", "code": 400 } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** ```json { "error": "No record found for user:12345-tempolor:user_id-job:abcdef123456789", "code": 404 } ``` ##### Model ```typescript { // TypeScript, all fields are optional url: string remainSeconds: number error: string code: number } ``` ##### Examples **Curl** ``` bash # Download in MP3 format (default) curl -H "Authorization: Bearer …" \ https://api.useapi.net/v1/tempolor/music/download/user:12345-tempolor:user_id-job:abcdef123456789 # Download in WAV format (higher quality) curl -H "Authorization: Bearer …" \ "https://api.useapi.net/v1/tempolor/music/download/user:12345-tempolor:user_id-job:abcdef123456789?file_format=wav" # Download stems (separated vocal, instruments, etc.) curl -H "Authorization: Bearer …" \ "https://api.useapi.net/v1/tempolor/music/download/user:12345-tempolor:user_id-job:abcdef123456789?file_format=stems" ``` **JavaScript** ``` javascript const job_id = "user:12345-tempolor:user_id-job:abcdef123456789"; const token = "API token"; const file_format = "mp3"; // or "wav" or "stems" const apiUrl = `https://api.useapi.net/v1/tempolor/music/download/${job_id}?file_format=${file_format}`; const response = await fetch(apiUrl, { method: "GET", headers: { "Authorization": `Bearer ${token}` } }); const result = await response.json(); console.log("Download URL:", result.url); // Example of downloading the file async function downloadFile(downloadUrl, fileName) { const fileResponse = await fetch(downloadUrl); const blob = await fileResponse.blob(); // For browser environments const url = window.URL.createObjectURL(blob); const a = document.createElement('a'); a.style.display = 'none'; a.href = url; a.download = fileName; document.body.appendChild(a); a.click(); window.URL.revokeObjectURL(url); // For Node.js environments // const fs = require('fs'); // const buffer = Buffer.from(await blob.arrayBuffer()); // fs.writeFileSync(fileName, buffer); } // If the request was successful, download the file if (result.url) { const fileName = `tempolor-music-${Date.now()}.${file_format === 'stems' ? 'zip' : file_format}`; await downloadFile(result.url, fileName); } ``` **Python** ``` python import requests import os job_id = "user:12345-tempolor:user_id-job:abcdef123456789" token = "API token" file_format = "mp3" # or "wav" or "stems" apiUrl = f"https://api.useapi.net/v1/tempolor/music/download/{job_id}?file_format={file_format}" headers = { "Authorization": f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) result = response.json() print("Download URL:", result.get("url")) # Example of downloading the file def download_file(download_url, file_name): file_response = requests.get(download_url) with open(file_name, 'wb') as f: f.write(file_response.content) print(f"File downloaded as {file_name}") # If the request was successful, download the file if result.get("url"): if file_format == "stems": file_name = f"tempolor-music-{job_id.split(':')[-1]}.zip" else: file_name = f"tempolor-music-{job_id.split(':')[-1]}.{file_format}" download_file(result.get("url"), file_name) ``` === URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-music-job_id === Document URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-music-job_id --- layout: default title: GET music/`job_id` description: "Poll the status and results of a music generation job by job_id via GET music/job_id in the useapi.net TemPolor API v1 — status values and a live Try It console." parent: TemPolor API v1 nav_order: 1000 --- ## Check music generation status and results May 15, 2025 (September 25, 2026) --- This endpoint checks the status of a previously submitted music generation job. The `job_id` is returned from [POST music/song](/docs/api-tempolor-v1/post-tempolor-music-song) or [POST music/instrumental](/docs/api-tempolor-v1/post-tempolor-music-instrumental). > **https://api.useapi.net/v1/tempolor/music/`job_id`** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Path Parameters - `job_id` is **required**. The job returned from a previous [POST music/song](/docs/api-tempolor-v1/post-tempolor-music-song) or [POST music/instrumental](/docs/api-tempolor-v1/post-tempolor-music-instrumental) request. ##### Status Values The response includes a `status` field with the following possible values: | status | status_name | status_final | Description | |--------|-------------|--------------|------------------------------------------| | 0…9 | GENERATING | False | The music is still being generated | | 10…29 | FAILED | True | The music generation has failed, e.g. `11` failed on TemPolor's side, `12` rejected by content moderation | | 30+ | COMPLETED | True | The music has been successfully generated| A failed generation can be retried on the TemPolor website, where it keeps the same `job_id`. Otherwise submit a new request. When the status is COMPLETED, you can download the music using the [GET music/download/`job_id`](/docs/api-tempolor-v1/get-tempolor-music-download-job_id) endpoint. ##### Responses **200** **200 OK**
Example Response ```json { "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": "tempolor-2s-v5", "modelShowName": "v4.8" }, "editType": "gen", "operatorType": "gen", "rootItemId": "abcdef123456789", "parentItemId": "abcdef123456789", "canExtend": true, "canEditLyrics": true, "canFixVocals": true, "canReplaced": false } ```
**400** **400 Bad Request** ```json { "error": "job_id has incorrect format", "code": 400 } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **404** **404 Not Found** ```json { "error": "No record found for user:12345-tempolor:user_id-job:abcdef123456789", "code": 404 } ``` ##### Model ```typescript { // TypeScript, all fields are optional 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 status: number status_name: string // "GENERATING", "FAILED", "COMPLETED" 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 } createTime: number updateTime: number ltmMaterialExtendDto: { lyricsPrompt: string description: string prompt: string genMode: number model: string } editType: string operatorType: string canExtend: boolean error: string code: number } ``` ##### Examples **Curl** ``` bash curl -H "Authorization: Bearer …" \ https://api.useapi.net/v1/tempolor/music/user:12345-tempolor:user_id-job:abcdef123456789 ``` **JavaScript** ``` javascript const job_id = "user:12345-tempolor:user_id-job:abcdef123456789"; const token = "API token"; const apiUrl = `https://api.useapi.net/v1/tempolor/music/${job_id}`; const response = await fetch(apiUrl, { method: "GET", headers: { "Authorization": `Bearer ${token}` } }); const result = await response.json(); console.log("response", {response, result}); // Polling example - check status every 10 seconds until completed or failed async function pollJobStatus(job_id) { const apiUrl = `https://api.useapi.net/v1/tempolor/music/${job_id}`; while (true) { const response = await fetch(apiUrl, { method: "GET", headers: { "Authorization": `Bearer ${token}` } }); const result = await response.json(); console.log(`Job status: ${result.status_name}, Progress: ${result.progress}%`); if (result.status_final) { console.log(`Music generation ${result.status_name.toLowerCase()}`); return result; } // Wait 10 seconds before checking again await new Promise(resolve => setTimeout(resolve, 10000)); } } ``` **Python** ``` python import requests import time job_id = "user:12345-tempolor:user_id-job:abcdef123456789" token = "API token" apiUrl = f"https://api.useapi.net/v1/tempolor/music/{job_id}" headers = { "Authorization": f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response.status_code, response.json()) # Polling example - check status every 10 seconds until completed or failed def poll_job_status(job_id): apiUrl = f"https://api.useapi.net/v1/tempolor/music/{job_id}" while True: response = requests.get(apiUrl, headers=headers) result = response.json() print(f"Job status: {result.get('status_name')}, Progress: {result.get('progress')}%") if result.get('status_final'): print(f"Music generation {result.get('status_name').lower()}") return result # Wait 10 seconds before checking again time.sleep(10) ``` === URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-music-midi === Document URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-music-midi --- layout: default title: GET music/midi description: "List uploaded MIDI files available as generation templates via GET music/midi in the useapi.net TemPolor API v1 — use midiItemId with POST music/song." parent: TemPolor API v1 nav_order: 1500 --- ## List MIDI files May 15, 2025 --- This endpoint retrieves a list of MIDI files that you've previously uploaded using [POST music/midi](/docs/api-tempolor-v1/post-tempolor-music-midi). These MIDI files can be used as templates for music generation with [POST music/song](/docs/api-tempolor-v1/post-tempolor-music-song). > **https://api.useapi.net/v1/tempolor/music/midi/?...** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `user_id` is optional when only one [account](/docs/api-tempolor-v1/get-tempolor-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `cursor` is optional. Pagination cursor for fetching additional pages of results. ##### Responses **200** **200 OK** ```json { "records": [ { "opType": "upload", "ucid": "user_id", "midiItemId": "user:12345-tempolor:user_id-midi:abcdef123456789", "name": "Piano Composition", "midiUrl": "https://ugc-cdn.api.instabeat.ai/midi/file/abcdef123456789.mid" }, { "opType": "upload", "ucid": "user_id", "midiItemId": "user:12345-tempolor:user_id-midi:fedcba987654321", "name": "Guitar Progression", "midiUrl": "https://ugc-cdn.api.instabeat.ai/midi/file/fedcba987654321.mid" } ], "hasNext": false, "cursor": "" } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // TypeScript, all fields are optional records: { opType: string ucid: string midiItemId: string name: string midiUrl: string midiType?: string midiValue?: string }[] hasNext: boolean cursor: string error: string code: number } ``` ##### Examples **Curl** ``` bash # List all MIDI files curl -H "Authorization: Bearer …" \ https://api.useapi.net/v1/tempolor/music/midi/?user_id=user_id # Paginate through results using cursor curl -H "Authorization: Bearer …" \ "https://api.useapi.net/v1/tempolor/music/midi/?user_id=user_id&cursor=next_page_cursor_token" ``` **JavaScript** ``` javascript 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/midi/?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} MIDI files`); // Example of fetching all pages async function fetchAllMidiFiles(userId) { let allRecords = []; let nextCursor = ""; let hasMore = true; while (hasMore) { let url = `https://api.useapi.net/v1/tempolor/music/midi/?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; } ``` **Python** ``` python 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/midi/?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', []))} MIDI files") # Example of fetching all pages def fetch_all_midi_files(user_id): all_records = [] next_cursor = "" has_more = True while has_more: url = f"https://api.useapi.net/v1/tempolor/music/midi/?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 ``` === URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-music === Document URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-music --- layout: default title: GET music description: "List previously generated music jobs with type filtering and cursor pagination via GET music in the useapi.net TemPolor API v1." parent: TemPolor API v1 nav_order: 900 --- ## List music generation jobs May 15, 2025 --- 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 ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Query Parameters - `user_id` is optional when only one [account](/docs/api-tempolor-v1/get-tempolor-accounts) 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** **200 OK**
Example Response ```json { "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": "tempolor-2s-v5", "modelShowName": "v4.8" }, "editType": "gen", "operatorType": "gen", "rootItemId": "abcdef123456789", "parentItemId": "abcdef123456789", "canExtend": true, "canEditLyrics": true, "canFixVocals": true, "canReplaced": false } ], "hasNext": true, "cursor": "next_page_cursor_token" } ```
**400** **400 Bad Request** ```json { "error": "Invalid type parameter. Must be 'song' or 'instrumental'", "code": 400 } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // 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 **Curl** ``` bash # 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" ``` **JavaScript** ``` javascript 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; } ``` **Python** ``` python 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 ``` === URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-scheduler-available === Document URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-scheduler-available --- layout: default title: GET scheduler/available description: "Check available generation capacity and currently active jobs across all configured accounts via GET scheduler/available in the useapi.net TemPolor API v1." parent: TemPolor API v1 nav_order: 2000 --- ## Get available capacity May 15, 2025 --- Get information about currently executing jobs and available capacity for all configured accounts. > **https://api.useapi.net/v1/tempolor/scheduler/available** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Responses **200** **200 OK** The response contains information about currently executing jobs and available capacity. ```json { "executing": [ { "job_id": "user:12345-tempolor:12345-job:abcdef123456789", "started": "2025-05-15T12:34:56.789Z", "elapsed": "01:23", "replyUrl": "https://example.com/callback", "replyRef": "my-reference" } ], "available": [ { "user_id": "12345", "maxJobs": 10, "executing": 1, "available": 9 }, { "user_id": "67890", "maxJobs": 5, "executing": 0, "available": 5 } ] } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { executing: [ // Currently executing jobs { job_id: string started: string // ISO timestamp when the job started elapsed: string // Time elapsed since start in MM:SS format replyUrl?: string // Optional callback URL if specified during job creation replyRef?: string // Optional reference if specified during job creation } ], available: [ // Accounts with available capacity { user_id: string // Account identifier maxJobs: number // Maximum concurrent jobs allowed for this account executing: number // Number of currently executing jobs available: number // Number of available job slots (maxJobs - executing) } ] } ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/tempolor/scheduler/available" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const apiUrl = "https://api.useapi.net/v1/tempolor/scheduler/available"; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}` } }); const result = await response.json(); console.log("Scheduler info:", result); // Find account with most available capacity if (result.available && result.available.length > 0) { const bestAccount = result.available[0]; // Sorted by availability console.log(`Best account to use: ${bestAccount.user_id} (${bestAccount.available} slots available)`); } ``` **Python** ``` python import requests token = "API token" api_url = "https://api.useapi.net/v1/tempolor/scheduler/available" headers = { 'Authorization': f'Bearer {token}' } response = requests.get(api_url, headers=headers) result = response.json() print("Scheduler info:", result) # Find account with most available capacity if result.get('available') and len(result['available']) > 0: best_account = result['available'][0] # Sorted by availability print(f"Best account to use: {best_account['user_id']} ({best_account['available']} slots available)") ``` === URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-scheduler === Document URL: https://useapi.net/docs/api-tempolor-v1/get-tempolor-scheduler --- layout: default title: GET scheduler description: "List all currently executing TemPolor music generation jobs via GET scheduler in the useapi.net TemPolor API v1." parent: TemPolor API v1 nav_order: 1900 --- ## List scheduled jobs May 15, 2025 --- Get a list of currently executing music generation jobs. > **https://api.useapi.net/v1/tempolor/scheduler/** ##### Request Headers ``` yaml Authorization: Bearer {API token} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Responses **200** **200 OK** The response contains an array of currently executing music generation jobs. ```json [ { "job_id": "user:12345-tempolor:user_id-job:abcdef123456789", "started": "2025-05-15T12:34:56.789Z", "elapsed": "01:23", "replyUrl": "https://example.com/callback", "replyRef": "my-reference" } ] ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript [ { // TypeScript representation of each job job_id: string started: string // ISO timestamp when the job started elapsed: string // Time elapsed since start in MM:SS format replyUrl?: string // Optional callback URL if specified during job creation replyRef?: string // Optional reference if specified during job creation } ] ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/tempolor/scheduler/" \ -H "Authorization: Bearer …" ``` **JavaScript** ``` javascript const token = "API token"; const apiUrl = "https://api.useapi.net/v1/tempolor/scheduler/"; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}` } }); const result = await response.json(); console.log("Current jobs:", result); ``` **Python** ``` python import requests token = "API token" api_url = "https://api.useapi.net/v1/tempolor/scheduler/" headers = { 'Authorization': f'Bearer {token}' } response = requests.get(api_url, headers=headers) result = response.json() print("Current jobs:", result) ``` === URL: https://useapi.net/docs/api-tempolor-v1/post-tempolor-accounts === Document URL: https://useapi.net/docs/api-tempolor-v1/post-tempolor-accounts --- layout: default title: POST accounts description: "Configure a TemPolor API account with credentials via POST accounts in the useapi.net TemPolor API v1 — required before generating music." parent: TemPolor API v1 nav_order: 100 --- ## Create or update TemPolor API account May 15, 2025 --- This endpoint configures a TemPolor API account with the provided credentials. [Setup TemPolor](/docs/start-here/setup-tempolor) > **https://api.useapi.net/v1/tempolor/accounts** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "requestParams": {}, "maxJobs": 10 } ``` - `requestParams` is **required**, see [Setup TemPolor](/docs/start-here/setup-tempolor) for details on how to obtain it. - `maxJobs` is optional, the maximum number of concurrent jobs allowed for this account. Default is 10. ##### Responses **200** **200 OK** ```json { "user_id": "123456789", "updated": 1715791234567, "updatedUTC": "2025-05-15T14:30:34.567Z", "maxJobs": 10, "requestParams": {} } ``` **400** **400 Bad Request** ```json { "error": "Parameter requestParams is required", "code": 400 } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **402** **402 Payment Required** ```json { "error": "Subscription required", "code": 402 } ``` ##### Model ```typescript { // TypeScript user_id: string updated: number // timestamp in milliseconds updatedUTC: string // ISO date string maxJobs: number requestParams: {} } ``` ##### Examples **Curl** ``` bash curl -X POST https://api.useapi.net/v1/tempolor/accounts \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "requestParams": {}, "maxJobs": 10 }' ``` **JavaScript** ``` javascript const apiUrl = `https://api.useapi.net/v1/tempolor/accounts`; const api_token = "API token"; const data = { method: 'POST', headers: { 'Authorization': `Bearer ${api_token}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ requestParams: {}, maxJobs: 10 }) }; const response = await fetch(apiUrl, data); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests import json apiUrl = "https://api.useapi.net/v1/tempolor/accounts" api_token = "API token" headers = { "Content-Type": "application/json", "Authorization": f"Bearer {api_token}" } payload = { "requestParams": {}, "maxJobs": 10 } response = requests.post(apiUrl, headers=headers, data=json.dumps(payload)) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-tempolor-v1/post-tempolor-music-cloned-voices === Document URL: https://useapi.net/docs/api-tempolor-v1/post-tempolor-music-cloned-voices --- layout: default title: POST music/cloned-voices description: "Upload an audio sample to clone a voice for use in song generation via POST music/cloned-voices in the useapi.net TemPolor API v1." parent: TemPolor API v1 nav_order: 1700 --- ## Upload voice sample for cloning May 15, 2025 --- This endpoint uploads an audio sample for voice cloning, which can then be used in the [POST music/song](/docs/api-tempolor-v1/post-tempolor-music-song) endpoint to generate vocals with your cloned voice. [POST raw content using Make.com and similar nocode tools.](/docs/questions-and-answers#how-post-raw-content-to-runwaymlassets-and-minimaxfiles-using-makecom-and-similar-nocode-tools) > **https://api.useapi.net/v1/tempolor/music/cloned-voices/?...** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: {audio content-type} ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. - `Content-Type` is **required**, select from the table below: | Content-Type | File Extension | | ------------ | -------------- | | audio/mp4 | m4a | | audio/x-m4a | m4a | | audio/mpeg | mp3 | | audio/wav | wav | | audio/wave | wav | | audio/flac | flac | | audio/x-flac | flac | ##### Query Parameters - `user_id` is optional when only one [account](/docs/api-tempolor-v1/get-tempolor-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `name` is **required**. Specify a name for your cloned voice. ##### Responses **200** **200 OK** The cloned voice is immediately available to use in [POST music/song](/docs/api-tempolor-v1/post-tempolor-music-song) by providing the returned `clonedVoiceItemId`. ```json { "result": true, "itemId": "abcdef123456789", "clonedVoiceItemId": "user:12345-tempolor:user_id-voice:abcdef123456789" } ``` **202** **202 Accepted** The voice cloning process is still in progress. Check back later using [GET music/cloned-voices](/docs/api-tempolor-v1/get-tempolor-music-cloned-voices) to see if the voice is ready. ```json { "itemId": "abcdef123456789", "clonedVoiceItemId": "user:12345-tempolor:user_id-voice:abcdef123456789", "message": "Voice cloning is still processing after 120 seconds. Please check back later." } ``` **400** **400 Bad Request** ```json { "error": "Empty file received", "code": 400 } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // TypeScript, all fields are optional result: boolean itemId: string clonedVoiceItemId: string message: string error: string code: number } ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/tempolor/music/cloned-voices/?name=my-custom-voice&user_id=" \ -H "Authorization: Bearer …" \ -H "Content-Type: audio/mpeg" \ --data-binary @/path/to/your/voice-sample.mp3 ``` **JavaScript** ``` javascript const token = "API token"; const user_id = "Previously configured account"; const name = "Your voice name"; const apiUrl = `https://api.useapi.net/v1/tempolor/music/cloned-voices/?name=${name}&user_id=${user_id}`; let blob; /* // Example 1: Fetch audio from URL const audioUrl = "https://example.com/audio-samples/voice-sample.mp3"; const responseAudio = await fetch(audioUrl); blob = await responseAudio.blob(); */ /* // Example 2: Load audio from local file (Node.js) const fs = require('fs'); const audioFileName = "./voice-sample.mp3"; blob = new Blob([fs.readFileSync(audioFileName)]); */ /* // Example 3: Load from input file html element // const audioFile = document.getElementById(`audio-file`); if (audioFile.files[0]) blob = audioFile.files[0]; */ const response = await fetch(apiUrl, { method: "POST", headers: { "Authorization": `Bearer ${token}`, "Content-Type": "audio/mpeg" // Adjust based on your file type }, body: blob }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" user_id = "Previously configured account" name = "Your voice name" apiUrl = f"https://api.useapi.net/v1/tempolor/music/cloned-voices/?name={name}&user_id={user_id}" headers = { 'Authorization': f'Bearer {token}', 'Content-Type': 'audio/mpeg' # Adjust based on your file type } # # Example 1: Fetch audio from URL # audio_url = "https://example.com/audio-samples/voice-sample.mp3" # response_audio = requests.get(audio_url) # file_content = response_audio.content # # Example 2: Load audio from local file audio_file_path = "./voice-sample.mp3" with open(audio_file_path, 'rb') as audio_file: file_content = audio_file.read() response = requests.post(apiUrl, headers=headers, data=file_content) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-tempolor-v1/post-tempolor-music-instrumental === Document URL: https://useapi.net/docs/api-tempolor-v1/post-tempolor-music-instrumental --- layout: default title: POST music/instrumental description: "Generate royalty-free instrumental music from a text prompt via POST music/instrumental in the useapi.net TemPolor API v1 — BPM and chord customization supported." parent: TemPolor API v1 nav_order: 700 --- ## Create instrumental music May 15, 2025 (September 25, 2026) --- This endpoint generates instrumental music based on a text prompt and optional musical parameters. > **https://api.useapi.net/v1/tempolor/music/instrumental** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "prompt": "A relaxing lo-fi beat with piano and soft drums", "tonality": "C:major", "bpm": 80, "chords": "C F G Am" } ``` - `user_id` is optional, if not specified, the API will use the account from your request. - `prompt` is **required**, a text description of the desired instrumental music. Maximum length 2000 characters. - `model_instrumental` is optional, the model to use for generation. Supported values: * `i4` - Better musicality and prompt adherence (default) Older model names are still accepted and automatically routed to `i4`. - `tonality` is optional, the musical key for the composition. Supported values: `A:major`, `A:minor`, `Ab:major`, `Ab:minor`, `B:major`, `B:minor`, `Bb:major`, `Bb:minor`, `C#:major`, `C#:minor`, `C:major`, `C:minor`, `D:major`, `D:minor`, `E:major`, `E:minor`, `Eb:major`, `Eb:minor`, `F#:major`, `F#:minor`, `F:major`, `F:minor`, `G:major`, `G:minor` - `bpm` is optional, the tempo in beats per minute. Valid range: 50…190. - `chords` is optional, chord progression for the composition. Maximum length 200 characters. - `replyUrl` is optional, a callback URL that will be called with generation progress updates. Maximum length 1024 characters. We recommend using sites like [webhook.site](https://webhook.site) to test callback URL functionality. Callback body has the same JSON shape as [GET /music/`job_id`](/docs/api-tempolor-v1/get-tempolor-music-job_id) response. A job that has not completed within 60 minutes ends with a final callback with `code` 408 and `status_name` `FAILED`. - `replyRef` is optional, a reference ID that will be included in the callback requests. Maximum length 1024 characters. - `maxJobs` is optional; it specifies the maximum number of concurrent jobs for this request. If not provided, the value will be taken from the account configuration set in [POST accounts](/docs/api-tempolor-v1/post-tempolor-accounts). ##### Responses **200** **200 OK** Use the returned `jobs` values to retrieve generation status and results using [GET music/`job_id`](/docs/api-tempolor-v1/get-tempolor-music-job_id). If you specify the optional parameter [`replyUrl`](#request-body), the API will call the provided `replyUrl` with generation progress updates until the generation is complete or fails. ```json { "result": true, "itemIds": [ "abcdef123456789", "fedcba987654321" ], "jobs": [ "user:12345-tempolor:user_id-job:abcdef123456789", "user:12345-tempolor:user_id-job:fedcba987654321", ], "remainSeconds": 21533, "maxGenCountAtOnce": 10, "unlimited": false, "remainNum": 1534, "totalNum": 3000 } ``` **400** **400 Bad Request** ```json { "error": "Parameter prompt is required", "code": 400 } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **402** **402 Payment Required** ```json { "error": "Subscription required", "code": 402 } ``` **422** **422 Unprocessable Content** TemPolor content moderation rejected the `prompt`. Resubmitting the same text will be rejected again, so change the prompt before retrying. ```json { "error": "TemPolor content moderation rejected the prompt. Resubmitting the same text will be rejected again. (430002)" } ``` **429** **429 Too Many Requests** Wait in a loop for **at least** 30 seconds and retry again. There are two possible cases for API response 429: 1. API query is full and cannot accept new instrumental music generation requests. Size of queue defined by the `maxJobs` value from either the request body or the default from the account configuration set in [POST accounts](/docs/api-tempolor-v1/post-tempolor-accounts). ```json { "error": "Account is busy executing X jobs", "runningJobs": { "": [ { "user_id": "", "job_id": "", "started": 1715791234567, "replyUrl": "call back URL here, if provided", "replyRef": "reference id here, if provided" } ] }, "code": 429 } ``` 2. The API received an HTTP response status 429 from TemPolor. ```json { "error": "please wait for current Generations to finish or upgrade your plan", "code": 429 } ``` ##### Model ```typescript { // TypeScript, all fields are optional result: boolean itemIds: string[] jobs: string[] remainSeconds: number maxGenCountAtOnce: number unlimited: boolean remainNum: number totalNum: number } ``` ##### Examples **Curl** ``` bash curl -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -X POST https://api.useapi.net/v1/tempolor/music/instrumental \ -d '{"prompt": "A relaxing lo-fi beat with piano and soft drums"}' ``` **JavaScript** ``` javascript const apiUrl = `https://api.useapi.net/v1/tempolor/music/instrumental`; const api_token = "API token"; const prompt = "A relaxing lo-fi beat with piano and soft drums"; const data = { method: 'POST', headers: { 'Authorization': `Bearer ${api_token}`, 'Content-Type': 'application/json' } }; data.body = JSON.stringify({ prompt }); const response = await fetch(apiUrl, data); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests apiUrl = f"https://api.useapi.net/v1/tempolor/music/instrumental" api_token = "API token" prompt = "A relaxing lo-fi beat with piano and soft drums" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {api_token}" } body = { "prompt": f"{prompt}" } response = requests.post(apiUrl, headers=headers, json=body) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-tempolor-v1/post-tempolor-music-midi === Document URL: https://useapi.net/docs/api-tempolor-v1/post-tempolor-music-midi --- layout: default title: POST music/midi description: "Upload a MIDI file to use as a structural base for song generation via POST music/midi in the useapi.net TemPolor API v1 — supports audio/midi and audio/x-midi." parent: TemPolor API v1 nav_order: 1400 --- ## Upload MIDI file May 15, 2025 --- This endpoint uploads a MIDI file that can be used as a base for music generation in the [POST music/song](/docs/api-tempolor-v1/post-tempolor-music-song) endpoint. [POST raw content using Make.com and similar nocode tools.](/docs/questions-and-answers#how-post-raw-content-to-runwaymlassets-and-minimaxfiles-using-makecom-and-similar-nocode-tools) > **https://api.useapi.net/v1/tempolor/music/midi/?...** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: audio/midi or audio/x-midi ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. - `Content-Type` is **required**, must be `audio/midi` or `audio/x-midi`. ##### Query Parameters - `user_id` is optional when only one [account](/docs/api-tempolor-v1/get-tempolor-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. - `name` is **required**. Specify a name for your MIDI file. ##### Responses **200** **200 OK** The MIDI file is immediately available to use in [POST music/song](/docs/api-tempolor-v1/post-tempolor-music-song) by providing the returned `midiItemId`. ```json { "isFirst": false, "midiRenderVO": { "opType": "upload", "ucid": "100198329", "midiItemId": "user:12345-tempolor:user_id-midi:abcdef123456789", "name": "my background music", "midiUrl": "https://..." } } ``` **400** **400 Bad Request** ```json { "error": "Content-Type must be audio/midi or audio/x-midi", "code": 400 } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // TypeScript, all fields are optional isFirst: boolean midiRenderVO: { opType: string ucid: string midiItemId: string name: string midiUrl: string } error: string code: number } ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/tempolor/music/midi/?name=my-background-music&user_id=" \ -H "Authorization: Bearer …" \ -H "Content-Type: audio/midi" \ --data-binary @/path/to/your/background-music.mid ``` **JavaScript** ``` javascript const token = "API token"; const user_id = "Previously configured account"; const name = "my-background-music"; const apiUrl = `https://api.useapi.net/v1/tempolor/music/midi/?name=${name}&user_id=${user_id}`; let blob; /* // Example 1: Fetch MIDI from URL const midiUrl = "https://example.com/midi-files/background-music.mid"; const responseMidi = await fetch(midiUrl); blob = await responseMidi.blob(); */ /* // Example 2: Load MIDI from local file (Node.js) const fs = require('fs'); const midiFileName = "./background-music.mid"; blob = new Blob([fs.readFileSync(midiFileName)], { type: "audio/midi" }); */ /* // Example 3: Load from input file html element // const midiFile = document.getElementById(`midi-file`); if (midiFile.files[0]) blob = midiFile.files[0]; */ const response = await fetch(apiUrl, { method: "POST", headers: { "Authorization": `Bearer ${token}`, "Content-Type": "audio/midi" }, body: blob }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests token = "API token" user_id = "Previously configured account" name = "my-background-music" apiUrl = f"https://api.useapi.net/v1/tempolor/music/midi/?name={name}&user_id={user_id}" headers = { 'Authorization': f'Bearer {token}', 'Content-Type': 'audio/midi' } # # Example 1: Fetch MIDI from URL # midi_url = "https://example.com/midi-files/background-music.mid" # response_midi = requests.get(midi_url) # file_content = response_midi.content # # Example 2: Load MIDI from local file midi_file_path = "./background-music.mid" with open(midi_file_path, 'rb') as midi_file: file_content = midi_file.read() response = requests.post(apiUrl, headers=headers, data=file_content) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-tempolor-v1/post-tempolor-music-song === Document URL: https://useapi.net/docs/api-tempolor-v1/post-tempolor-music-song --- layout: default title: POST music/song description: "Generate a royalty-free song with vocals from a text prompt or custom lyrics via POST music/song in the useapi.net TemPolor API v1." parent: TemPolor API v1 nav_order: 600 --- ## Create music with vocals May 15, 2025 (September 25, 2026) --- This endpoint generates a complete song with vocals based on a text prompt and optional parameters. > **https://api.useapi.net/v1/tempolor/music/song** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: application/json # Alternatively you can use multipart/form-data # Content-Type: multipart/form-data ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. ##### Request Body ```json { "prompt": "A cinematic orchestral piece with dramatic string sections and a powerful crescendo", "lyrics": "These are the lyrics for my song\nSecond line of the lyrics", "clonedVoiceItemId": "user:12345-tempolor:user_id-voice:abcdef123456789", "replyUrl": "https://your-callback-url.com", "replyRef": "your-reference-id" } ``` - `user_id` is optional, if not specified, the API will use the account from your request. - `prompt` is **required**, a text description of the desired song. Maximum length 2000 characters. - `lyrics` is optional, custom lyrics for the song. If not provided, lyrics will be auto-generated based on the prompt. Maximum length 3000 characters. - `model_song` is optional, the model to use for generation. Supported values: * `v4.8` - Next-gen proprietary model with better melody, structure and vocals, 30+ languages, max 5 min (default) Older model names are still accepted and automatically routed to `v4.8`. - `artistVoiceItemId` is optional, ID of a predefined artist voice to use for the vocals. Get available voices using [GET artist-voices](/docs/api-tempolor-v1/get-tempolor-music-artist-voices). - `clonedVoiceItemId` is optional, ID of a previously cloned voice to use for the vocals. - To get existing cloned voices, use [GET cloned-voices](/docs/api-tempolor-v1/get-tempolor-music-cloned-voices). - To create a new cloned voice, upload an audio sample using [POST cloned-voices](/docs/api-tempolor-v1/post-tempolor-music-cloned-voices). - `midiItemId` is optional, ID of a previously uploaded MIDI file to base the composition on. - To get existing MIDI files, use [GET midi](/docs/api-tempolor-v1/get-tempolor-music-midi). - To upload a new MIDI file, use [POST midi](/docs/api-tempolor-v1/post-tempolor-music-midi). - `replyUrl` is optional, a callback URL that will be called with generation progress updates. Maximum length 1024 characters. We recommend using sites like [webhook.site](https://webhook.site) to test callback URL functionality. Callback body has the same JSON shape as [GET /music/`job_id`](/docs/api-tempolor-v1/get-tempolor-music-job_id) response. A job that has not completed within 60 minutes ends with a final callback with `code` 408 and `status_name` `FAILED`. - `replyRef` is optional, a reference ID that will be included in the callback requests. Maximum length 1024 characters. - `maxJobs` is optional; it specifies the maximum number of concurrent jobs for this request. If not provided, the value will be taken from the account configuration set in [POST accounts](/docs/api-tempolor-v1/post-tempolor-accounts). **Important notes:** - You can only use one of `artistVoiceItemId` or `clonedVoiceItemId`, not both. - If you specify a `midiItemId`, you cannot use `artistVoiceItemId` or `clonedVoiceItemId`. ##### Responses **200** **200 OK** Use the returned `jobs` values to retrieve generation status and results using [GET music/`job_id`](/docs/api-tempolor-v1/get-tempolor-music-job_id). If you specify the optional parameter [`replyUrl`](#request-body), the API will call the provided `replyUrl` with generation progress updates until the generation is complete or fails. ```json { "result": true, "itemIds": [ "abcdef123456789", "fedcba987654321" ], "jobs": [ "user:12345-tempolor:user_id-job:abcdef123456789", "user:12345-tempolor:user_id-job:fedcba987654321", ], "remainSeconds": 21533, "maxGenCountAtOnce": 10, "unlimited": false, "remainNum": 1534, "totalNum": 3000 } ``` **400** **400 Bad Request** ```json { "error": "Parameter prompt is required", "code": 400 } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` **402** **402 Payment Required** ```json { "error": "Subscription required", "code": 402 } ``` **404** **404 Not Found** ```json { "error": "The source material does not exist.", "code": 404 } ``` This error may occur if the specified `artistVoiceItemId`, `clonedVoiceItemId`, or `midiItemId` no longer exists. **422** **422 Unprocessable Content** TemPolor content moderation rejected the `prompt` and/or the `lyrics`. The error names the rejected field. Resubmitting the same text will be rejected again, so change the rejected text before retrying. ```json { "error": "TemPolor content moderation rejected the lyrics. Resubmitting the same text will be rejected again. (430002)" } ``` **429** **429 Too Many Requests** Wait in a loop for **at least** 30 seconds and retry again. There are two possible cases for API response 429: 1. API query is full and cannot accept new music generation requests. Size of queue defined by the `maxJobs` value from either the request body or the default from the account configuration set in [POST accounts](/docs/api-tempolor-v1/post-tempolor-accounts). ```json { "error": "Account is busy executing X jobs", "runningJobs": { "": [ { "user_id": "", "job_id": "", "started": 1715791234567, "replyUrl": "call back URL here, if provided", "replyRef": "reference id here, if provided" } ] }, "code": 429 } ``` 2. The API received an HTTP response status 429 from TemPolor. ```json { "error": "please wait for current Generations to finish or upgrade your plan", "code": 429 } ``` ##### Model ```typescript { // TypeScript, all fields are optional result: boolean itemIds: string[] jobs: string[] remainSeconds: number maxGenCountAtOnce: number unlimited: boolean remainNum: number totalNum: number } ``` ##### Examples **Curl** ``` bash curl -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -X POST https://api.useapi.net/v1/tempolor/music/song \ -d '{"prompt": "A cinematic orchestral piece with dramatic string sections"}' ``` **JavaScript** ``` javascript const apiUrl = `https://api.useapi.net/v1/tempolor/music/song`; const api_token = "API token"; const prompt = "A cinematic orchestral piece with dramatic string sections"; const data = { method: 'POST', headers: { 'Authorization': `Bearer ${api_token}`, 'Content-Type': 'application/json' } }; data.body = JSON.stringify({ prompt }); const response = await fetch(apiUrl, data); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests apiUrl = f"https://api.useapi.net/v1/tempolor/music/song" api_token = "API token" prompt = "A cinematic orchestral piece with dramatic string sections" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {api_token}" } body = { "prompt": f"{prompt}" } response = requests.post(apiUrl, headers=headers, json=body) print(response, response.json()) ``` === URL: https://useapi.net/docs/api-tempolor-v1/post-tempolor-music-stems-splitter === Document URL: https://useapi.net/docs/api-tempolor-v1/post-tempolor-music-stems-splitter --- layout: default title: POST music/stems-splitter description: "Split an uploaded MP3, WAV, M4A, or FLAC file into separate instrument stems (vocals, drums, bass) via POST music/stems-splitter in the useapi.net TemPolor API v1." parent: TemPolor API v1 nav_order: 800 --- ## Split audio into stems May 15, 2025 --- Upload an audio file (MP3, WAV, M4A, FLAC) and split it into separate instrument stems (vocals, drums, bass, etc). [POST raw content using Make.com and similar nocode tools.](/docs/questions-and-answers#how-post-raw-content-to-runwaymlassets-and-minimaxfiles-using-makecom-and-similar-nocode-tools) > **https://api.useapi.net/v1/tempolor/music/stems-splitter/?…** ##### Request Headers ``` yaml Authorization: Bearer {API token} Content-Type: select from the table below ``` - `API token` is **required**, see [Setup useapi.net](/docs/start-here/setup-useapi) for details. - `Content-Type` is **required**, select from the table below: | Content-Type | File Extension | | ------------ | -------------- | | audio/mpeg | mp3 | | audio/wav | wav | | audio/wave | wav | | audio/mp4 | m4a | | audio/x-m4a | m4a | | audio/flac | flac | | audio/x-flac | flac | ##### Query Parameters - `user_id` is optional when only one [account](/docs/api-tempolor-v1/get-tempolor-accounts) configured. However, if you have multiple accounts configured, this parameter becomes **required**. ##### Responses **200** **200 OK** When the response includes `stemsZipUrl`, the processing is complete and you can download the ZIP file containing the separated stems. ```json { "state": 2, "title": "audio_file.mp3", "stemsZipUrl": "https://example.com/path/to/stems.zip" } ``` **400** **400 Bad Request** The server encountered an error processing your request. ```json { "error": "", "code": 400 } ``` **401** **401 Unauthorized** ```json { "error": "Unauthorized", "code": 401 } ``` ##### Model ```typescript { // TypeScript, all fields are optional state: number title: string stemsZipUrl: string // URL to download the zip with separated stems audioType: string detail: string[] error: string code: number } ``` ##### Examples **Curl** ``` bash curl "https://api.useapi.net/v1/tempolor/music/stems-splitter/?user_id=" \ -H "Authorization: Bearer …" \ -H "Content-Type: audio/mpeg" \ --data-binary @/path/to/your/audio-track.mp3 ``` **JavaScript** ``` javascript const token = "API token"; const user_id = "Previously configured account"; const apiUrl = `https://api.useapi.net/v1/tempolor/music/stems-splitter/?user_id=${user_id}`; let blob; /* // Example 1: Fetch audio from URL const audioUrl = "https://example.com/path/to/audio-track.mp3"; const responseAudio = await fetch(audioUrl); blob = await responseAudio.blob(); */ /* // Example 2: Load audio from local file (Blob) const fsp = require('fs').promises; const audioFileName = "./audio-track.mp3"; blob = new Blob([await fsp.readFile(audioFileName)]); */ /* // Example 3: Load from input file html element // const audioFile = document.getElementById(`audio-file`); if (audioFile.files[0]) blob = audioFile.files[0]; */ // Upload the audio file for stem splitting const response = await fetch(apiUrl, { method: "POST", headers: { "Authorization": `Bearer ${token}`, "Content-Type": "audio/mpeg" }, body: blob }); const result = await response.json(); console.log("response", {response, result}); ``` **Python** ``` python import requests import time token = "API token" user_id = "Previously configured account" apiUrl = f"https://api.useapi.net/v1/tempolor/music/stems-splitter/?user_id={user_id}" headers = { 'Authorization': f'Bearer {token}', 'Content-Type': 'audio/mpeg' } # # Example 1: Fetch audio from URL # import requests # audio_url = "https://example.com/path/to/audio-track.mp3" # response_audio = requests.get(audio_url) # file_content = response_audio.content # # Example 2: Load audio from local file audio_file_path = "./audio-track.mp3" with open(audio_file_path, 'rb') as audio_file: file_content = audio_file.read() response = requests.post(apiUrl, headers=headers, data=file_content) result = response.json() print(response.status_code, result) ``` === Cross-reference: General Q&A === For cross-cutting tips (rate limiting, prompt moderation, common patterns) see https://useapi.net/assets/aibot/qa.txt WARNING: Q&A items are general-purpose and may reference deprecated APIs, sunsetted services, or scenarios not applicable to the API documented above. Cross-check against this service's endpoint documentation before applying any Q&A guidance.