> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainloop.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# LLM Support

> Bring your own AI provider and model to power Chainloop's AI features

> [!NOTE]
>
> This page is about bringing your own model. On Chainloop SaaS, Chainloop configures the AI provider and the model for your organization automatically, and you do not need to do anything. Bring your own LLM provider key is only available on Chainloop's Enterprise [paid plan](https://chainloop.dev/pricing).

## Overview

Chainloop uses Large Language Models (LLMs) to power its AI features, for example:

* [Ask Chainloop](https://docs.chainloop.dev/concepts/ask-chainloop.md), the natural-language assistant on the web and in Slack.
* [LLM-driven policies](https://docs.chainloop.dev/guides/llm-policies.md) and the [`chainloop.evidence_prompt`](https://docs.chainloop.dev/reference/builtin-functions#chainloopevidence_prompt) builtin function.
* [Automatic risk assessment and auto-remediation](https://docs.chainloop.dev/concepts/vulnerability-management.md#assessment-and-auto-remediation-using-ai) of vulnerability findings.
* The [AI session score](https://docs.chainloop.dev/reference/ai-score.md) of AI coding sessions.
* [AI Code Analysis](https://docs.chainloop.dev/concepts/ai-code-analysis.md) of your repositories.

To use your own account, register an AI provider from the [Integrations page](https://app.chainloop.dev/integrations?filterType=ai-provider) of your organization. All AI requests then go to your provider, with your key and the model that you choose. Rate limits and usage costs are governed by your provider account. You can rotate or disconnect the key at any time. When you disconnect it, AI requests stop, and the rest of the platform keeps working.

![AI Provider integrations](https://mintcdn.com/chainloop/i7LPwzemSBO4bbcz/reference/img/llm-support-ai-providers.png?fit=max\&auto=format\&n=i7LPwzemSBO4bbcz\&q=85\&s=dfa961fca5e8cb2ad34b5843ac35a7c0)

## Supported Providers

Chainloop supports two provider types: Anthropic and OpenAI. Each one can connect to the public API of the vendor, or to a custom endpoint that serves a compatible API.

| Integration | Endpoint | Tested with |
| - | - | - |
| **Anthropic** | Anthropic API, or any Anthropic-compatible endpoint | Anthropic API, Claude on Microsoft Foundry, OpenRouter |
| **OpenAI** | OpenAI API, or any OpenAI-compatible endpoint | OpenAI API, Azure OpenAI (Microsoft Foundry), OpenRouter |

You choose the model with the **Model Name** field. Leave it empty on the public Anthropic or OpenAI API to use the default model. With a custom endpoint, the model name is required.

> [!WARNING]
>
> If your organization has both an OpenAI and an Anthropic connection, the AI features use OpenAI first. To use only Anthropic, remove the OpenAI connection.

## Model Requirements

Any model works if it has enough capabilities for the AI features. The model and the endpoint must support:

* A context window of one million tokens.
* Tool calling, for Ask Chainloop.
* Strict structured output, `response_format` with a `json_schema` on OpenAI-compatible endpoints, for evidence evaluation and Slack replies.
* The Responses API (`/responses`) on OpenAI-compatible endpoints, for the AI agents and AI Code Analysis.

A model that lacks one of these capabilities fails in the feature that needs it.

## Anthropic

Register an Anthropic integration to use Claude models.

**Registration fields:**

| Field | Required | Description |
| - | - | - |
| Name | Yes | A unique name for this registration |
| Description | No | Optional description |
| Endpoint | No | A custom Anthropic-compatible endpoint. Leave it empty to use the Anthropic API |
| Model Name | With a custom endpoint | The model that Chainloop sends every request to |
| Api Key | Yes | The API key of your provider |

### Anthropic API

Leave **Endpoint** empty. Requests go to `https://api.anthropic.com`. **Model Name** is optional.

### Claude on Microsoft Foundry

Enter the Anthropic endpoint of your Foundry resource, without `/v1`, for example `https://<resource>.services.ai.azure.com/anthropic`. Use the API key of the Foundry resource.

Set **Model Name** to the name of your Claude deployment. Foundry serves Claude under deployment names that you choose and has no model list, so Chainloop cannot find the model without it.

### Anthropic-compatible gateway

Use this option for OpenRouter, gateways such as Bifrost or LiteLLM, an internal proxy or a regional front door. Enter the base URL to which Chainloop appends `/v1/messages`. Do not include `/v1` yourself.

* For a gateway that routes by a path segment, such as Bifrost, include that segment. If the messages endpoint is `https://gateway.example.com/anthropic/v1/messages`, enter `https://gateway.example.com/anthropic`.
* For a single-provider proxy, a regional front door or a gateway that routes by model, such as LiteLLM, the host is usually enough, for example `https://gateway.example.com`.

Set **Model Name** to the exact name that the gateway serves.

> [!TIP]
>
> Chainloop authenticates with the standard Anthropic `x-api-key` header. For a gateway that requires `Authorization: Bearer` instead, use the OpenAI integration with the OpenAI-compatible endpoint of the gateway.

## OpenAI

Register an OpenAI integration to use OpenAI models, or any model behind an OpenAI-compatible endpoint.

**Registration fields:**

| Field | Required | Description |
| - | - | - |
| Name | Yes | A unique name for this registration |
| Description | No | Optional description |
| Endpoint | No | Your Azure OpenAI resource or an OpenAI-compatible endpoint. Leave it empty to use the OpenAI API |
| Model Name | With a custom endpoint | The model or deployment that Chainloop sends every request to |
| Api Key | Yes | The API key of your provider |

### OpenAI API

Leave **Endpoint** empty to use the public OpenAI API. **Model Name** is optional: leave it empty to use the default model, or enter another OpenAI model.

### Azure OpenAI (Microsoft Foundry)

Enter the host of your resource without a `/v1` suffix, for example `https://<resource>.openai.azure.com`. Chainloop builds the Azure deployment URLs for you.

Set **Model Name** to the name of your deployment.

### OpenAI-compatible endpoint

Use this option for OpenRouter, gateways such as Bifrost or LiteLLM, or a self-hosted model. Enter the full base URL, including the API version segment if the endpoint uses one, for example `https://openrouter.ai/api/v1`. This is the same value as the `OPENAI_BASE_URL` environment variable of the OpenAI SDKs. Chainloop appends request paths such as `/models` and `/chat/completions` to it.

Set **Model Name** to the exact model ID that the endpoint serves, for example `moonshotai/kimi-k3` on OpenRouter.

## Replace the Managed Connection

When your organization has its own key for at least one AI provider, an admin can remove the AI connections that Chainloop manages. All AI features then use your connections. Without a key of your own, the managed connections cannot be removed.

## Related Resources

* [How to run LLM-driven policies](https://docs.chainloop.dev/guides/llm-policies.md): guide on using AI-powered prompts to evaluate evidence
* [Builtin functions reference](https://docs.chainloop.dev/reference/builtin-functions.md#chainloopevidence_prompt): the `chainloop.evidence_prompt` function for custom Rego policies
* [Ask Chainloop](https://docs.chainloop.dev/concepts/ask-chainloop.md): the natural-language assistant
* [Integrations](https://docs.chainloop.dev/concepts/integrations.md): general integration setup instructions


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.