Installing the SDK

Pre-requisites

To run the integrate.ai SDK samples and build models, ensure that your environment is configured properly.

Required software:

Generate an access token

To install the SDK and other components locally, you must generate an access token through the workspace UI.

  1. Log in to your workspace.

  2. On the getting started page, click Generate.

  3. Copy the acccess token and save it to a secure location.

Treat your API tokens like passwords and keep them secret. When working with the API, use the token as an environment variable instead of hardcoding it into your programs. In this documentation, the token is referenced as <IAI_TOKEN>.

Install integrate.ai packages

  • We recommend installing the SDK inside a virtual environment using any of the following tools.
    • uv. If using uv, ensure that all the pip steps below have uv in front of it.

    • python venv

  • At a command prompt on your machine, run the following commands to install the CLI management tool:
  • pip install uv pip install integrate-ai

  • Install the SDK package using the access token you generated.
  • iai sdk install --token <IAI_TOKEN>

Updating your SDK

Typically, each time integrate.ai releases a software update, you must update your local SDK installation. To check the SDK version, run iai sdk version.

You can compare the version against the feature release version in the Release Notes to ensure that your environment is up to date.

The command to update the SDK is the same as you used to install it initially.

iai sdk install --token <IAI_TOKEN>

Updating your local environment

When a new version of an integrate.ai package is released, follow these steps to update your local development environment.

Check version numbers

From a command prompt or terminal, use the pip show integrate-ai command to see the version of the integrate-ai command line interface (CLI).

To check the SDK version, run iai sdk version.

You can compare the version against the feature release version in the Release Notes to ensure that your environment is up to date.

Get the latest packages

Run the following command to update the CLI and all dependent packages. pip install -U integrate-ai

Update the SDK: iai sdk install

Debugging Installation Issues

When installing the SDK you may encounter the following known issues. Follow the steps below to resolve them.

  • SSL Certificate Verification Error, typically appears as follows:
    SSLError: HTTPSConnectionPool(host='integrateai.net', port=443): Max retries exceeded with url: /api/endpoint (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')))
    
    • To resolve the SSL certificate issue:

    • Install Certifi inside the virtual environment:

      pip install --upgrade certifi

    • Run the command below in the python shell to locate the Certifi CA bundle path. The output is a path similar to /path/to/certifi/cacert.pem.
      import certifi
      print(certifi.where()) # Copy this path to use in below steps
      
    • Set the Environment Variables:

      Set the REQUESTS_CA_BUNDLE and SSL_CERT_FILE environment variables to the path of the certifi CA bundle. This process differs based on your operating system.

      For Windows

      1. Open Control Panel -> System and Security -> System -> Advanced system settings.

      2. Click Environment Variables.

      3. Under System variables, click New.

      4. Add the two variables with the path obtained earlier.

         `REQUESTS_CA_BUNDLE` with the value `C:\path\to\certifi\cacert.pem` (obtained above).
         `SSL_CERT_FILE` with the value `C:\path\to\certifi\cacert.pem` (obtained above).
        
      5. Save

      For MacOS / Linux

      1. Open your terminal and set the environment variables:

      export REQUESTS_CA_BUNDLE=/path/to/certifi/cacert.pem
      export SSL_CERT_FILE=/path/to/certifi/cacert.pem
      
      1. To make this change permanent, add the export command to your shell configuration file (e.g., ~/.bashrc, ~/.bash_profile, ~/.zshrc):

      echo 'export REQUESTS_CA_BUNDLE=/path/to/certifi/cacert.pem' >> ~/.bashrc
      echo 'export SSL_CERT_FILE=/path/to/certifi/cacert.pem' >> ~/.bashrc
      
      source ~/.bashrc
      
    • The `pip-system-certs` library may also be required. To install the library:

      pip install pip-system-certs

    • Install the SDK after these steps have been completed.