Music 1
widelabs/music-1
Wide LabsMusicREST
Price$0.15 /min
EndpointPOST /v2/audio/music-1/generate REST
Quick start
Send a JSON request to the endpoint below; the response carries the result.
curl -X POST https://api.widelabs.tr/v2/audio/music-1/generate \ -H "Authorization: Bearer $WIDELABS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "An upbeat indie pop song about a road trip at sunset, warm female vocals, jangly guitars, handclaps and a catchy sing-along chorus", "music_length_ms": 30000, "async": true }'
import os
import requests
resp = requests.post(
"https://api.widelabs.tr/v2/audio/music-1/generate",
headers={"Authorization": "Bearer " + os.environ["WIDELABS_API_KEY"]},
json={
"prompt": "An upbeat indie pop song about a road trip at sunset, warm female vocals, jangly guitars, handclaps and a catchy sing-along chorus",
"music_length_ms": 30000,
"async": True
},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.widelabs.tr/v2/audio/music-1/generate", { method: "POST", headers: { Authorization: `Bearer ${process.env.WIDELABS_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ prompt: "An upbeat indie pop song about a road trip at sunset, warm female vocals, jangly guitars, handclaps and a catchy sing-along chorus", music_length_ms: 30000, async: true }), }); console.log(await resp.json());
Parameters
| Name | Type | Description |
|---|---|---|
store_output | "provider" | "wl1d" | "wl7d" | "wl30d" default "provider" | Where this request's output media is hosted, and for how long. `provider` (default) returns a Wide Labs CDN link that live-proxies the provider for 1 hour — the same hour the task record itself lives. `wl1d` / `wl7d` / `wl30d` copy the output into Wide Labs own storage and keep BOTH the link and the task record for 1, 7 or 30 days,… |
prompt | string | What to make: genre, mood, instruments, structure, lyrics (max 4,100 characters). Names of real artists, songs, albums or labels and quoted lyrics are refused, with a suggested prompt in the error. |
composition_plan | object | A section-by-section plan instead of a prompt; billed on the sum of the sections' durations. |
music_length_ms | integer | Length in milliseconds, 3,000–600,000 (prompt only). Billed on this length; when omitted the model picks it and the delivered length is billed. |
force_instrumental | boolean | Guarantee no vocals (prompt only). Default false. |
seed | integer | Best-effort determinism (composition_plan only). |
output_format | "mp3_48000_128" | "mp3_48000_192" | "mp3_48000_240" | "mp3_48000_320" | "mp3_22050_32" | "mp3_24000_48" | "mp3_44100_32" | "mp3_44100_64" | … default "mp3_48000_192" | codec_samplerate[_bitrate], stereo where the codec allows. The response's content_type follows it. |
with_timestamps | boolean | Also return `words_timestamps` for the lyrics. Default false. |
with_waveform_visual | boolean | Also return `waveform_visual` for display. Default false. |
webhook_url | string | HTTPS URL to receive a signed completion webhook when the async task reaches a terminal state (requires an API key, "async": true and direct mode; otherwise 422). See the Webhooks section for the delivery payload and events, and GET /v2/customer/webhook-secret for the signing secret + verification. |
Related
Similar models
Wide Labs
TTS 1
widelabs/tts-1
Text-to-speech
Price$0.08
per 1K chars
Wide Labs
STT 1
widelabs/stt-1
Transcription
Price$0.0037
per min
Wide Labs
TTS 1 Turbo
widelabs/tts-1-turbo
Text-to-speech
Price$0.04
per 1K chars
MiniMax
MiniMax Speech 2.8 HD
MiniMax/speech-2.8-hd
Text-to-speech
Price$0.049
per 1K chars
Start building on Wide Labs Compute
Create an account, add credit and send your first request with the SDK you already use.