Interacting via API


To access the language model service (LLMs), you need an active SCAYLE account with the corresponding permissions. These permissions for using LLMs must be requested by email at .


Install the following system dependency:

sudo apt install openconnect

Next, to interact with the API, you must first generate a valid session cookie. This cookie allows requests to be authenticated without entering credentials for each request.

To do this, use the script:

login.py

This script logs in to Ivanti Pulse Secure and saves the DSID cookie in the file:

~/.ivanti_dsid

Once the cookie has been generated, any script or API request can use it by reading that file.


Define the following variable:

DSID=$(cat ~/.ivanti_dsid)

To obtain the token, run this request:

curl -X POST 'https://extranet.scayle.es:11010/api/v1/auths/ldap' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H "Cookie: DSID=${DSID}" \
  -d '{
    "user": "SCAYLE_user",
    "password": "SCAYLE_password"
  }'

The response will return a JSON object containing the token field.

This token will then be used to interact with the API.

You can now use the following methods to interact with the API, or use other external methods.

Available ways to interact with the API:

  • Via - OpenAI library.
  • Via - Requests library.
  • Via - Terminal console.