Brent crude futures were up 4 cents at $50.66 a barrel, after settling down 3 cents at $50.62 on Tuesday.
US crude inventories fell by 5.2 million barrels for the week ended 17 June, the API said. The trade group's figures were triple the draw of 1.7 million barrels forecast by analysts in a Reuters poll.
The US government's Energy Information Administration will issue official stockpile data on Wednesday.
Markets remain jumpy over the possibility that the United Kingdom will vote to leave the European Union on Thursday in a referendum, with polls showing little difference between the "remain" and "leave" camps.
The dollar clung to modest gains early on Wednesday after Federal Reserve Chair Janet Yellen held the line of "gradual increases" in US rates, while sterling's short-covering rally lost momentum a day ahead of the referendum.
Japan's Nikkei was down nearly 0.7% in early trading, while gold prices edged lower.
"Strengthening in the dollar and weakness in other currencies would ... be directionally short-term bearish for crude oil" in the event of a British exit, Societe Generale said in a research note.
A stronger dollar makes oil more expensive because it raises the cost for imports for most of the world's countries.
However, fundamentals could come into play once the dust settles from the vote.
"Global demand growth is quite robust, driven by the US, China, India and other emerging markets," Societe Generale said. "On the supply side, declining US crude production is expected to underpin a trend of lower non-Opec production."
By Reuters
22 June 2016 04:47 GMT