The European XFEL will generate extremely brilliant pulses of X-rays organized in pulse trains consisting of 2700 pulses <100 fs long, with <1012 photons, and with a 220 ns spacing. The pulse trains are running at a 10Hz repetition rate. The detector to be used under these conditions will have to face several challenges: the dynamic range has to cover the detection of single photons and extend up to <104 photons/pixel/pulse in the same image, framing rates of 4.5 MHz (220 ns) are required in order to record one image per pulse, and as many images as possible have to be recorded during the pulse trains. Due to the high flux, the detector will have to withstand a dose up to 1GGy integrated over 3 years. To meet these challenges a consortium, consisting of Deutsches Elektronensynchrotron (DESY), Paul-Scherrer-Institut (PSI), University of Hamburg and University of Bonn, is developing the Adaptive Gain Integrating Pixel Detector (AGIPD). It is a hybrid-pixel detector, featuring a charge integrating amplifier with dynamic gain switching to cope with the extended dynamic range, and an analogue on-pixel memory for image storage at the required 4.5 MHz frame rate. The readout chip consists of 64×64 pixels of (200μm)2, 8×2 of these readout chips are bump-bonded to a monolithic silicon sensor to form the basic module with 512 × 128 pixels. 4 of these modules are stacked to form a quadrant of the 1k ×1k detector system. Each quadrant is independently moveable in order to adjust a central hole, needed for the direct beam to pass through. Special designs are employed for both the sensor and the readout chip to withstand the integrated dose for 3 years.