Create a private endpoint
Create a private endpoint as a draft. Drafts are not routable: validate one with POST /private-endpoints/{id}/validate, then activate it with POST /private-endpoints/{id}/activate. Pass activate to do all three in one call; if validation fails the draft is kept and returned with the failed checks. Send an Idempotency-Key header to make retries safe: a repeated key with the same request returns the endpoint the first request created; reusing it with different fields returns 422 idempotency_key_reused. Management key required.
Headers
Retry-safe create: a repeated create with the same key from the same organization returns the endpoint the first request created instead of creating another. The endpoint is returned as it is now. Reusing a key with a different request body (model, provider, base URL, upstream model ID, declared ZDR or region, or pricing) is rejected with 422 idempotency_key_reused. activate is not compared, and later edits to the endpoint do not affect the comparison.
Retry-safe create: a repeated create with the same key from the same organization returns the endpoint the first request created instead of creating another. The endpoint is returned as it is now. Reusing a key with a different request body (model, provider, base URL, upstream model ID, declared ZDR or region, or pricing) is rejected with 422 idempotency_key_reused. activate is not compared, and later edits to the endpoint do not affect the comparison.
Request body
Example request
{
"activate": {
"workspace_id": "550e8400-e29b-41d4-a716-446655440000"
},
"base_url": "https://contoso.openai.azure.com",
"declared_region": "us",
"model_permaslug": "openai/gpt-4o-2024-08-06",
"pricing": {
"completion": "0.00001",
"prompt": "0.0000025"
},
"provider_slug": "azure",
"upstream_model_id": "gpt-4o-prod"
}Response
The created endpoint: a draft, or active when activate was passed
Example response
{
"data": {
"created_at": "2026-09-24T10:30:00Z",
"id": "5b1c4c4e-7d0a-4a8e-9f3a-2d6c1b0e8a11",
"model_name": "OpenAI: GPT-4o",
"model_permaslug": "openai/gpt-4o-2024-08-06",
"model_slug": "openai/gpt-4o",
"provider_name": "Azure",
"status": "active",
"declared_region": "us",
"declared_zdr": true
}
}Changes
Changed in 1 of the 339 revisions of this API.1
- ○
endpoint added
endpoint-added
- ○