> For the complete documentation index, see [llms.txt](https://cleyrop.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cleyrop.gitbook.io/docs/v4.7-en/administration/gerer-les-modeles-et-les-cles-api.md).

# Manage models and API keys

Configure the AI models and API keys used by the Cleyrop platform.

As a Platform Manager, you can connect your own AI model providers (OpenAI, Mistral, Anthropic, OVH, etc.), define the default models used by Le Druide and the corpora, and make the other models available to developers via the PyAI library.

<figure><img src="https://4159280578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMHNFH6aA4j5ucH4XFBXy%2Fuploads%2Fgit-blob-fa0fb03c7e8e5d4cc2ad506d10e8c580e73f843e%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

***

### API key types

Two types of keys coexist in the interface:

**Client keys** : added by the Platform Manager, fully editable and deletable.

**Cleyrop keys** : preconfigured by Cleyrop. Their models can be used and can be set as default models. They cannot be deleted.

### Add an API key

1. Click **+ Add**
2. Enter the **name**, the**API URL** and the **API key**
3. Click **Discover models** to automatically retrieve the list of models available from this provider, or add them manually
4. Add a **display name** for each model if necessary
5. Validate

The key appears in the list with its associated models.

{% hint style="info" %}
A model's technical name (techname) can only be edited when it is created, and only for manually added models.
{% endhint %}

### Configure default models

Three default models can be defined for the platform:

* **Instruct model (general-model)** — used by Le Druide for conversations. Accessible in PyAI via `"default-instruct"`.
* **Embedding model (emb-model)** — used for corpus vectorization. Accessible in PyAI via `"default-embedding"`.
* **Coder model** — used for code features (MCP Dataset). Accessible in PyAI via `"default-coder"`.

The default model change is **effective immediately** across the entire platform.

{% hint style="warning" %}
Le Druide is validated with models from the **GPT** family provided by default (e.g. `gpt-oss-120b`). You can set another default instruct model, but without any guarantee that it will work properly: tool calls, document and chart generation, and response quality may be degraded.
{% endhint %}

{% hint style="warning" %}
A corpus created with a given embedding model cannot be used with another embedding model. Make sure not to change the default embedding model if existing corpora depend on it.
{% endhint %}

### Edit or delete an API key

* **Edit** : open the key, modify the desired fields, and save. A model set as a default model cannot be deleted while it is in use — an explicit message prompts you to change the default model beforehand.
* **Delete** : a modal shows the impacted items (assistants, corpora, Dataflows) before confirmation.

### Track token consumption

From **Administration > Monitoring**, tab **Tokens**, you can track token consumption for your LLM models.

The page displays for the selected period:

* **Prompt tokens** : tokens sent to the models
* **Completion tokens** : tokens generated in response
* **Total tokens** : sum of the two

A trend chart is displayed for each configured model, with the model name and associated provider. You can navigate between periods using the navigation arrows.
