Patients in parts of Cardiff are going to be given prescriptions for bike rides in what is the first scheme of its kind in the UK.
It is part of attempts to cut the risk of death from heart disease.
GPs in the city will be testing out using the nextbikes for the next couple of months after the scheme was launched on Wednesday.
The number of bikes is set to double this year in Cardiff with an additional 500 bikes and 65 docking stations.
In total there will be 1,000 bikes and 120 docking stations in the city by the end of 2019.
This new plan will allow doctors from Lansdowne Surgery, in Canton, and Fairwater Health Centre to prescribe patients free 30-minute hire sessions for six months with the bike share provider.
It is being funded by the company for the trial period, with the hope it will then expand to other surgeries across the city.
Dr Tom Porter, a consultant with Cardiff and Vale University Health Board and Public Health Wales, said regular cycling could cut the risk of dying from heart disease in half.
He said: “Not only can cycling to work reduce your risk of death from heart disease by 52%, but it’s also a great way to get around the city without using your car, making it good for both you and the environment around you, and helping to keep the air clean for everyone while reducing carbon emissions.”
Dr Karen Pardy, one of the GPs who will be able to prescribe nextbike to their patients, said: “While we are aware of the many benefits of exercise for our patients, people are sometimes reluctant to engage.
“Nextbike on prescription allows people to have a go at cycling around Cardiff and realise how this can help to support their overall well being.”
The company also operates in Bath, Milton Keynes, Glasgow, Exeter, Belfast, Stirling and the University of Warwick.
The company’s MD Krysia Solheim said: “We brought nextbike to Cardiff last year and the scheme has proved incredibly popular with the residents of the Welsh capital – between them they are making over 10,000 journeys each week.
“Since our initial launch in May 2018, we have doubled the number of bikes available in the city from 250 to 500 and installed a further 27 stations alongside the original 25 – the demand continues to grow as we work on doubling the scheme to 1,000 bikes this summer.
“As one of our most successful schemes, we’re really proud to now be embarking on this ground-breaking pilot with the city.”