Flask API server