Example Usage
import { CreatePrivateEndpointRequest } from "@openrouter/sdk/models";
let value: CreatePrivateEndpointRequest = {
modelPermaslug: "openai/gpt-4o-2024-08-06",
providerSlug: "azure",
upstreamModelId: "gpt-4o-prod",
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
activate | models.PrivateEndpointActivation | ➖ | Validate and activate in the same call. On a failed validation the draft is kept and returned with a 422, so fix it and call /validate and /activate instead of creating it again. | { “workspace_id”: “550e8400-e29b-41d4-a716-446655440000” } |
baseUrl | string | ➖ | HTTPS base URL of your deployment. Required unless the provider derives its URL from the BYOK credential (Azure, Amazon Bedrock, Google Vertex). | https://contoso.openai.azure.com |
declaredParameters | models.PrivateEndpointDeclaredParameter[] | ➖ | Parameters the upstream supports beyond the tested ones. Replaces the earlier declaration; tested parameters stay. Order and repeated names are ignored, but the list holds at most as many entries as there are declarable parameters, repeats included. tool_choice requires tools to be tested or declared. | [ “temperature”, “seed” ] |
declaredRegion | models.CreatePrivateEndpointRequestDeclaredRegion | ➖ | Attest where this deployment processes data. | us |
declaredZdr | boolean | ➖ | Attest that this deployment retains no prompt or completion data. | |
modelPermaslug | string | ✔️ | Permanent slug of the model this endpoint serves. | openai/gpt-4o-2024-08-06 |
pricing | models.PrivateEndpointPricing | ➖ | Negotiated per-token rates reported for requests routed to this endpoint. | { “cache_read”: “0.00000025”, “cache_write”: “0.000003125”, “completion”: “0.00001”, “prompt”: “0.0000025” } |
providerSlug | string | ✔️ | Slug of the upstream provider. | azure |
settings | models.UpdatePrivateEndpointSettingsRequest | ➖ | Capabilities and limits to set over the ones copied from the public endpoint for this model and provider (or from the model). Omitted fields keep the copied values. | { “context_length”: 128000, “reasoning”: { “supported”: true } } |
upstreamModelId | string | ✔️ | Model or deployment identifier sent to the upstream provider. | gpt-4o-prod |