The company beat revenue expectations on ‘unprecedented’ AI demand but posted a wider loss than analysts were predicting.