The production company responsible for the job, Robber's Dog Films, declined to comment on the filming.
However, Dunedin City Council economic development unit spokesman Ross Grey believed the advertisement was for an American drug company.
The unit assisted in gaining clearance for the crew of about 55 to film at the city's beaches and parks, he said.
The film company paid to have the pool closed, which was "more than what we would have taken in a day", council aquatic services manager Steve Prescott said.
Filming was expected to continue at Tomahawk beach and Logan Park today.