Free
Try the full engine
- 17 minutes/month
- Detailed indicators on every scan
- Full API access
- Detection history in dashboard
- Free forever — no trial period
- Chrome extension, unlimited seats
Complete documentation for integrating TruthScan's AI audio detection API into your applications.
Try it out without code by visiting our FastAPI endpoint: https://detect-audio.truthscan.com/docs
Pricing & credits
Audio detection is credit-based. Credit usage depends on how much audio is analyzed, use analyzeUpToSeconds to cap analyzed duration and control cost.
Check your balance with GET /check-user-credits. View pricing plans
TruthScan uses API keys to allow access to the API. You can get your API key at the top of the page in our developer portal.
TruthScan expects for the API key to be included in all API requests to the server in a request body that looks like the following:
{
"key": "YOUR API KEY GOES HERE"
}You must replace YOUR API KEY GOES HERE with your personal API key.
The AI Audio Detection workflow consists of the following steps:
Begin by requesting a pre-signed URL from the API. This URL allows you to securely upload your audio file to the storage server.
Supported File Formats
MP3, WAV, M4A, FLAC, OGG, MP4
Important Note
It is necessary to remove spaces from the audio filename when requesting a pre-signed URL.
GET https://detect-audio.truthscan.com/get-presigned-url?file_name=example.mp3Example Request
curl -X GET 'https://detect-audio.truthscan.com/get-presigned-url?file_name=example.mp3' \
--header 'apikey: YOUR API KEY GOES HERE'Example Response
{
"status": "success",
"presigned_url": "https://audio-presigned-upload.ai-assets-cdn.com?file_name=581d47c7-3ef4-42af-88d9-6dab6bf69389_20250611-121955_example.mp3...",
"file_path": "/uploads/581d47c7-3ef4-42af-88d9-6dab6bf69389_20250901-090201_example.mp3"
}Use the provided 'presigned_url' to upload your audio via a PUT request. Ensure the correct content type is set according to your audio format.
Important Note
It is necessary to remove spaces from the audio filename when uploading the audio.
Example Request
curl -X PUT 'https://audio-presigned-upload.ai-assets-cdn.com?file_name=581d47c7-3ef4-42af-88d9-6dab6bf69389_20250611-121955_example.mp3...' \
--header 'Content-Type: audio/<FILE_FORMAT - mp3, wav, m4a, flac, ogg, mp4>' \
--header 'x-amz-acl: private' \
--data-binary '@example.mp3' # AttachmentFile Size Limits
Ensure that the file format remains consistent during the upload process. A successful upload will return a status code of 200.
After uploading, submit the audio for AI detection by referencing the 'file_path' from the previous step.
POST https://detect-audio.truthscan.com/detectExample Request
curl -X 'POST' \
'https://detect-audio.truthscan.com/detect' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"key": "YOUR-API-KEY-GOES-HERE",
"url": "<FILE_PATH>",
"document_type": "Audio",
"analyzeUpToSeconds": 60
}'The 'FILE_PATH' refers to the path obtained from the response in the initial step, 'Obtain a Pre-signed Upload URL'.
Optional Parameters
analyzeUpToSeconds: Analyze up to N seconds from the beginning (default: 60)document_type: Type of document (default: 'Audio')email: Optional email for processingExample Response
{
"id": "77565038-9e3d-4e6a-8c80-e20785be5ee9",
"status": "pending"
}The response includes a unique ID for tracking the detection status.
To check the status and retrieve the results, use the /query endpoint with the ID.
POST https://detect-audio.truthscan.com/queryExample Request
curl -X 'POST' \
'https://detect-audio.truthscan.com/query' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"id": "ID-GOES-HERE"
}'Example Response
{
"id": "00fee5ff-a55b-42fb-b7c7-d14f05ae0769",
"status": "done",
"result": 0.873,
"result_details": {
"is_valid": true,
"message": "processed",
"original_duration": 123.45,
"is_truncated": true,
"truncated_duration": 60.0,
"mean_ai_prob": 0.873,
"individual_chunks_ai_prob": [0.81, 0.90, 0.91]
}
}Result Details
is_valid: Indicates if the audio file is valid (true/false)message: Processing messageoriginal_duration: Duration in seconds of the original audiois_truncated: Whether the audio was truncated for analysistruncated_duration: Duration analyzed if truncatedmean_ai_prob: Overall AI probability scoreindividual_chunks_ai_prob: Per-chunk AI probability scoresThe "status" field will be one of: "pending" (processing is queued), "analyzing" (AI detection is in progress), "done" (results are available), or "failed" (processing failed).
This endpoint accepts the users apikey via the header. And returns users credit details.
GET https://detect-audio.truthscan.com/check-user-creditsExample Request
curl -X 'GET' \
'https://detect-audio.truthscan.com/check-user-credits' \
-H 'apikey: YOUR API KEY GOES HERE' \
-H 'accept: application/json' \
-H 'Content-Type: application/json'Example Response
{
"baseCredits": 10000,
"boostCredits": 1000,
"credits": 11000
}Check the health status of the API server.
GET https://detect-audio.truthscan.com/healthExample Request
curl -X 'GET' \
'https://detect-audio.truthscan.com/health' \
-H 'accept: application/json'Example Response
{
"status": "healthy"
}Most errors will be from incorrect parameters being sent to the API. Double check the parameters of each API call to make sure it's properly formatted, and try running the provided example code.
The generic error codes we use conform to the REST standard:
| Error Code | Meaning |
|---|---|
| 400 | Bad Request -- Your request is invalid. |
| 403 | Forbidden -- The API key is invalid, or there aren't sufficient credits for audio processing. |
| 404 | Not Found -- The specified resource doesn't exist. |
| 405 | Method Not Allowed -- You tried to access a resource with an invalid method. |
| 406 | Not Acceptable -- You requested a format that isn't JSON. |
| 410 | Gone -- The resource at this endpoint has been removed. |
| 422 | Invalid Request Body -- Your request body is formatted incorrectly or invalid or has missing parameters. |
| 429 | Too Many Requests -- You're sending too many requests! Slow it down! |
| 500 | Internal Server Error -- We had a problem with our server. Try again later. |
| 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |
Cause: Invalid or expired API key
Solution:
Cause: Insufficient credits for audio processing
Solution:
Cause: Unsupported or invalid audio format submitted
Solution:
Cause: File size exceeds 100MB limit
Solution:
Cause: Audio processing took too long or timeout occurred
Solution:
Cause: Processing failed for various reasons
Solution:
Cause: Invalid or expired pre-signed URL, or issues with storage server
Solution:
Cause: Filename with spaces or expired/corrupted pre-signed URL
Solution:
Get full forensic reports - audio patterns, key indicators, and detailed reasoning.
Free
Try the full engine
Starter
$0.045 / minute - $290/yr
For individuals and small teams
Professional
$0.03 / minute - $990/yr
For teams in production
Business
$0.015 / minute - $3,990/yr
For high-volume operations
Find answers to the most common questions about our AI audio detection API.