You don't need a card. It used to cost 2 yuan, but now it's all free. At present, the study rooms of all city libraries in Beijing are open to the public free of charge.
For example, the Capital Library, Dongcheng Library and Xicheng Library are all open to the public free of charge.