API Keys
To use our API, you need to generate an API key.
Once you have your key, you can use it to authenticate your requests to our API.
With curl, you can use your API key for example like this:
curl -X 'GET' 'https://api.aish.li/v1/ai/agents?limit=3' \
-H 'X-API-Key: sk_...' \
| jq .
A similar command is also shown after you click Try it out and Execute on the API docs.
Note that this X-API-Key header is different from the Authorization: Bearer ... header which is used for OAuth2 token authentication on the live API docs, only. The X-API-Key header is used instead of OAuth2 for API key authentication from your own back-end systems.
Your API Keys are sensitive and should be kept very secret. They provide full access to your account, without needing your login password; including your agents, session history, billing information, etc. Therefore, never share your API key publicly, certainly never ever embed them in HTML/JS front-end, and never commit them to public or even private Git or other version control repositories. If you believe your API key has been compromised, you should revoke it immediately using the trash icon on the API keys page.
API Keys are only shown once when you create them. You will need to generate a new one if you lose them.