For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
To interact with the Coactive API, you will need an access token. A short-lived access token (1 hour) can be generated via the /login endpoint (see below) with either a personal token or system credentials. You can find these values in the settings page.
Prerequisites
All users can obtain a personal access token, which is subject to an expiration date of 30 days of no use or 3 months from its time of creation.
System administrators can obtain system credentials that do not expire.
Retrieving the Personal Token or System Credentials
Steps to retrieve credentials in the Coactive dashboard
On the Credentials page, you will find your Personal Token
PERSONAL_TOKEN: A unique token that represents your user access, can be regenerated. Once you generate this token, you must copy it and store it securely because Coactive does not store it.
On the Credentials page, you will find the following:
CLIENT_ID: A unique identifier for your organization.
CLIENT_SECRET: A secure key used to authenticate your organization.
Copy these values and store them securely.
Creating an Access Token
Using a Personal Token (Recommended)
Exchange your PERSONAL_TOKEN for an access token using bearer token authentication.
1
curl --request POST 'https://api.coactive.ai/api/v0/login' \
Exchange the CLIENT_ID and CLIENT_SECRET for an access token using basic authentication.
1
curl --request POST 'https://api.coactive.ai/api/v0/login' \
2
-u '<CLIENT_ID>:<CLIENT_SECRET>' \
3
--header 'Content-Type: application/json' \
4
--data '{"grant_type": "client_credentials"}'
If successful, you will receive an access_token with an expiry of 1 hour (3600 seconds).
Example 200 Response
1
{
2
"access_token": "<ACCESS_TOKEN>",
3
"token_type": "Bearer",
4
"expires_in": 3600
5
}
Using the Access Token
With the retrieved access_token, you can authenicate to our APIs via Bearer Authentication.
1
Authorization: Bearer <ACCESS_TOKEN>
Important Notes
PERSONAL_TOKEN has an expiry date and you cannot retrieve it post creation. You will be able to regenerate this personal token on the Coactive UI.
Keep your CLIENT_ID and CLIENT_SECRET confidential. Do not share them publicly or commit them to version control systems.
If you suspect your credentials have been compromised, please regenerate them through the dashboard or contact your Coactive representative to have them regenerated.
For further assistance, please contact Coactive support at support@coactive.ai.