Api based upload helps you automate uploading javadoc from your build or release flow. To make it secure, a secret key specific to the project needs to be passed for authentication.
To upload a new version using api, you go to the project page and click the "Upload with api" button. This will bring up few examples of uploading from command line, using python and gradle/groovy. The string passed in the header for Authorization is the project's secret key.
Important: The javadoc should be generated with at-least package visibility selected. Without an overview-summary.html in the root folder, DocsHoster won't be able to host it.