Skip to main content
POST
/
audio
/
{audio_id}
/
generate_url
Generate audio stream URL
curl --request POST \
  --url https://api.videodb.io/audio/{audio_id}/generate_url \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "format": "mp3",
  "quality": "high"
}
'
{
  "success": true,
  "data": {
    "stream_url": "https://stream.videodb.io/a/12345"
  }
}
Generate shareable URLs for streaming or downloading audio files.
import videodb

conn = videodb.connect(api_key="your_api_key")
coll = conn.get_collection()
audio = coll.get_audio("a-abc123def")

# Generate download/streaming URL
url = audio.generate_url()
print(f"Audio URL: {url}")
# https://cdn.videodb.io/v3/{collection}/{audio}.mp3
  • URLs are CDN-hosted and can be shared directly
  • Format is MP3 or original audio format
  • URLs remain valid for extended periods
  • Useful for embedding in web players or sending via email

Authorizations

x-access-token
string
header
required

API key for authentication (sk-xxx format)

Path Parameters

audio_id
string
required
Example:

"a-12345"

Body

application/json
format
enum<string>
Available options:
mp3,
wav,
flac
Example:

"mp3"

quality
enum<string>
Available options:
low,
medium,
high
Example:

"high"

Response

200 - application/json

Stream URL generated

success
boolean
Example:

true

data
object