Update a private endpoint
Changed onChange any of the endpoint fields you own in one call; only the fields present change, and the response is the whole endpoint. pricing and declared_parameters replace their stored value, settings changes only the fields it names (null clears a limit or restores the provider default); routing picks these up for subsequent requests on drafts and active endpoints alike. declared_zdr and declared_region change on drafts and active endpoints alike; on an active endpoint the change keeps its validation and tested parameters, and routing applies it to subsequent requests. upstream_model_id and base_url re-point a draft: an omitted upstream_model_id or base_url keeps the stored one, omitted data-policy declarations are kept while the upstream is unchanged and cleared when it changes, and any change to the upstream or declarations of a draft clears earlier validation. Naming upstream_model_id or base_url on an active endpoint returns 409 already_active and writes nothing, even alongside other fields; delete and re-create instead. Every group is checked before anything is written: 400 parameters_invalid when tool_choice is declared without tools tested or declared, 400 settings_invalid when max_prompt_tokens exceeds the context length, both completion APIs are off, or excluded_parameters names a tested parameter, 422 pricing_invalid for rates the provider strategy cannot represent, or pricing_cache_read_unsupported or pricing_cache_write_unsupported when that rate is a cache rate the strategy has no SKU for. Management key required.
Request
- Base URLhttps://openrouter.ai/api/v1
- AuthHTTP bearer
Path parameters
Stable identifier of the private endpoint.
Request body
Only the fields present change. base_url and upstream_model_id are accepted on a draft only; declared_zdr and declared_region on drafts and active endpoints; pricing and declared_parameters replace their value; settings is itself a partial update where null clears a limit or restores the provider default.
HTTPS base URL of your deployment. Required unless the provider derives its URL from the BYOK credential (Azure, Amazon Bedrock, Google Vertex).
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.
Attest where this deployment processes data.
Attest that this deployment retains no prompt or completion data.
Replaces the whole pricing object: omitting cache_read or cache_write reverts that rate to the pricing strategy default.
Only the fields present change; an omitted field keeps its stored value and null clears a limit or reverts a flag to the provider default.
Model or deployment identifier sent to the upstream provider.
Example request
{
"declared_parameters": [
"seed"
],
"settings": {
"context_length": 128000
}
}Response
The updated endpoint
Example response
{
"data": {
"base_url": "https://contoso.openai.azure.com",
"declared_parameters": [
"temperature",
"seed"
],
"declared_region": "us",
"declared_zdr": true,
"id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11",
"max_completion_tokens": 131072,
"model_name": "OpenAI: GPT-4o",
"model_permaslug": "openai/gpt-4o-2024-08-06",
"model_slug": "openai/gpt-4o",
"pricing": {
"cache_read": "0.00000025",
"cache_write": "0.000003125",
"completion": "0.00001",
"prompt": "0.0000025"
},
"provider_name": "Azure",
"provider_slug": "azure",
"settings": {
"completions": {
"chat": true,
"text": false
},
"context_length": 128000,
"excluded_parameters": [
"logit_bias"
],
"inputs": {
"audio": false,
"base64_files": null,
"base64_images": true,
"file_urls": null,
"image_urls": true
},
"max_completion_tokens": 16384,
"max_prompt_tokens": null,
"prompt_caching": {
"cache_control": false,
"prompt_cache_key": false
},
"quantization": "bf16",
"reasoning": {
"return_mechanism": "reasoning",
"supported": true
},
"tool_choice": {
"auto": true,
"function": false,
"none": true,
"required": true
}
},
"status": "active",
"tested_parameters": [
"tools",
"tool_choice",
"response_format"
],
"upstream_model_id": "gpt-4o-prod"
}
}Changes
- warning
added the new
strict_tool_schemasenum value to thedata/settings/excluded_parameters/itemsresponse property for the response status - info
added the new
strict_tool_schemasenum value to the request propertydeclared_parameters/items - info
added the new
strict_tool_schemasenum value to the request propertysettings/allOf[#/components/schemas/UpdatePrivateEndpointSettingsRequest]/excluded_parameters/items
- warning