Welcome to the Lehmus AI platform. This guide will help you get your project up and running. If you run into any hurdles, our support team is available both on-campus and online to assist you.
The Basics: What is Lehmus AI?
Lehmus AI is a backend platform providing access to local Large Language Models (LLMs), AI Agents, and RAG (Retrieval-Augmented Generation) systems. Lehmus AI also includes chat user interface.
Managing Your Team (Access Control)
Access is managed via University of Oulu IDM groups. Each project is assigned two specific groups:
-
Members:
lehmusai-projectid-staff|idm -
Administrators:
lehmusai-projectid-admins-staff
How to add members:
-
Where: Visit u.oulu.fi/modgroup.
-
Requirement: You must be on the University VPN and logged in with your university account.
-
Result: Once added to a group, users can log in to the Lehmus AI Portal.
Selecting Your Project (Tenants)
The system uses Tenants to keep data secure and isolated.
-
To switch: Click your email address in the portal and select Switch Tenant.
-
Note: Data, RAG settings, and endpoints are unique to each tenant and cannot be shared across different projects.
Setting Up Endpoints & API Keys
To connect your applications (like Open WebUI) to our models, you need to create an API key. API keys can be personal or service accounts. Use personal account for testing and your own tools. Use service account if you are going to deploy new application that will utilize the Lehmus AI platform as LLM and RAG platform.
1. Create an API key
These instructions will help you create an API key that lets you access the language models linked to that API key.
- Click API keys in the left sidebar on the service home page.
- On the API keys page, click the Create API key button in the top-right corner.
- Enter a name for your API key and choose whether to create a Personal or Service Account API key. A good practice is to create a separate API key for each user or application so that usage can be tracked accurately.
- Under Resource type, choose the type of API key you want to create (Model deployment, External Model, RAG Deployment, Group). Under Resource > Select resource, you can choose a language model from the available options. Please note that if you want to use the same API key both for model usage and for RAG endpoints, you must assign both Model Deployment and RAG Deployment for each language model you want to use. This means you may need to add, for example, Gemma4 31B twice to the same API key (Model Deployment + RAG Deployment).
Our current recommendation is Gemma4 31B, which offers a good balance between performance and speed. Using the Add grant button, you can add multiple language models to the same API key.
- When everything is ready, click Create.
Remember to copy and save your API key! You will not be able to see it again after this step.
2. Finding the unique identifiers of language models for API calls
- On the service home page, click Models in the left sidebar to see a list of the available models.
- Click the language model you want to use to open its page, where you can see details such as the model ID and API URL.
3. Creating API calls with the API key
This page contains example calls for using the language models of the Lehmus AI platform. To call the language models, you need an API key and the model’s public ID. The default API base URL is https://api.lehmus-ai.oulu.fi/v1
Chat Completions API interface
curl –request post \
–url https://api.lehmus-ai.oulu.fi/v1/chat/completions \
–header ’authorization: Bearer api_key_here’ \
–header ’content-type: application/json’ \
–data ’{
”model”: ”model_id_here”,
”messages”: [
{
”role”: ”user”,
”content”: ”What does this platform do?”
}
],
”temperature”: 0.7,
”max_tokens”: 150
}’
Responses API interface
curl –request post \
–url https://api.lehmus-ai.oulu.fi/v1/responses \
–header ’authorization: Bearer api_key_here’ \
–header ’content-type: application/json’ \
–data ’{
”model”: ”model_id_here”,
”input”: [
{
”role”: ”user”,
”content”: ”What is the capital of France?”
}
]
}’
Further Reading
Lehmus AI is built on Confidential Minds technology. For advanced configurations and technical deep dives, please refer to the Confidential Minds Documentation.