The way to upload zip(or other binary file to a branch) by API

What i am doing is to read the file as bytes and then base64 encode to a string - treat as a text file. But needadditonal work when pull branch to local folder -need base64 decode bytes and rewrite file.

If use git command to add /commit a binary(e.g zip) file and push to remote repo, then it’s the file itself as it is, no matter pull, download from webpage or download by API.

My question, is there any API endpoint to upload a binary file to remote repo with binary type content(not converted to string type?)

Many THX