# LLM providers

> An LLM provider is one concrete model deployment registered in your organization. AI nodes reference it by id, and Sommatic AI resolves the endpoint and key on the server when the node runs.

Source: https://docs.sommatic.ai/en/ai/llm-providers/ (updated 2026-11-26)

An LLM provider tells Sommatic AI which model to call and how to reach it. You register it once; every AI node of every
workflow then points to it with `llm_provider_id`. To move a workflow to another model, you change the provider the
node references, not the workflow logic.

## Provider types

`provider_type` decides which adapter Sommatic AI uses to talk to the model. It is stored as an object, for example
`{ "id": 3, "name": "openai", "title": "OpenAI" }`:

| `provider_type`   | Title                      |
| ----------------- | -------------------------- |
| `link-loom-cloud` | Link Loom Cloud            |
| `azure-foundry`   | Azure Foundry              |
| `openai`          | OpenAI                     |
| `aws-bedrock`     | AWS Bedrock                |
| `google-vertex`   | Google Vertex AI           |
| `azure-openai`    | Azure OpenAI               |
| `generic-json`    | Generic JSON (the default) |

## Fields

| Field                                                        | What it is                                                                                       |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `slug`, `name`, `description`                                | Stable key and labels. `slug` and `name` are required.                                           |
| `organization_id`, `project_id`                              | Owner organization and, optionally, project.                                                     |
| `provider_type`                                              | One of the types above.                                                                          |
| `transport_kind`                                             | How the provider is reached. The portal uses `http-api`.                                         |
| `endpoint`, `api_version`, `deployment_name`                 | Where the model lives and which deployment or model identifier to use.                           |
| `default_parameters`                                         | Parameters applied when a call does not override them (for example `temperature`, `max_tokens`). |
| `input_token_limit`, `output_token_limit`                    | Token limits of the deployment.                                                                  |
| `pricing`, `rate_limits`, `safety_settings`, `routing_rules` | Cost metadata, limits, safety constraints and routing rules of the provider.                     |
| `is_default`                                                 | Marks the provider as the default of the organization.                                           |

Statuses: `enabled`, `review`, `deprecated` and `archived`.

## Register a provider

### Open the provider list

In the portal, go to **Advanced → Cognitive Infrastructure → Model**. The list shows every LLM provider of your
organization.

### Create the provider

Choose **Create LLM Provider** and fill in the provider type, the endpoint, the deployment name and the API version
your deployment needs.

### Use it in a node

In the workflow studio, open an AI node and pick the provider in **LLM Provider**. The node stores its id in
`llm_provider_id`.

## Call a provider directly

`POST /cognitive-infrastructure/cognitive-assets/llm-provider/invoke` runs one call against a provider. It is the same
call AI nodes make in `sync` mode.

**curl**

```bash
curl -X POST https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/llm-provider/invoke \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model_id": "<llm-provider-id>",
    "operation": "chat",
    "input": {
      "messages": [
        { "role": "system", "content": "Answer in one sentence." },
        { "role": "user", "content": "What is a flow version?" }
      ]
    }
  }'
```

**JavaScript**

```javascript
const response = await fetch(
  'https://api.sommatic.ai/cognitive-infrastructure/cognitive-assets/llm-provider/invoke',
  {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${token}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      model_id: llmProviderId,
      operation: 'chat',
      input: {
        messages: [
          { role: 'system', content: 'Answer in one sentence.' },
          { role: 'user', content: 'What is a flow version?' },
        ],
      },
    }),
  },
);
const { success, result } = await response.json();
```

| Body field  | Required | What it is                                                                    |
| ----------- | -------- | ----------------------------------------------------------------------------- |
| `model_id`  | Yes      | The `id` of the LLM provider record.                                          |
| `input`     | Yes      | The call input. For chat, `messages` in the OpenAI shape (`role`, `content`). |
| `operation` | No       | `chat` (default) or `embedding`.                                              |

The answer comes in the standard envelope `{ status, success, message, result }`.

> **Tip: Keep keys out of workflows**
>
> A node only carries `llm_provider_id`. Endpoint, deployment and key stay in the provider record and are resolved on
> the server for each call, so exporting a workflow or syncing it with Git never exposes them.

## Next steps

- [Prompt templates](https://docs.sommatic.ai/en/ai/prompt-templates.md): Attach reusable instructions to a provider.
- [AI nodes](https://docs.sommatic.ai/en/nodes/family/ai.md): The nodes that call your providers.
- [API reference](https://docs.sommatic.ai/en/api/reference/cognitive-infrastructure.md): Every LLM provider endpoint.
