Skip to main content
Version: 2026-11

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:

ServiceSystem key
AnthropicEnvironment variable ANTHROPIC_API_KEY of the EP UI server — or api_key on the entity ai_provider/anthropic, which wins.
OpenAIEnvironment variable OPENAI_API_KEY — or api_key on ai_provider/openai.
DeepLapi_key on the entity translation_service/Deepl (a password field).
Own AI serversapi_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); property user (user reference) and the list api_keys of user_api_key items with the properties:

    PropertyContent
    nameThe service: a reference to an api_key_service entity (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 a label that the key dialog shows. Packages create their services: ep.ai creates anthropic and openai, the translation services create deepl. The key must equal the provider ID (AI) or deepl.

  • 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 readable by others

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:

kindInterfaceExamples
anthropicAnthropic SDKBuilt in: ai_provider/anthropic
openaiOpenAI SDKBuilt in: ai_provider/openai
openai_compatibleOpenAI chat-completions APIllama.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​

PropertyMeaning
nameRequired, also the key. The provider ID: letters, digits, - and _. Used in ai_model.provider and as the prefix name:model.
labelShown as the group in the model picker, for example llama.cpp Lab.
kindRequired, see above.
base_urlFor example http://gpu01:8080/v1 — the address ending in /v1. Required for openai_compatible; an optional proxy for the others.
api_keySystem key (password field). Empty: the built-in providers use the environment variable, own servers run without a key.
auto_discoverOn (default): the models are read from GET {base_url}/models. Off: only the ai_model entities of this provider are offered.
enabledOff: 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:

  1. Open the search for the type AI provider (/search/ai_provider) and create a new entity. There is no menu entry yet.
  2. Fill in:
    • name: only letters, digits and _ (a hyphen is rejected), for example llama_lab
    • label: for example llama.cpp Lab
    • kind: OpenAI-compatible
    • base_url: http://<host>:<port>/v1
    • api_key: only if the server requires one
    • enabled: on
  3. Choose how the models are found:
    • auto_discover on — the server's models appear by themselves, or
    • auto_discover off — create ai_model entities yourself: provider = llama_lab, model_id = the ID the server expects (for example qwen2.5-coder:32b; colons are fine), and a label.
  4. Set the capabilities on each ai_model, especially supports_tools.
  5. Open MeMo: the model picker shows the group llama.cpp Lab. The list is cached for up to one minute.

Own AI provider 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:

PropertyEffect
supports_toolsOff: 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_visionOn: file and image attachments are allowed; otherwise an attachment leads to an error.
supports_reasoningInformational for now.
context_windowInformational for now.
max_output_tokensUpper 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_model references an ai_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_FAST and WORKSHOP_MODEL_STRONG take provider:model, for example llama_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 as base_url. Recommended as long as every signed-in user may create providers.
  • Rights: the role integration_admin has create/read/update/delete on ai_provider (as on ai_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.