NEW ORLEANS — The cash-strapped city, which has borrowed heavily to continue operating after Hurricane Katrina, is turning to text-messaged donations in an effort to defray the costs of Mardi Gras, its premier cultural event.

City officials are working with PayPal, a money-transfer Web site, to raise cash via text-message and online giving. Costs of the Carnival celebration, which concludes Tuesday, include $4 million to $5 million for police overtime, trash pickup on parade routes and other public expenses.

The Text to Give program is to retroactively pay for the costs; it began Feb. 8 and is set to run for a year. The initial goal is to raise $1 million.

People who want to donate using cell phone text messages would text “NOLA5” or “NOLA10” to the number 78787 if they wanted to donate $5 or $10, said Jamie Patricio, a PayPal spokeswoman. If people want to donate another sum, they would text “NOLA” to the number and be prompted for an amount, she said.

For security, messagers are prompted to enter the PINs they used to set up a PayPal account, Patricio said. The donation is then drawn from users’ bank accounts via PayPal and sent to a special city account.

Those who want to give online can go to the city’s Web site and click on a link containing the “Text2Give” logo to donate money via PayPal. The PayPal site also expects to have a Mardi Gras link up in a few days, Patricio said.

“I think this is going to be a very strong and contagious, viral campaign, especially among the people who have the technology and come to New Orleans and love it here,” said Ernest Collins, the city marketing director. He added that he’s not sure the city will reach the $1 million goal.