> For the complete documentation index, see [llms.txt](https://documentation.virtuedeep.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.virtuedeep.tech/guides/using-the-public-apis/configuring-llms.md).

# Configuring LLMs

Connect a large language model to your account and assign it to the projects that need one.

Affective Computing (powered by Virtue) uses a large language model to generate the natural-language part of an interaction. The model is not bundled with the platform. You connect one to your account, and it stays under your control: your endpoint, your credentials, your usage.

There are two ways to connect one.

| Method              | When to use it                                                                                                                      |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **Custom endpoint** | You host the model yourself, or you use a provider that exposes an HTTP endpoint. You supply the URL, headers and request template. |
| **AWS Bedrock**     | You use a model from Amazon Bedrock. You supply your access key, secret, region and model name.                                     |

## When a project needs an LLM

An LLM is required only for projects that hold a conversation with a real person. A project whose purpose is simulation runs entirely on virtual humans and needs no model.

| Project purpose   | LLM required |
| ----------------- | ------------ |
| `General`         | Yes          |
| `Data_Collection` | Yes          |
| `Simulation`      | No           |
| `Simulation_bulk` | No           |

The API enforces this. Assigning an LLM to a project whose purpose is `Simulation` or `Simulation_bulk` is rejected.

## The order of operations

1. Connect a model to your account, with either method above.
2. Assign it to a project.
3. Feed the project and build your logic blueprints.

A project accepts exactly one LLM at a time. To change it, remove the current assignment first, then assign the new one.

## Endpoints in this collection

| Endpoint                      | Purpose                                   |
| ----------------------------- | ----------------------------------------- |
| `GET /api/v2/llms`            | List the models connected to your account |
| `POST /api/v2/llms`           | Connect a model on a custom endpoint      |
| `POST /api/v2/llms/bedrock`   | Connect an AWS Bedrock model              |
| `DELETE /api/v2/llms/{id}`    | Disconnect a model                        |
| `POST /api/v2/llm-projects`   | Assign a model to a project               |
| `DELETE /api/v2/llm-projects` | Remove a model from a project             |
