1. Create a verification job
Submit the file details to get a verification ID and upload URL.
import os
import time
import requests
base_url = "https://api.oddtune.com"
headers = {"X-API-Key": os.environ["ODDTUNE_API_KEY"]}
filename = "song.mp3"
content_type = "audio/mpeg"
response = requests.post(
f"{base_url}/v1/audio/verify",
headers=headers,
json={
"source_type": "upload",
"filename": filename,
"content_type": content_type,
},
timeout=30,
)
response.raise_for_status()
verification = response.json()
verification_id = verification["verification_id"]
print("Verification ID:", verification_id)