Motilal Oswal arm invests in API firm