DSID=$(cat ~/.ivanti_dsid)
TOKEN=YOUR_TOKEN_HERE
Reads the DSID session value stored in the ~/.ivanti_dsid file and makes it available as an environment variable to use in requests.
Stores the authentication token in a variable so it can be reused in calls that require authorization.
curl -X GET \
'https://extranet.scayle.es:11010/api/models' \
-H "Cookie: DSID=${DSID}; token=${TOKEN}"
Gets the list of available models, where you can obtain the model IDs, using the token as the authorization credential.
curl -X POST "https://extranet.scayle.es:11010/api/chat/completions" \
-H "Content-Type: application/json" \
-H "Cookie: DSID=${DSID}; token=${TOKEN}" \
-d '{
"model": "MODEL_ID",
"messages": [
{
"role": "user",
"content": "Hello, how are you?"
}
]
}'
Sends a user message to the specified model and requests a response generated by the API.