Crude for November delivery gained 47 cents to stand at $71.35 a barrel in electronic trading on Globex. The contract earlier hit an intraday high of $71.76 a barrel.
Late Tuesday, the Washington-based API said crude inventories fell by 254,000 barrels for the week ended Oct. 2, while motor gasoline stockpiles rose by 544,000 barrels. Distillates declined by 2.9 million barrels, the API's data showed.
The Energy Information Administration will report its more closely watched update on U.S. petroleum supplies at 10:30 a.m. Eastern.
Analysts polled by Platts expect a buildup of 1.9 million barrels in crude inventories. They also project weekly increases of 1.3 million barrels for gasoline and 400,000 barrels for distillates.
"After the API data release, there is downside risk for these projections, which may make a renewed retreat to below $70 a barrel even more difficult," said analysts at Commerzbank in a note to clients.
Crude futures finished slightly higher on Tuesday, boosted by weakness in the U.S. dollar.
EIA raises demand forecast
Also Tuesday, the EIA announced an upward revision in its expectations for world oil consumption.
The revision amounts to an increase of 200,000 barrels a day for the remainder of 2009 and for 2010, in large part because of improved expectations for Asian growth.
"Sustained economic growth in China and signs of a turnaround in other Asian countries continue to fuel expectations of a global recovery in world oil consumption," the EIA said in its short-term energy outlook.
The agency, however, didn't revise its projections for oil prices because ample supplies remain on the market.
Even after the upward revisions, world oil demand for 2009 and 2010 is projected to be well below last year's level of 85.46 million barrels a day. For 2009, daily demand is pegged at 83.67 million barrels, rising to an estimated 84.77 million barrels for 2010.
Elsewhere in the commodity markets, gold futures soared to a new record high just below $1,050 an ounce on Wednesday.