A beverage production machine designed to produce a beverage from a capsule (1), the beverage production machine being provided with a module (2) comprising: a housing (19) provided with side walls, a drive mechanism (7), a first coupling element of the capsule (3) which can be moved relative to a second coupling element of the capsule (4), which cooperates with the first, between an open insertion position of the capsule and a closed position of coupling the capsule by means of the drive mechanism (7), in which the module (2) is designed to inject water into a capsule (1) and extract a beverage from the capsule (1) while the capsule (1) is in a beverage production position, in which the first coupling element (3) comprises a guide pin (16), characterized in that the drive mechanism (7) comprises a drive (9) acting ona ball joint mechanism (11), in which the end of the drive mechanism (7) that is at the opposite end of the drive (9) comprises a first control curve (17), in which the first control curve ( 17) is designed to cooperate with said guide pin (16), cooperation of the first guide curve (17) with the guide pin (16) which is designed to selectively move the first coupling element (3) and the walls sides of the housing (19) of the beverage production module (2) comprising a second guide curve (18), in which the guide pin (16) is also manufactured to cooperate with said second guide curve (18), cooperation of the guide pin (16) with the second guide curve (18) which is designed to carry out a relative displacement which is composed of a combined displacement comprising a linear displacement when the coupling elements of the capsule first and Second (3, 4) are close together and a joint movement to facilitate the discharge of a capsule when one is separated from the other.Una máquina de producción de bebidas diseñada para producir una bebida a partir de una cápsula (1), lamáquina de producción de bebidas estando provista de un módulo (2) que comprende:una carcas