"I am Iron Man" was ad-libbed by Robert Downey Jr.. Producer Kevin Feige approved using it in the final cut of the film, and credits this with his decision to largely do away with secret identities in the Marvel Cinematic Universe. Only Spider-Man conceals his identity, while Thor's alter ego, Donald Blake, is similarly not used.
The script was not completely finished when filming began, since the filmmakers were more focused on the story and the action, so the dialogue was mostly ad-libbed throughout filming. Director Jon Favreau acknowledged this made the film feel more natural. Some scenes were shot with two cameras, to capture lines improvised on the spot. Robert Downey Jr. would ask for many takes of one scene, since he wanted to try something new. Gwyneth Paltrow, on the other hand, had a difficult time trying to match Downey with a suitable line, as she never knew what he would say.
Director Jon Favreau wanted Robert Downey Jr. because he felt the actor's past was right for the part. He commented: "The best and worst moments of Robert's life have been in the public eye. He had to find an inner balance to overcome obstacles that went far beyond his career. That's Tony Stark. Robert brings a depth that goes beyond a comic book character having trouble in high school, or can't get the girl." Favreau also felt Downey could make Stark "a likable asshole," but also depict an authentic emotional journey once he won over the audience.
Agent Phil Coulson (Clark Gregg) was originally a much smaller part. In fact, the character at first was only called "Agent," but as filming went on, and Gregg's chemistry with all the other cast members became apparent, they added more and more scenes. Agent Coulson would go on to appear in Iron Man 2 (2010), Thor (2011), The Avengers (2012), Captain Marvel (2019), and would star in the spinoff series, Agents of S.H.I.E.L.D. (2013).
To avoid spoilers about the final press conference, the extras were told that it was a dream sequence.
Stan Lee: (at around 1h 8 mins) Comic writer Stan Lee appears at Tony Stark's party playing the role of Hugh Hefner, accompanied by three blonde women. Lee later mentioned that it was his most fun cameo.
Tom Morello: Rock guitarist Tom Morello assisted Ramin Djawadi in composing the film's soundtrack. Morello had a cameo in the film as a security guard who gets killed by the Iron Monger (perhaps fittingly, since Morello is a member of the band Rage Against the Machine).