Create a key
API keys belong to a workspace. Create one in the app under Settings → API Keys. The key is shown once, when it is created: copy it into your secret store straight away. A key looks likeloice_sk_ followed by 48 hexadecimal characters. Treat it like a password:
anyone who holds it can spend your workspace’s points.
Send it on every request
Pass the key in theAuthorization header on every request (the API description,
GET /api/v1/openapi.json, is the only exception):
401 and the code
unauthenticated:
One key, one workspace
A key acts for the workspace that created it: it spends that workspace’s points, sees that workspace’s runs and is limited by that workspace’s request budgets. There is nothing else to select in a request.Keys in this site’s playground
The Try it panel on the reference pages sends requests from your browser straight tohttps://app.loice.ai. They do not pass through a proxy. Paste a key only on a device you
trust. Billable operations run for real and are billed as usual.
