Welcome, Developer

Get API Key

Offtrack API

A powerful API for managing DJ song libraries and creating seamless transitions.

Getting Started

  1. Obtain your API key from the My Account tab
  2. Upload songs using the /song endpoint
  3. Wait for analysis to complete (check status with /songs)
  4. Create mixes with the /mix endpoint

Features

  • 🎵 Song Upload: Upload audio files
  • 📊 Audio Analysis: Automatic song analysis
  • 🎧 DJ Mix Creation: Generate DJ mixes with customizable transitions

Authentication

All endpoints (except / and /health) require an API key passed in the X-API-Key header.

API Endpoints

PUT /song

Upload Song

Upload audio or video files to your song library for analysis and mixing.

Filename Requirements: The filename before the extension must contain only letters, numbers, and underscores. Spaces and all other punctuation are not allowed. Example of a valid filename: Song_Remix_Artist.mp3

Response:

{
  "message": "Analyzed successfully",
  "song_id": "Hold_On"
}

Possible Messages:

  • "Analyzed successfully" - Song uploaded and audio analysis completed
  • "Song uploaded, analysis finished but song is not mixable" - Analysis completed but song is not mixable
  • "Song uploaded but analysis failed" - Upload succeeded but analysis encountered an error
curl -X PUT http://api.offtrack.com/song \
  -H "X-API-Key: YOUR_API_KEY_HERE" \
  -F "file=@/path/to/your/Hold_On.mp3"

GET /songs

List Songs

Returns all songs in your library with their analysis status, plus any generated mixes.

Response:

{
  "songs": [
    {
      "song_id": "Hold_On",
      "analysis": "available"
    },
    {
      "song_id": "My_Song",
      "analysis": "pending"
    },
    {
      "song_id": "Simple_Track",
      "analysis": "non-mixable"
    }
  ],
  "mixes": ["Hold_On_and_My_Song"],
  "total_songs": 3,
  "total_mixes": 1
}

Analysis Status Values:

  • "available" - Analysis completed, song is ready for mixing
  • "non-mixable" - Analysis completed but song cannot be mixed
  • "pending" - Analysis is still in progress
  • "failed" - Internal error, analysis failed
curl -X GET http://api.offtrack.com/songs \
  -H "X-API-Key: YOUR_API_KEY_HERE"

GET /mix

Create DJ Mix

Generate a professional DJ mix with seamless transitions between analyzed songs in your library.

Query Parameters:

  • song_ids (required) - Comma-separated list of song IDs to mix. At least 2 songs are required.
  • highlight (optional) - Selects about 25% to 50% of each song for the mix. Defaults to false.
  • short_fade (optional) - Uses a short fade for the transitions, recommended for hip-hop & rap. Defaults to false.

Note: Song IDs are derived from uploaded filenames (without extension). Ensure songs are successfully uploaded and analyzed before creating a mix.

curl -G "http://api.offtrack.com/mix" \
  -H "X-API-Key: YOUR_API_KEY_HERE" \
  --data-urlencode "song_ids=Hold_On,Your_Love,Bound" \
  --data-urlencode "highlight=false" \
  --data-urlencode "short_fade=false" \
  --output /tmp/mix.mp3

Have questions or feature requests? Please email us at info@offtrack.com to customize the API to your needs