Added creating a model instance inside mixin API endpoint handler