API Documentation
RESTful API with simple authentication
Authentication
Authenticate with an API key or pay per-request with x402:
API Key
X-API-Key: YOUR_API_KEY
Authorization: Bearer YOUR_API_KEY
Create keys in Settings. Keys are shown once - store them securely.
x402 · USDC on Base
# No API key needed - send a request, receive a 402 with price,
# pay with USDC on Base, then retry with the payment receipt.
Payment-Signature: <base64-encoded payment receipt>
No account required. Pay per-request using the x402 protocol - ideal for AI agents and programmatic access.
Base URL
All endpoints are relative to:
https://api.ttsaudit.com
Quick Start
# Audit tracks - specify each check as true/false via query params
curl -X POST "https://api.ttsaudit.com/audit?comparison=true&quality=true&pace=false&scriptAccuracy=false" \
-H "X-API-Key: YOUR_API_KEY" \
-F "files=@track1.mp3" \
-F "files=@track2.mp3" \
-F "files=@track3.mp3" \
-F "accuracy=standard" \
-F "deviationThreshold=0.15"
# Check balance
curl -s https://api.ttsaudit.com/balance \
-H "X-API-Key: YOUR_API_KEY"Limits
| Limit | Value |
|---|---|
| Minimum tracks | 2 |
| Max files per request | 500 |
| Max total upload size | 1 GB |
| Allowed formats | .mp3, .wav, .flac, .ogg, .m4a, .aac, .wma, .opus |
| Cost per check | 10 credits per enabled check per file |
| Available checks | comparison, quality, pace, scriptAccuracy |
Error Codes
| Code | Description |
|---|---|
| 400 | Bad Request - Missing/invalid input, unsupported file type, or fewer than 2 tracks |
| 401 | Unauthorized - Missing or invalid API key |
| 402 | Payment Required - Insufficient credits, or x402 payment prompt (includes price and payment instructions) |
| 500 | Internal Error - Processing or server error; credits are refunded on failure |