There's no official API to download the pbix file. You can submit your idea at Power BI Ideas and vote it up.
I also did some research, however I found it is a dead end. When downloading a pbix file, a GET request as below is actually called. I can re-do the GET request with the Bearer token in an API console like POSTMAN to download the pbix file, but the token would expire in one hour and a token generated from here can't access that request(401 error).