AI Providers and API Keys
The AI features of EP (MeMo, AI Data Modeler, chatbot page, script chat, mapping tool, workshop agents, chat titles) and the automatic translation with DeepL need API keys. This page covers the system keys, the personal keys of the users, and own AI servers. How users store their own keys is described in My Profile; the general MeMo setup in MeMo and the AI Assistants.
Keys
System Keys
The system key of a service is shared by everyone:
| Service | System key |
|---|---|
| Anthropic | Environment variable ANTHROPIC_API_KEY of the EP UI server — or api_key on the entity ai_provider/anthropic, which wins. |
| OpenAI | Environment variable OPENAI_API_KEY — or api_key on ai_provider/openai. |
| DeepL | api_key on the entity translation_service/Deepl (a password field). |
| Own AI servers | api_key on their ai_provider. May be empty. |
Which Key Is Used
- AI: the user's choice in the MeMo assistant settings (own key or system key) wins if that key exists; otherwise the key that exists is used. Expired personal keys count as missing. Without any key, the chat shows an error.
- DeepL: the user's own valid key, otherwise the system key.
- Workshop agents run in the background. They use the key of the person who last drove the workshop, with that person's choice.
Personal Keys: Data Model
Personal keys come with the package ep.ui.user:
-
user_api_keys— one entity per user. Its key is the user's ID (sub); propertyuser(user reference) and the listapi_keysofuser_api_keyitems with the properties:Property Content nameThe service: a reference to an api_key_serviceentity (api_key_service/<id>).descriptionFree text. urlOptional endpoint; for DeepL the server address. usernameOptional user name. api_keyThe key (password field). expiresExpiry date and time. -
Entity type
api_key_service— the services a personal key can be for. Key = the service name, plus alabelthat the key dialog shows. Packages create their services:ep.aicreatesanthropicandopenai, the translation services createdeepl. The key must equal the provider ID (AI) ordeepl. -
Own AI providers register themselves: when an AI provider is created, EP creates
api_key_service/<name>if it does not exist yet. Users can store a personal key for the new provider right away; the key dialog lists it by the provider's label.
Rights
The role app_user has the rights create/read/update on user_api_keys and create/read/update/delete on user_api_key. Whoever creates AI providers also needs the right to create api_key_service entities (see above).
Keys are stored in plain text in EP.Core; the masking only hides them on screen. Today everyone with these rights can read the keys of all users. This will be restricted when the rights management of EP.Core supports ownership. Inform your users accordingly.
Password Property Type
The new property type string_property_type/password is meant for secrets in your own data models: use it as the target of a has_prop. The UI shows such values masked with an eye button (how users see it). It is not encryption — EP.Core stores and returns the plain value.
AI Providers
An AI provider (entity type ai_provider, package ep.ai) is a source of AI models. Its kind decides how EP talks to it:
kind | Interface | Examples |
|---|---|---|
anthropic | Anthropic SDK | Built in: ai_provider/anthropic |
openai | OpenAI SDK | Built in: ai_provider/openai |
openai_compatible | OpenAI chat-completions API | llama.cpp server, vLLM, Ollama, LM Studio, OpenCode, … |
The two built-in providers also work when no ai_provider entity exists for them. Their entities can only refine them (label, base_url as a proxy, enabled, own api_key); their kind cannot be changed.
Properties
| Property | Meaning |
|---|---|
name | Required, also the key. The provider ID: letters, digits, - and _. Used in ai_model.provider and as the prefix name:model. |
label | Shown as the group in the model picker, for example llama.cpp Lab. |
kind | Required, see above. |
base_url | For example http://gpu01:8080/v1 — the address ending in /v1. Required for openai_compatible; an optional proxy for the others. |
api_key | System key (password field). Empty: the built-in providers use the environment variable, own servers run without a key. |
auto_discover | On (default): the models are read from GET {base_url}/models. Off: only the ai_model entities of this provider are offered. |
enabled | Off: the provider's models disappear from all model pickers, and requests to it fail. |
Connect Your Own Server
To use an OpenAI-compatible server such as llama.cpp, vLLM, Ollama or OpenCode:
- Open the search for the type AI provider (
/search/ai_provider) and create a new entity. There is no menu entry yet. - Fill in:
name: only letters, digits and_(a hyphen is rejected), for examplellama_lablabel: for example llama.cpp Labkind: OpenAI-compatiblebase_url:http://<host>:<port>/v1api_key: only if the server requires oneenabled: on
- Choose how the models are found:
auto_discoveron — the server's models appear by themselves, orauto_discoveroff — createai_modelentities yourself:provider=llama_lab,model_id= the ID the server expects (for exampleqwen2.5-coder:32b; colons are fine), and alabel.
- Set the capabilities on each
ai_model, especiallysupports_tools. - Open MeMo: the model picker shows the group llama.cpp Lab. The list is cached for up to one minute.
An AI provider of your own: kind OpenAI-compatible, base URL of the server, API key masked
Model Capabilities
These properties of ai_model are only evaluated for models of openai_compatible providers:
| Property | Effect |
|---|---|
supports_tools | Off: MeMo offers only Ask; Plan and Agent are greyed out with the tooltip This model cannot use tools — only Ask is available, and a running chat switches to Ask. The model gets no EP tools and is told so. Not set = tools on. |
supports_vision | On: file and image attachments are allowed; otherwise an attachment leads to an error. |
supports_reasoning | Informational for now. |
context_window | Informational for now. |
max_output_tokens | Upper limit per answer, passed to the model. |
Lifecycle of Models
The statuses stay the same: Available → Deprecated → Gone (see Available Models). A model becomes Gone only when its provider's model list was fetched successfully with the system key and the model is missing. Lists fetched with a user's own key, providers without auto_discover, and servers that cannot be reached never retire models. EP waits at most 4 seconds per server; a server that is switched off only means its models are missing from the picker.
Default Model and Workshop
ai_settings/default→default_modelreferences anai_model. The model carries its provider, so there is one choice — models of your own providers included. See Default Model.- The workshop environment variables
WORKSHOP_MODEL_FASTandWORKSHOP_MODEL_STRONGtakeprovider:model, for examplellama_lab:qwen2.5-coder:32b(split at the first colon).
What Only Anthropic Models Can Do
Prompt caching and the Advisor work only for providers of the kind anthropic. The display of the model's reasoning works for Anthropic and OpenAI. Own servers run without these features.
Security
AI_PROVIDER_ALLOWED_HOSTS(environment variable of the EP UI server, comma-separated host names): when set, EP calls only these hosts asbase_url. Recommended as long as every signed-in user may create providers.- Rights: the role
integration_adminhas create/read/update/delete onai_provider(as onai_model); in a local installation currently everyone. EP reads the providers with the token of the signed-in user, so everyone who uses a provider with a key must be able to read it — and can therefore read its key until the rights management restricts it.