usage function

Extract usage data from OpenAI API response