1) Get an API key

Create an account and generate an API key in your dashboard. Add it to an environment variable:
export AURIGIN_API_KEY=aurigin_test_1234567890abcdef

2) Upload a file and get a prediction

Send your audio file directly to POST /predict.
import os
import json
import requests

API_KEY = os.environ.get("AURIGIN_API_KEY", "aurigin_test_1234567890abcdef")
BASE_URL = "https://aurigin.ai/api-ext"
FILE_PATH = "path/to/your/recording.wav"  # Replace with the path to your local audio file

with open(FILE_PATH, "rb") as f:
    files = {
        "file": (os.path.basename(FILE_PATH), f, "audio/wav")
    }
    r2 = requests.post(f"{BASE_URL}/predict", headers={"x-api-key": API_KEY}, files=files)
    print("Multipart response:", r2.status_code, r2.json())

Errors

  • 400: Invalid input or file too large (50MB max)
  • 403: Authentication failed (check x-api-key)
  • 500: Internal error or upstream unavailability