Move API models to main library