AC induction motor or AC synchronous? Induction motor could be used as induction generator at speed above synchronous and synchronous motor to generator, only the torque angle would changed, but with in the rated current limit of winding, (used gage wire), as voltage and power factor considered constant……….
Long answer: Your motor will have a current rating for (motor) operation. Anything over that will result in motor thermal overload.
This rating will be specified to a specific voltage, then that determines the maximum power you should put into the motor, and will also be the maximum to extract if you convert it into a generator.