Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,38 @@ openapi: post /integrations
import PrismaAirsCta from "/snippets/prisma-airs-cta.mdx";

<PrismaAirsCta />

## Model provisioning (beta)

Control how models are provisioned on a new Integration at creation time by opting into a beta feature with the `x-portkey-beta` header:

```
x-portkey-beta: model-provisioning-2026-09-02
```

When this header is present, two additional request-body fields take effect:

| Field | Type | Default | Description |
| :---- | :--- | :------ | :---------- |
| `enable_all_current_models` | boolean | `false` | Enables every model the provider currently offers at creation. When `false`, those models are attached to the Integration but left disabled, so you can enable only the ones you need. |
| `auto_enable_new_models` | boolean | `false` | Determines whether models the provider adds *later* are automatically enabled on this Integration. |

<Warning>
These defaults apply **only when the beta header is sent**. Without the header, the legacy behavior is preserved: all current models are enabled and new models are auto-enabled. If your integration relies on that implicit behavior, pass these fields explicitly - this beta behavior will become the default in a future release.
</Warning>

### Example

```bash
curl -X POST "https://api.portkey.ai/v1/integrations" \
-H "Content-Type: application/json" \
-H "x-portkey-api-key: $PORTKEY_API_KEY" \
-H "x-portkey-beta: model-provisioning-2026-09-02" \
-d '{
"name": "OpenAI Production",
"slug": "openai-prod",
"ai_provider_id": "openai",
"enable_all_current_models": true,
"auto_enable_new_models": false
}'
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ import PrismaAirsCta from "/snippets/prisma-airs-cta.mdx";

Bulk-update which models an integration can use, plus optional per-model routing and pricing.

## Auto-enabling new models

`auto_enable_new_models` controls whether models the provider adds later are automatically enabled on this integration. It is the preferred, clearer alias for `allow_all_models` - both are accepted and functionally identical. If you send both, `auto_enable_new_models` takes precedence.

Each call also syncs the provider's catalog - any models the integration doesn't have yet are added. Synced models follow this flag: enabled when `true`, added but left disabled when `false`. Keep it `false` to curate access explicitly through the `models` list.

## Per-model configurations

Each item in `models` accepts an optional `configurations` object:
Expand All @@ -34,6 +40,7 @@ curl -X PUT "https://api.portkey.ai/v1/integrations/openai-prod/models" \
-H "Content-Type: application/json" \
-H "x-portkey-api-key: $PORTKEY_API_KEY" \
-d '{
"auto_enable_new_models": false,
"models": [
{
"slug": "my-custom-model-v1",
Expand Down
39 changes: 39 additions & 0 deletions product/model-catalog/integrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,45 @@ This is essential for:

**Important:** The model list you set here applies to all Providers created from this Integration. Workspaces will only see and be able to use the models you've enabled.

#### Controlling Model Provisioning via the API

When you manage Integrations programmatically, model provisioning is controlled by two Admin API endpoints working together:
- The [Create Integration API](/api-reference/admin-api/control-plane/integrations/create-integration) creates the Integration and its initial model access.
- The [Update Model Access API](/api-reference/admin-api/control-plane/integrations/models/update-model-access) changes which models are enabled afterwards - the API equivalent of the Model Provisioning screen above.

**Current default behavior:** Create Integration sets `allow_all_models` to `true`, so a new Integration enables every current model and auto-enables new ones. To restrict access, you follow up with an Update Model Access call - there's no way to lock an Integration down at creation time.

#### Setting Provisioning at Creation Time (Beta)

<Note>
This is a beta feature, opt in by sending the `x-portkey-beta: model-provisioning-2026-09-02` header. This behavior will become the default in a future release - if your API integration relies on today's defaults, see [Preparing for the default change](#preparing-for-the-default-change).
</Note>

Creating Integrations through the UI is unaffected. The core change is a shift to a **restrictive default**: instead of a new Integration automatically enabling every model, it starts with nothing enabled, and you opt models in from the Create Integration call itself.

When the header is present, two request fields govern model provisioning:

| Field | Type | Default | Description |
| :---- | :--- | :------ | :---------- |
| `enable_all_current_models` | boolean | `false` | Enables every model the provider currently offers at creation. When `false`, those models are still attached to the Integration but left disabled, so you can enable only the ones you need. |
| `auto_enable_new_models` | boolean | `false` | Determines whether models the provider adds *later* are automatically enabled on this Integration. |

These are the same controls you already have through `allow_all_models` and Update Model Access - what changes is the default and *when* you apply it:
- **Restrictive by default:** New Integrations enable nothing until you opt models in, rather than exposing every model automatically - no window where all models are briefly available before you curate them.
- **One-step setup:** Provision models in the create request itself, instead of creating an Integration wide-open and then locking it down with a follow-up Update Model Access call.
- **Current and future models together:** Decide up front which existing models are enabled and whether newly released ones auto-enable.

##### Preparing for the default change

<Warning>
**The API default is changing.** Today, a new Integration enables all current models and auto-enables new ones. In a future release, both fields will default to `false` (the beta behavior) - new Integrations will start with no models enabled.

If your integration relies on today's behavior, pass `enable_all_current_models: true` and `auto_enable_new_models: true` explicitly so it keeps working after the change.
</Warning>

<Card title="Create Integration API" icon="code" href="/api-reference/admin-api/control-plane/integrations/create-integration">
Set model provisioning controls when creating Integrations programmatically
</Card>

#### Advanced Model Management

Expand Down
Loading