Iran's president has appealed to global leaders including US President Barack Obama, as negotiators raced against the clock to agree the outlines of a deal on Iran's nuclear programme.

Hassan Rouhani wrote to Obama on Thursday, US officials confirmed, as well as to the leaders of the five other powers heading efforts to resolve the 12-year standoff.

The content of the letters was not known. But Rouhani, whose 2013 election led to the current diplomatic push, also phoned the leaders of Russia, China, Britain and France, his office said.

"We are acting in the national and international interest and we should not lose this exceptional opportunity," Rouhani told British Prime Minister David Cameron by phone, the presidency said.

"Hope was expressed for success at the new round of talks in Lausanne," the Kremlin said after Rouhani spoke to President Vladimir Putin, while noting with "satisfaction" the progress made.

Francois Hollande, "insisting on Iran's legitimate right to use peaceful nuclear power, insisted on the need to work towards a lasting, robust and verifiable agreement," the French presidency said.

Lifting sanctions

Highlighting the difficulties of talks that resumed in Switzerland on Thursday between US Secretary of State John Kerry and his Iranian counterpart Mohammed Mohammad Javad Zarif, Rouhani also said Iran wants all sanctions lifted.

"The peaceful character of [Iran's] nuclear activities and the necessity to annul all the unjust sanctions can lead us to a final deal," Rouhani's office quoted him as telling Cameron.

The six powers negotiating with Iran - five permanent members of the UN Security Council and Germany - are, however, insisting that sanctions will only be suspended, not lifted, to enable them to be quickly put back in place if Tehran violates the deal.

And the US Senate voted unanimously on Thursday to support a non-binding measure to impose new economic sanctions on Iran should it violate terms of any nuclear deal reached.

Kerry's talks in Lausanne with Zarif and officials from the powers are aimed at agreeing the outlines of a nuclear deal by March 31 after two missed deadlines in 2014.

The two men met for more than four hours on Thursday, and their political directors resumed talks later in the evening.

"It's going well, we're working, we're meeting," Kerry said.

A comprehensive deal, meant to be finalised by June 30, would see Iran downsize its nuclear programme to ensure that any covert dash for an atomic weapon would be all but impossible.

Iran's nuclear chief Ali Akbar Salehi said that he was "on the whole optimistic" about the talks, Agence France-Press news agency reported.

But he warned "there are those who have an interest in more troubles and not dealing with this question have not been inactive. They are trying to make sure there is no deal."