LONDON — A new program in Wales will allow family doctors to offer patients an unusual prescription for better health: bicycles.

The pilot program, the first such initiative in Britain, according to the health board that is leading it, reflects an effort by medical professionals around the world to give patients alternatives to drugs, in order to avoid side effects and improve cost efficiency.

Patients at two medical centers in Cardiff, the Welsh capital, will be offered six-month subscriptions to a bike-rental service that allows them to make unlimited free rides of up to 30 minutes at a time, and officials hope to expand the program.

“For the first phase of the pilot, we want to make sure the scheme works as intended and is easy to use for patients and their health professionals, so we’ll be seeking feedback from participants,” Dr. Tom Porter of the Cardiff and Vale University Health Board, said in a statement on Wednesday.