NOT LOGGED INITIALLY must be used in the same transaction as the operations that should not be logged. NLI is deactivated on the first COMMIT/ROLLBACK operation for the transaction that set NLI. Because your application initiates the transaction, it is the application that MUST use the ALTER TABLE statement to turn logging temporarily off.
If you think about it, there is no other sensible way. For example, if you have an application that relies on its data being safe and recoverable, it would go directly against this application if you could turn logging of for the application's data.