Skip to main content
This guide walks you through the complete workflow: from account creation to downloading a licensed track via the Trackyard API.

Prerequisites

  • A Trackyard account (sign up here)
  • Basic familiarity with REST APIs

Step 1: Get Your API Key

1

Sign up or log in

Go to app.trackyard.com and create a free account or log in.
2

Navigate to API Keys

Click on API Keys in the dashboard or go directly to app.trackyard.com/api-keys.
3

Create a new key

Click Create API Key, give it a name (e.g., “My First Key”), and copy the key to your clipboard.
Keep your API key secure! Never commit it to version control or share it publicly. Store it in environment variables.
# Store your API key in an environment variable
export TRACKYARD_API_KEY="your_api_key_here"

Step 2: Search for Music

Use the /search endpoint to find tracks. Describe what you need in plain English — Trackyard’s AI will infer genre, mood, BPM, and instrumentation automatically.
curl -X POST https://api.trackyard.com/api/external/v1/search \
  -H "Authorization: Bearer $TRACKYARD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "upbeat electronic music for tech startup video",
    "limit": 5,
    "filters": {
      "has_vocals": false
    }
  }'
{
  "tracks": [
    {
      "id": "trk_abc123",
      "title": "Digital Sunrise",
      "artist": "Sync Lab",
      "duration_seconds": 142,
      "bpm": 128,
      "key": "C Major",
      "genres": ["Electronic", "Corporate"],
      "moods": ["Upbeat", "Energetic", "Modern"],
      "has_vocals": false,
      "preview_url": "https://cdn.trackyard.com/previews/trk_abc123.mp3"
    },
    // ... 4 more tracks
  ],
  "credits_remaining": 487
}
Pro tip: The more specific your query, the better the results. Try “moody lo-fi piano for a coffee shop vlog” instead of just “lofi music.”

Step 3: Download a Licensed Track

Once you’ve found a track you like, use the /download-track endpoint to get the audio file. The license is automatically included — no extra step required.

Option A: Download Full Track

curl -X POST https://api.trackyard.com/api/external/v1/download-track \
  -H "Authorization: Bearer $TRACKYARD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"track_id": "trk_abc123"}' \
  --output track.mp3

Option B: Download Smart-Trimmed Clip

Need exactly 30 seconds? Trackyard analyzes the waveform and selects the best-sounding segment automatically.
curl -X POST https://api.trackyard.com/api/external/v1/download-track \
  -H "Authorization: Bearer $TRACKYARD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "track_id": "trk_abc123",
    "duration_seconds": 30
  }' \
  --output clip-30s.mp3

Option C: Align Musical Peak to Specific Offset

Want the big hit to land at exactly 12 seconds (e.g., when your product appears on screen)?
curl -X POST https://api.trackyard.com/api/external/v1/download-track \
  -H "Authorization: Bearer $TRACKYARD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "track_id": "trk_abc123",
    "duration_seconds": 22,
    "hit_point_seconds": 12
  }' \
  --output clip-with-hit.mp3
How it works: Trackyard’s algorithm finds the dominant energy peak in the track and aligns it to your specified offset. Perfect for syncing music to video reveals, product shots, or title cards.

Step 4: Use the Track

That’s it! You now have a licensed MP3 file ready to use in your project. The license is perpetual — use it forever with no renewals or expiration.

What's Included in the License

  • ✅ Perpetual usage rights (no expiration)
  • ✅ Social media (Instagram, TikTok, YouTube, etc.)
  • ✅ Podcasts and streaming platforms
  • ✅ Online ads and branded content
  • ✅ Corporate and training videos
  • ✅ Film and TV (usage tier-dependent)
See our Licensing Model for full details.

Check Your Usage

Monitor your credit balance and API usage anytime:
# Get account info
curl https://api.trackyard.com/api/external/v1/me \
  -H "Authorization: Bearer $TRACKYARD_API_KEY"

# Get usage history
curl "https://api.trackyard.com/api/external/v1/usage?limit=50" \
  -H "Authorization: Bearer $TRACKYARD_API_KEY"

Next Steps


Troubleshooting

  • Check that your API key is correct and not expired
  • Ensure you’re passing it in the Authorization: Bearer header
  • Verify your account is active
  • You’ve exceeded your rate limit (10 requests/minute for free tier)
  • Wait for the retry_after seconds indicated in the response
  • Consider upgrading for higher limits
  • Try a more specific query (“moody piano for a rainy scene” vs “sad music”)
  • Remove overly restrictive filters
  • Check for typos in filter parameters
Need more help? Email support@trackyard.com