Skip to main content
Replace an endpoint’s target list. The new list can use a different provider than the old one, so you can move a live slug between a Dedicated deployment and another supported target without renaming it. Endpoint slugs are immutable. To use a different slug, create a new endpoint and delete the old one. The PATCH request doesn’t accept slug.

Authentication

string
required
Workspace API key with management scope, passed as Authorization: Api-Key $BASETEN_API_KEY (or Bearer; both are accepted).

Path parameters

string
required
Identifier of the endpoint, returned as id by Create an endpoint.

Body

object[]
required
The endpoint’s complete target list after the call. Exactly one target is supported at this time: send a list of length one. Sending an empty list or more than one target returns 400.Each entry takes:
  • provider (string, required): Upstream provider for the target. One of BASETEN, BASETEN_MODEL_API, ANTHROPIC, OPENAI, VERTEX, or OPENAI_COMPATIBLE.
  • model_id (string): The Baseten model the slug routes to. Required for, and only valid with, BASETEN targets.
  • environment_name (string): Optional Baseten model environment to route to. Valid only with BASETEN targets. Omit it, or pass production, to target production.
  • secret_id (string): Baseten secret holding the provider credential. Required for every provider except BASETEN, and valid only with those providers. For BASETEN_MODEL_API, use a secret containing a Baseten API key. For VERTEX, use a secret whose value is the base64 encoding of Google service-account JSON authorized to call Vertex AI.
  • target_model (string): Upstream model name to send, for example claude-sonnet-4-5. Required for every provider except BASETEN; optional with BASETEN.
  • base_url (string): Publicly reachable HTTPS base URL of the upstream OpenAI-compatible server, for example https://my-vllm.example.com. Must not include embedded credentials or a port, and must not use private, loopback, link-local, reserved, multicast, unspecified, internal, local, or Baseten hosts. Required for, and only valid with, OPENAI_COMPATIBLE.
  • vertex_config (object): Google Vertex configuration. Both project_id (Google Cloud project ID or number) and location (for example global) are required. Valid only with VERTEX.

Response

The updated endpoint, with the same shape as the Create an endpoint response: id, slug, targets, created_at, and updated_at.

Errors