---
title: "Create a private provider"
method: POST
path: "/private-providers"
tags: ["Private Providers"]
---

# Create a private provider

`POST /private-providers`

## Request

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

Create a private, bring-your-own-key provider visible only to your organization. Use its slug as `provider_slug` when creating private endpoints. Requires the private endpoints entitlement. [Management key](/docs/guides/overview/auth/management-api-keys) required.

## Request body

- CreatePrivateProviderRequest: A private provider serves only your organization, so its endpoints are recorded as retaining no prompts, training on none and publishing none, and pass every data-policy filter your account or guardrails apply.
  - `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: Defaults to `name`.
  - `name` string, required: Provider name, shown in your activity, logs and Broadcast output. 2-64 letters, numbers, spaces, dots, underscores or hyphens. Cannot be changed later. Neither the name nor its slug may match a public provider name or slug (case-insensitive); other customers may use the same name.
  - `slug` string: 2-64 lowercase letters and numbers, separated by single hyphens. Cannot be changed later. Defaults to the name lowercased, with every run of other characters replaced by a hyphen (`Acme Inference` becomes `acme-inference`).

## Response `201`

The provider was created

- 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 `201` status
  - removed the request property `data_policy`
- **2026-10-29** `a2f66e6ef8bc`: 6 breaking, 5 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 `name` request property's minLength was increased from `0` to `2`
  - the `slug` request property's minLength was increased from `0` to `2`
  - …7 more
- **2026-10-29** `58d330fbac62`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openrouterteam/apis/openrouter-api/changes/private-providers/post.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)
