---
title: Use a custom model endpoint with Pulumi Agents
url: /docs/ai/agents/model-providers/custom-endpoint/
---
> This [Pulumi Cloud](/docs/iac/concepts/pulumi-cloud/) feature is available in the [Enterprise edition](/pricing/#neo-byok).



Connect an LLM gateway or another endpoint that serves the Anthropic Messages, OpenAI Chat Completions, or OpenAI Responses API. The endpoint must support streaming and have a public HTTPS address that Pulumi Cloud can reach. Private IP addresses are unsupported.

## Connect your endpoint

Organizations on the legacy Business Critical edition also have access to this feature. To connect the provider, you need permission to manage your organization's integrations, such as the Admin role.

1. In Pulumi Cloud, open your organization's **Agent Settings**.
1. Select **Model provider**, then **Add model provider**.
1. Enter a unique **Name** using lowercase letters, numbers, and hyphens. Choose a name you can recognize when configuring an agent. The name is permanent, and Pulumi reserves `pulumi`.
1. Under **Provider**, select **Custom**.

Enter the connection details for your endpoint.

- **API format**: The API your endpoint serves.
- **Base URL**: Your endpoint's HTTPS base URL. The form shows the full URL that requests go to.
- For Anthropic Messages, agents append `/v1/messages`. For example, `https://gateway.example.com/anthropic` sends requests to `https://gateway.example.com/anthropic/v1/messages`.
- For the OpenAI formats, include the version segment. Agents append `/chat/completions` or `/responses`. For example, `https://gateway.example.com/v1` sends requests to `https://gateway.example.com/v1/chat/completions`.
- **Auth headers**: The header names and secret values your endpoint requires. For example, use `x-api-key` with an API key, or `Authorization` with `Bearer <your-api-key>`. Use **Add header** if the endpoint requires more than one header.
- **Default model**: The model ID or alias your endpoint expects for agent tasks.
- **Fast model (recommended)**: The model ID or alias for a smaller, faster model.

With **OpenAI Responses**, you can also set [Thinking](/docs/ai/agents/model-providers/#thinking) for the provider.

## Test and use the provider

Select **Save**. Pulumi sends a test request to each configured model and shows any errors. If a request fails, correct the settings and save again.

To use the connection for one agent, [open the agent's configuration](/docs/ai/agents/configure/#choose-a-model), select the provider by name under **Model**, and save the agent. Start a new task to use that selection.

To use the connection for new tasks that follow the organization default, check whether it is already the default. If needed, select **Set as default** in **Agent Settings**. See [how Pulumi chooses the default provider](/docs/ai/agents/model-providers/#the-default-provider).


