---
title: "Update a private provider"
method: PATCH
path: "/private-providers/{slug}"
tags: ["Private Providers"]
---

# Update a private provider

`PATCH /private-providers/{slug}`

## Request

- Base URL: `https://openrouter.ai/api/v1`
- URL: `https://openrouter.ai/api/v1/private-providers/{slug}`
- Auth: HTTP bearer

Update a private provider’s display name or base URL. The name and slug cannot change, and the data policy is fixed by OpenRouter, so a body with no editable field is rejected (400). [Management key](/docs/guides/overview/auth/management-api-keys) required.

## Path parameters

- `slug` string, required

## Request body

- UpdatePrivateProviderRequest
  - `base_url` string: HTTPS base URL of an OpenAI-compatible API, used by private endpoints under this provider that set no URL of their own. Without it, each endpoint must set its own. Private, internal, metadata and OpenRouter hosts are rejected.
  - `display_name` string

## Response `200`

The updated provider

- object
  - `data` PrivateProvider, required
    - `base_url` string, nullable, required: HTTPS base URL of an OpenAI-compatible API, used by private endpoints under this provider that set no URL of their own. Without it, each endpoint must set its own. Private, internal, metadata and OpenRouter hosts are rejected.
    - `created_at` string, required
    - `display_name` string, required: Human-readable provider name shown in the UI.
    - `name` string, required: Provider name, shown in your activity, logs and Broadcast output.
    - `slug` string, required: The slug you chose, unique within your account. Use it as `provider_slug` when creating private endpoints and BYOK keys, and in `provider.order`, `only` and `ignore`.

## Other responses

- `400`: Bad Request - Invalid request parameters or malformed input
- `401`: Unauthorized - Authentication required or invalid credentials
- `403`: Forbidden - Authentication successful but insufficient permissions
- `404`: Not Found - Resource does not exist
- `408`: Request Timeout - Operation exceeded time limit
- `409`: Conflict - Resource conflict or concurrent modification
- `422`: Unprocessable Entity - Semantic validation failure
- `429`: Too Many Requests - Rate limit exceeded
- `500`: Internal Server Error - Unexpected server error
- `502`: Bad Gateway - Provider/upstream API failure

## Changes

- **2026-10-31** `4acecf700825`: 1 breaking, 1 warning
  - removed the required property `data/data_policy` from the response with the `200` status
  - removed the request property `data_policy`
- **2026-10-29** `a2f66e6ef8bc`: 2 breaking, 3 warning
  - the `base_url` request property's minLength was increased from `0` to `1`
  - the `display_name` request property's minLength was increased from `0` to `1`
  - the `display_name` request property's maxLength was set to `80`
  - the `data_policy/prompt_retention_days` request property's max was set to `3650.00`
  - …1 more
- **2026-10-29** `58d330fbac62`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openrouterteam/apis/openrouter-api/changes/private-providers/:slug/patch.md)

---

[API](https://skmtc.dev/openrouterteam/apis/openrouter-api.md) - [All operations](https://skmtc.dev/openrouterteam/apis/openrouter-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openrouterteam/apis/openrouter-api/revisions/f797e38f23b4?raw)
