Abstract: We have fabricated the 1024-pixel SiPM sensor and the associated electronics. We integrated the SiPM sensor and the electronics to build a pinhole camera. In this paper, we present the fabrication and assembly procedure of the SiPM sensor and the readout electronics, and the preliminary result of testing the pinhole camera. This camera can be readily used as an X-ray detector with an array of the scintillator pixels placed in front of the SiPM sensor. The application of such an X-ray detector includes the X-ray or gamma-ray imaging in the medical field and the detection of astronomical or astrophysical X-ray sources in space. This camera also can be used as a detector that counts photons in low light environment.