Photon-counting detector technology using directly converting high-Z sensor materials has recently gained popularity in medical imaging due to its capability to reduce patient dose, increase spatial resolution and provide single shot multienergy information. However, in medical imaging applications, the novel technology is not yet widely used due to technical challenges in manufacturing gap-less detectors with large areas. Here, a nearly gap-less, large-area, multi-energy photoncounting detector prototype is presented which was built with existing ASIC and sensor technology. It features an active area of 8x8 cm2, a 1 mm thick cadmium telluride (CdTe) sensor, four independent energy thresholds and a pixel size of 150 μm. Single and multi-threshold imaging performance of the detector is evaluated by assessing various metrics relevant for conventional (polychromatic) and spectral imaging applications. A high detective quantum efficiency (DQE(0)=0.98), a low dark noise threshold (6.5 keV) and a high count rate capability (up to 3x108 counts/s/mm2) indicate that the detector is optimally suited for conventional medical X-ray imaging, especially for low dose applications. Spectral performance was assessed by acquiring spectra from fluorescence samples, and the results show a high accuracy of energy peak positions (< 1 keV), precise energy resolution (within a few keV) and decent peak-to-background ratios. Spectral absorption measurements of water and iodinated contrast agent, as well as spectral X-ray radiographs of a human hand phantom, decomposed into bone and soft tissue basis images, demonstrate the multi-energy performance of the detector.