Skip to content

First LLM request ​

Check that you can reach the platform's models by listing them and getting a first answer. This page is optional: you do not need it to use an agent.

This calls a model, not an agent

A model has no memory and no tools. To use those, start an agent.

Before you begin ​

  • The ollama-user role in ALIDA. Ask an administrator if you do not have it.
  • An API key created in the ALIDA interface.

1. Set the variables ​

bash
export ALIDA_URL='https://<alida-instance-url>'
export ALIDA_API_KEY='<api-key>'

2. List the models ​

bash
curl -sS "${ALIDA_URL}/events/ollama/ollama-user/v1/models" \
  -H "Authorization: Apikey ${ALIDA_API_KEY}"

Choose a model id from the response.

3. Send a message ​

Replace <model> with the id you chose.

bash
curl -sS "${ALIDA_URL}/events/ollama/ollama-user/v1/chat/completions" \
  -H "Authorization: Apikey ${ALIDA_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "<model>",
    "messages": [{"role": "user", "content": "Hello"}],
    "stream": false
  }'

The answer is in choices[0].message.content.

Use another client ​

Any OpenAI-compatible client, such as Open WebUI or LangChain, works with these settings:

SettingValue
Base URLhttps://<alida-instance-url>/events/ollama/ollama-user/v1
API keyYour ALIDA API key

The native Ollama APIs are also available under the same base URL, without /v1: for example /api/tags and /api/generate.

Next: choose an agent.