FAQ

Frequently Asked Questions for the Kognitos REST API.

1. How do I get an API Key?

  1. Log in to your Kognitos account.

  2. Navigate to User Icon > API Keys.

  3. Click on New API Key. Assign it a name and a scope.

  4. Click Create to generate your secret key. Store the key securely, as it won't be shown again.

Check out the API Keys guide for more details on creating and managing API keys.


2. How do I get an agent ID?

There are two ways you can get an agent ID:

Option 1: Copy API Endpoint

  1. Navigate to Processes and click into a process.

  2. Click on the menu in the top-right ( ) and select Copy API Endpoint.

  3. Copy the agent_id from the API Information that appears.

Option 2: View All Agents

Click on the agent dropdown menu and select View All to see a complete list of all your agents with their corresponding IDs:


3. How do I get a process ID?

Option 1: Copy API Endpoint

  1. Navigate to Processes and click into a process.

  2. Click on the menu in the top-right ( ) and select Copy API Endpoint.

  3. Copy the process_id from the API Information that appears.

Option 2: Via API

Make a GET request to /v2/processes. Replace YOUR_AGENT_ID with your agent ID and YOUR_API_KEY with your API key in the following request:

curl -X GET "https://rest-api.app.kognitos.com/v2/processes?agent_id=YOUR_AGENT_ID" \
    -H "x-api-key: YOUR_API_KEY"

Look for the id in the response, which is the process ID:


        {
            "agent_id": "9xk2m3pd7tq8v1za4b5n6c7e8f",
            "stage": "Published",
            "id": "a1b2c3d4e5f6g7h8i9j0klmn1",
            "name": "extract company names from resumes"
        },
        {
            "agent_id": "9xk2m3pd7tq8v1za4b5n6c7e8f",
            "stage": "Draft",
            "id": "o9p8q7r6s5t4u3v2w1x0yzab2",
            "name": "summarize customer feedback comments"
        }
    ],
    "continuation_token": null
}

4. How do I get a run ID?

Make a GET request to /v2/runs to retrieve a list of runs. Replace YOUR_PROCESS_ID, YOUR_AGENT_ID, and YOUR_API_KEY with your actual values:

curl -X GET "https://rest-api.app.kognitos.com/v2/runs?process_id=YOUR_PROCESS_ID&agent_id=YOUR_AGENT_ID&limit=10" \
    -H "x-api-key: YOUR_API_KEY"

Look for the id in the response, which is the run ID:

{
    "items": [
        {
            "id": "9nvx1hdm9bd74rp585oe81t5i",
            "name": "Process invoice 42",
            "process_id": "b4fznghynbdemslfd5k044fgd",
            "agent_id": "a7xm2kp9qwj3v5nh8t4c6r1e9z",
            "stage": "Published",
            "status": "Succeeded",
            "created_at": "2021-01-01T12:00:00"
        }
    ],
    "continuation_token": null
}

5. How do I start a new run using the API?

Without Files

To trigger a new run without file uploads, see Example 6: Start a New Run, which shows how to make a POST request to /v2/runs, include required fields (name, process_id, agent_id, stage) and pass optional input parameters.

With One or More Files

To trigger a new run with one or more files, see Example 7: Start a New Run (with File Upload), which shows the complete 3-step workflow:

  1. Make a POST request to /v2/files

  2. Make a POST request to the upload URL obtained in Step #1

  3. Make a POST request to /v2/runs to start a run with the file ID in the file_ids array

Last updated

Was this helpful?