Nearly two years after OpenAI ignited a race to add generative artificial intelligence into products, Apple jumped into the competition on Monday, with plans to bring the technology to more than a billion iPhone users around the world.

Early into a two-hour presentation from its futuristic Silicon Valley campus, Apple revealed that it would be using generative A.I. to power what it is calling Apple Intelligence. The system will prioritize messages and notifications and offer writing tools that are capable of proofreading and suggesting what users have written in emails, notes or text. It also will result in a major upgrade for Siri, Apple’s virtual assistant.

While introducing its new A.I. features, Apple emphasized how it planned to integrate the technology into its products with privacy in mind.

The company said that the technology, which can answer questions, create images and write software code, would perform sensitive tasks like determining if a rescheduled meeting time would complicate plans to attend a child’s theater performance on the iPhone rather than in data centers where personal information would have a greater risk of being compromised. For complex requests, it has created a cloud network with Apple semiconductors that, it said, is more private because it’s not stored or accessible, even by Apple.

“As we look to build in these incredible new capabilities, we want to be sure that the outcome reflects the principles at the core of our products,” said Tim Cook, the chief executive of Apple. “It has to be powerful enough to help the things that matter the most to you. It has to be intuitive and easy to do.”

Apple also said that it would be making improvements to its iPhone software system. This fall, messaging will add the ability to schedule messages and respond to messages by tapping back with more emojis. Apple will also release a redesigned Photos app to make it easier to browse images by topics like pets and travel. And it said that iPhone users would be able to send high-resolution images to Android smartphones.

Apple brings several strengths to the A.I. race. Its semiconductor development team is among the most talented in the industry, and the team has been making chips that power complex A.I. functions for years. The company also marketed itself as being better at protecting people’s personal information than its rivals because it makes money by selling devices, not by advertising.

But Apple has several weaknesses that could slow its A.I. development. The secretive company has struggled to recruit and retain leading A.I. researchers because it limits how much research it publishes. It has also sought to license published material and objected to collecting it without permission, as other generative A.I. companies have done to build and train their technology.

To overcome its shortcomings, Apple struck a deal with OpenAI to provide some generative A.I. technology to support, two people familiar with the agreement said. Sam Altman, the chief executive of OpenAI, attended the Apple event.

Though Siri has been around for more than a decade, Apple has let the voice assistant languish. The assistant has frustrated users with its failure to recognize various requests, and its ability to actually converse is limited because it is programmed to follow each individual command.

Generative A.I. could improve Siri because it has been trained on spoken conversations pulled from podcasts and videos. The result is a system that can mimic the way people talk.

Apple said that Siri would be able to remember the context of something that a user has raised with it. For example, if someone asks for the weather in Muir Woods National Monument and later asks to schedule a hike there, Siri will now know that the hike it is scheduling is in Muir Woods.

Siri will also understand more of the things that people want to get done in iPhone apps. For instance, users can ask it to show a photo of a friend and it will find and surface those images for people in the Photos app. It also will be able to perform tasks for people like finding an image of a user’s driver’s license and filling it out into a form.

Apple’s push into generative A.I. was in part a response to Wall Street investors. The technology has lifted the values of Microsoft, a big player in generative A.I., and Nvidia, which sells A.I. chips. Earlier this year, Microsoft dethroned Apple as the most valuable technology company in the world.

“This is the biggest event for investors since the iPhone because they have to infuse A.I. into their products to thrive,” said Gene Munster, a managing partner at Deepwater Asset Management, which invests in emerging technology companies. “Today was about showing that they will make A.I. a core competency and that they can deliver an A.I. experience that consumers want.”

The event was an important milestone in Apple’s relationship with developers. Tensions have flared between the company and app makers over the past year, as Apple has resisted new rules in Europe designed to loosen its grip on the App Store. The rules require Apple to allow third-party payment alternatives that could circumvent the 30 percent fee it collects on app sales. But Apple has responded by introducing alternatives that would make such a change prohibitively expensive.

Apple is facing similar challenges in the United States. A federal judge in San Jose, Calif., is weighing whether the company can proceed with a plan to collect 27 percent of sales on alternative payment systems. And the Justice Department also sued Apple for rules that prevent other companies from offering cloud-streaming game apps, digital wallets and other alternatives on iPhones.

Against that backdrop, Apple sought to emphasize the benefits it offers developers.

Apple said that later this month it would be expanding sales of the Vision Pro, its mixed reality headset, beyond the United States to China, Japan and Europe. The company also unveiled new capabilities for the headset, including the ability to view older photographs in three dimensions and to create a giant, virtual display for a Mac.