API DOCUMENTATION

Everything you need to start yeeting

AUTHENTICATION

All API requests require an API key. Include it in the header:

x-api-key: your-api-key-here

ENDPOINTS

POST/api/audio/extract

Extract audio from any video URL and upload to cloud storage.

Request Body:

{
  "url": "https://www.youtube.com/watch?v=...",
  "format": "mp3"  // optional: mp3, wav, m4a
}

Response:

{
  "success": true,
  "data": {
    "url": "https://uploadthing.com/f/abc123.mp3",
    "format": "mp3",
    "size": 3145728,
    "mimeType": "audio/mpeg"
  }
}
POST/api/audio/metadata

Get video metadata without downloading.

Request Body:

{
  "url": "https://www.youtube.com/watch?v=..."
}

Response:

{
  "success": true,
  "data": {
    "title": "Video Title",
    "duration": 213,
    "thumbnail": "https://...",
    "uploader": "Channel Name",
    "viewCount": 1000000
  }
}
GET/api/health

Check service health and tool availability. No authentication required.

Response:

{
  "status": "healthy",
  "timestamp": "2024-01-01T00:00:00.000Z",
  "uptime": 3600,
  "tools": {
    "ytdlp": true,
    "ffmpeg": true
  }
}

RATE LIMITS

Free Tier: 100 requests/day
Pro Tier: 10,000 requests/day
Max File Size: 500MB
Timeout: 5 minutes

ERROR CODES

401 - Unauthorized (invalid API key)
400 - Bad Request (invalid parameters)
429 - Rate limit exceeded
500 - Internal server error
503 - Service unavailable