AI Music Checker API
Integrate our AI Music Checker into your applications and services.
API Documentation
Welcome to the AI Music Checker API documentation. Here you will find all the information you need to integrate our API into your applications.
Base URL
The base URL for all API requests is:
https://api.letssubmit.com
Authentication
To authenticate your API requests, you need to include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Endpoints
Analyze Song
Analyze a song to determine if it is AI-generated.
By File (wave or mp3)
POST /analyze_song Content-Type: application/json { "file_url": "https://example.com/path/to/your/file.mp3" }
By Spotify Track URL
POST /analyze_song Content-Type: application/json { "spotify_url": "https://open.spotify.com/track/{track_id}" }
Response:
{ "ai_probability": 85 }
Examples
Here are some examples of how to use the API:
Using cURL
curl -X POST https://api.letssubmit.com/analyze_song \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"fileurl": "https://example.com/path/to/your/file.mp3"}'
Using JavaScript with Fetch API
const apiUrl = 'https://api.letssubmit.com/analyze_song'; const apiKey = 'YOUR_API_KEY'; const fileUrl = 'https://example.com/path/to/your/file.mp3'; const data = { fileurl: fileUrl }; fetch(apiUrl, { method: 'POST', headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' }, body: JSON.stringify(data) }) .then(response => response.json()) .then(data => { console.log('Success:', data); }) .catch(error => { console.error('Error:', error); });
Using Python with Requests Library
import requests api_url = 'https://api.letssubmit.com/analyze_song' api_key = 'YOUR_API_KEY' file_url = 'https://example.com/path/to/your/file.mp3' headers = { 'Authorization': f'Bearer {api_key}', 'Content-Type': 'application/json' } data = { 'fileurl': file_url } response = requests.post(api_url, headers=headers, json=data) if response.status_code == 200: print('Success:', response.json()) else: print('Error:', response.status_code, response.text)
Using PHP with cURL
<?php $apiUrl = 'https://api.letssubmit.com/analyze_song'; $apiKey = 'YOUR_API_KEY'; $fileUrl = 'https://example.com/path/to/your/file.mp3'; $data = [ 'fileurl' => $fileUrl ]; $options = [ 'http' => [ 'header' => [ "Authorization: Bearer $apiKey", "Content-Type: application/json" ], 'method' => 'POST', 'content' => json_encode($data), ], ]; $context = stream_context_create($options); $result = file_get_contents($apiUrl, false, $context); echo $result; ?>