How to create an OctoAI API token

A guide for how to create a new API token for the OctoAI compute service in the web UI.

All endpoints (including cloned template and endpoints created from your custom models) are by default private. That means you will need an access token in order to run inferences against those endpoints. To generate a token, head to your Account Settings.

After generating a token, make sure to store it in your terminal and/or environment file for your app.


Now you'll be able to run inferences against private endpoints! For example:

curl -X POST '<your-endpoint-url>' --data '{"prompt": "What state is Los Angeles in?", "max_length": 100}' -H 'content-type: application/json' -H "Authorization: Bearer $OCTOAI_TOKEN"