How to use API Key in prediction requests?

This guide will show you how to use API keys in prediction requests.

NOTE: This specifically applies to classification & regression problem types

As seen in the sample code for calling endpoints via API, any prediction request requires an API key.

The inclusion of an API key is for security purposes, to prevent abuse and spam requests to your endpoint. You will also be able to segregate the generated predictions by the different API keys. 

Finding your API keys

Step 1: Navigate to your deployment detail page

  • From the Homepage, select the project you want to do this for
  • Select the App (from the left navigation bar) that contains the deployment of interest
  • In the App page, select the Deployments tab on the left navigation bar
  • Select the deployment of interest from the list of deployments

download-3

Step 2: Go to the Endpoint tab

The Engine has automatically generated 2 API keys for you:

  • Production; and
  • Deployment

Click on the eye icon to show your API key.

Tip: If your API key is hidden, you will not be able to copy it.

download.php?uid=1edc33d7df01d39fa78417c9019c17b-68782b602a6da8ef&tcs=Z93&fileID=p1fmsjqlc2pq11u6r12bpkb7q2j4

Generate new API Key

  1. To generate an additional API key, simply click on "Generate new API Key".
  2. Input the name for the API Key, and click "Save".
  3. Your API Key will be instantly generated.

download.php?uid=4cdde3c930a67dc1268b7cfa6cae78b-6c675cb5805c6ba4&tcs=Z86&fileID=p1fmskc5n615m63bhmri1eelb4b4

Revoke API Key

  1. To revoke an API key, simply click on "Revoke".
  2. Click on "Delete" to confirm, and the API key will be immediately revoked.

download