Skip to main content
Create an endpoint. An endpoint is a globally-unique routing slug plus the target it points to. Once created, requests that reach the gateway with this slug route to the target you specify. For the conceptual walkthrough, see Endpoints.

Errors

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <api_key>. The legacy Authorization: Api-Key <api_key> scheme is also accepted.

Body

application/json
slug
string
required

Globally-unique slug of the form '{org_prefix}/{name}'.

Example:

"baseten/mymodel-4"

targets
EndpointTargetRequestV1 · object[]
required

The endpoint's upstream targets. Exactly one target is supported at this time.

Required array length: 1 element
Examples:
region
enum<string>
default:UNRESTRICTED

Region the new routing serves.

Available options:
UNRESTRICTED,
EU

Response

200 - application/json

A Gateway endpoint: a slug and its priority-ordered targets (index 0 tried first).

id
string
required

Stable identifier for the endpoint.

slug
string
required

Globally-unique routing slug.

Example:

"baseten/mymodel-4"

region
enum<string>
required

Region this endpoint's routing serves.

Available options:
UNRESTRICTED,
EU
created_at
string<date-time>
required

Creation time, ISO 8601.

updated_at
string<date-time>
required

Last update time, ISO 8601.

targets
EndpointTargetV1 · object[]
required

The endpoint's upstream targets. Exactly one target is supported at this time.