Skip to main content

Get Started in 3 Steps

1

Generate an API Key

Log in to precital.com and navigate to your account settings. Generate a new API key from the API Keys section.
2

Check Your Credits

Verify you have credits available for API operations.
3

Make Your First Request

Use the example below to analyze an audio file.

Example: Analyze an Audio File

Here’s a simple example to get you started:
curl -X POST https://api.precital.com/v1/audio-analyses \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "audio_url": "https://example.com/track.mp3",
    "track_title": "My Amazing Song",
    "artist_name": "Artist Name"
  }'

Response

You’ll receive a response like this:
{
  "id": "ana_abc123def456",
  "status": "completed",
  "workspace_id": "ws_xyz789",
  "input_source": "audio_url",
  "result": {
    "bpm": 128,
    "key": "C# minor",
    "genres": {
      "Electronic": 0.85,
      "House": 0.72
    },
    "moods": {
      "Energetic": 0.91,
      "Upbeat": 0.78
    },
    "instruments": [
      "Synthesizer",
      "Drum Machine",
      "Bass"
    ],
    "energy": 0.87,
    "danceability": 0.82,
    "acousticness": 0.12,
    "meta_title": "My Amazing Song",
    "meta_artist": "Artist Name"
  },
  "credits_charged": 1,
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-15T10:32:15Z"
}

Check Your Credits

Before making requests, check your credit balance:
curl -X GET https://api.precital.com/v1/credits \
  -H "X-API-Key: your-api-key-here"

What’s Next?