audio-processor / interfaces /api /routes /info_routes.py
Tadeas Kosek
replace frontend with swagger
f1a7e59
raw
history blame
1.42 kB
"""API information routes."""
from fastapi import APIRouter
from typing import Dict, List
from ..responses import ApiInfoResponse
router = APIRouter()
@router.get("/info",
response_model=ApiInfoResponse,
summary="Get API Information",
description="Returns information about supported formats, quality levels, and available endpoints")
async def get_api_info():
"""Get API information and supported formats."""
return ApiInfoResponse(
version="1.0.0",
supported_video_formats=['.mp4', '.avi', '.mov', '.mkv', '.webm', '.flv', '.wmv', '.m4v'],
supported_audio_formats=['mp3', 'aac', 'wav', 'flac', 'm4a', 'ogg'],
quality_levels=['high', 'medium', 'low'],
max_direct_response_size_mb=10.0,
endpoints={
"/api/v1/extract": "POST - Extract audio from video",
"/api/v1/jobs/{job_id}": "GET - Check job status",
"/api/v1/jobs/{job_id}/download": "GET - Download processed audio",
"/api/v1/info": "GET - API information",
"/api/v1/health": "GET - Health check"
}
)
@router.get("/health",
summary="Health Check",
description="Simple health check endpoint for monitoring",
response_model=Dict[str, str])
async def health_check():
"""Simple health check endpoint."""
return {"status": "healthy", "service": "audio-extractor-api"}