It appears that there is a known ZOS-API initialization error when using OpticStudio 2025 R1. Here’s what is stated in the 2025 R1 release notes:

I’m currently using OpticStudio 2025 R1.01 and encountering this problem with Matlab R2021a (which previously worked fine with OpticStudio versions prior to 2025).
Does anyone know if updating to the latest Matlab release will solve the problem? If not, I wonder how/when this bug will be resolved?
Thanks,
Jeff