Yes afterFind will work, but this conversion will be applied to all application, not just for api. Maybe there is a better place for this logic, like extending yii/rest/Serializer or something else?
If i understand correctly you do this in a model, so why not have a base model from where all your models extend and in that base model override the afterFind method so that it will be inherited by other models and would ease your work.
In 1.1 you would simple extend CactiveRecord into a ActiveRecord and all your models would inherit ActiveRecord. In yii2 things should be pretty similar (not the class but the procedure).
Also, yii2 has a dependency injection mechanism, maybe that does help, i really have no idea honestly since i haven’t tried it yet.
Yii2 AR already does typecasting if possible. For unsigned integers and floating numbers, they are kept as strings to preserve precision. You can override fields() method to typecast these types if you want.