Controlling AI usage and cost