Authentication is done via the header Authorization with a bearer token.

To get an API key join the waitlist. API keys are prefixed with sk_, for example: sk_{nanoID}.

Example:

$ curl -H 'Authorization: Bearer sk_NefoODAZoyA45KsLsQu6J' 'https://api.objective.inc/v1/.../'

Passing an invalid API key results in an HTTP 401.

Example:

$ curl -v 'https://api.objective.inc/v1/indexes/idx_-bIFxdfVdtFttrf84C44s/search?query=test' \
-H 'Authorization: Bearer sk_does-not-exist'
...
< HTTP/1.1 401 Unauthorized
< Date: Thu, 09 Nov 2023 21:10:00 GMT
< Content-Type: application/json
< Content-Length: 41
< Connection: keep-alive
< www-authenticate: Basic
<
* Connection #0 to host api.objective.inc left intact
{"detail":"Incorrect or expired API key"}