Add a custom endpoint
Add a custom OpenAI-compatible endpoint (public HTTPS only). The base URL is normalised and validated with the key before saving; the key is encrypted at rest and never returned.
A refused validation is a 400 with one coarse code (endpoint_blocked,
endpoint_unreachable, endpoint_tls_error, endpoint_timeout,
endpoint_auth_failed, endpoint_not_found, endpoint_invalid_response,
endpoint_redirected). An endpoint without a model list (endpoint_not_found)
is saved when manual_models are given, with last_discovery_error set.
An account holds at most 10 endpoints (409 custom_endpoint_limit_reached);
names are unique per account ignoring case (409 custom_endpoint_name_taken).
A transient failure is 503 key_validation_unavailable. Each check draws
from the user’s validation budget (429 rate_limited).
Body
A malformed field (name, key or URL length, a manual model ID that does not match the model ID pattern, more than 50 manual IDs) is a 400 with the code invalid_request.
Response
Custom endpoint created
A custom OpenAI-compatible endpoint. The API key is never returned.

