A fast and efficient audio transcription API that runs OpenAI's Whisper models locally using Apple's MLX framework. This API server provides OpenAI-compatible endpoints for converting speech to text, optimized for Apple Silicon Macs.
git clone https://github.com/duytechie/mlx-api.git
cd mlx-apiYou'll need two tools: uv (Python package manager) and ffmpeg (audio processing).
Install uv
curl -LsSf https://astral.sh/uv/install.sh | shInstall ffmpeg
brew install ffmpegThis command will install all the necessary Python packages listed in the project configuration.
uv syncuv run main.py- POST /v1/audio/transcriptions: Upload audio file for transcription
- GET /v1/models: List all models
Visit /docs in your browser to see the interactive API documentation.
curl -X 'POST' \
  'http://localhost:8000/v1/audio/transcriptions' \
  -H 'Content-Type: multipart/form-data' \
  -F 'file=@/path/to/your/audio.mp3' \
  -F 'model=mlx-community/whisper-tiny-mlx'Note: Replace /path/to/your/audio.mp3 with the actual path to your audio file.



