Skip to main content
An endpoint is the routing slug your callers use, like my-org/glm-5.2, plus the target it points to. When a request reaches the gateway with that slug, the gateway routes it to the target. As the Gateway operator, you manage endpoints through the REST API, so you can stand up a new slug, re-point it at a different target, or retire it.
To enable Frontier Gateway for your workspace, talk to us.

Concepts

An endpoint has two parts:
  • Slug: a globally-unique routing identifier of the form {org_prefix}/{name}, such as my-org/glm-5.2, where the prefix is one your organization owns. A slug is immutable after creation: to serve traffic under a different slug, create a new endpoint and delete the old one. Because the target is what changes, not the slug, callers keep using the same name.
  • Target: where the slug routes, expressed as a provider plus the fields that provider needs. A target is Baseten-hosted, third-party, or custom. An endpoint takes a list of targets but holds exactly one today.

Supported targets

The target determines where the model runs. The endpoint slug, group access, federated keys, and limits stay the same when you change targets. BASETEN also accepts optional environment_name and target_model. Field meanings:
  • secret_id: the Baseten secret containing the upstream credential. For BASETEN_MODEL_API, store a Baseten API key that can call Model APIs. For VERTEX, the secret value must be the base64 encoding of Google service-account JSON authorized to call Vertex AI.
  • target_model: the model name sent upstream.
  • base_url: the publicly reachable HTTPS URL for OPENAI_COMPATIBLE. It can’t include embedded credentials or a port, and it can’t use private, loopback, link-local, reserved, multicast, unspecified, internal, local, or Baseten hosts.
  • vertex_config: the Google Cloud configuration for VERTEX. Both project_id and location are required.

Endpoints and groups

Endpoints and groups answer two different questions:
  • An endpoint defines what a slug routes to: which upstream target serves traffic for my-org/glm-5.2.
  • A group defines who can call a slug and how much: the model slugs a federated key may call, plus its rate and usage limits.
To serve a model to a caller, create an endpoint for the slug, then grant a group access to that same slug and mint the caller a key under it. The slug ties the two together.

Create an endpoint

Create an endpoint to give callers a stable slug to use. The request body takes the slug and a targets list with one target. For a BASETEN Dedicated deployment target, omit environment_name to use production, or pass a non-production environment such as staging. The response is the new endpoint; save the id, which is the path parameter for every per-endpoint operation that follows. To create an endpoint for a Dedicated deployment:
To point a slug at a third-party provider, send that provider with the secret holding its credential and the model name to send upstream. Before sending the Anthropic request, you must first create a Baseten secret containing the Anthropic API key. The example below fronts Anthropic behind your own slug. To create an endpoint for a third-party provider:
For more information, see POST /v1/gateway/endpoints.

List endpoints

List your endpoints to see every slug you’ve published and where each one routes. Results are cursor-paginated: pass limit and cursor query parameters to page through results, and follow pagination.cursor while pagination.has_more is true. To list endpoints:
To fetch the next page, pass the previous response’s cursor. You’ve drained the result set when the response has "has_more": false and "cursor": null. To retrieve the next page of endpoints:
For more information, see GET /v1/gateway/endpoints.

Get an endpoint

Get an endpoint by its id to check where a single slug currently routes, for example to confirm a change took effect. To get an endpoint:
For more information, see GET /v1/gateway/endpoints/{endpoint_id}.

Re-point an endpoint

Re-point an endpoint to move a live slug to a different target, like promoting a new model version or moving a slug from a third-party provider to your own deployment, without asking callers to change the name they use. The slug stays the same; you replace the endpoint’s full target list, and the new target can use a different provider than the old one. To re-point an endpoint:
The response confirms the slug’s current target. For more information, see PATCH /v1/gateway/endpoints/{endpoint_id}.

Delete an endpoint

Delete an endpoint to take a slug out of service, whether you’re retiring a model or freeing the slug for reuse. The gateway stops routing the slug. To delete an endpoint:
For more information, see DELETE /v1/gateway/endpoints/{endpoint_id}.

Next steps