Authentication

Authentication

To authenticate you'll need to log in and get your API key. Include your key in an Authorization header with every request you make: Authorization: Bearer YOUR_API_KEY.

For example, deploying a custom generator with curl might look like (replace the fake API key):

$ curl \
    -H "Authorization: Bearer dac610f0-1dd7-412b-b157-3fa45e82f7a3" \
    -d '{"undeployAt": "2020-12-30T18:30:00Z"}' \
    https://api.inferkit.com/v1/models/512776dd-f2ba-48b7-a39c-37bd76c7731d/deploy

A response with error code UNAUTHENTICATED means that your Authorization header is either missing or incorrect.

Protect your API key

Your API key is secret. Do not share it with anyone you don't trust, or embed it in a web page.

Currently, if you want to have a publicly accessible web page that makes requests to a custom generator, you must put your own API in between the user and InferKit to avoid exposing your API key.