Skip to main content
POST
cURL
An INTELLIGENT target creates an auto route. Find its route_classifier_id with List route classifiers, and see Add an auto route.

Authorizations

Authorization
string
header
required

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

Body

application/json
target
UpsertGridRouteTargetBasetenModelAPIV1 · object
required

Upstream target for the route. CONNECTION targets use the provider and credentials of a connection owned by the route's team. INTELLIGENT targets need at least one of the route classifier's models, and one of its fallback models, servable by the team.

Example:
team_id
string | null

Identifier of the team that owns the route.

Minimum string length: 1
Example:

"abc1234"

display_name
string | null

Display label. Omit to use the route's name; required for INTELLIGENT targets. Null is not accepted.

Required string length: 1 - 255
Example:

"Assistant"

description
string | null

Short description of the route. Omit for no description; null is not accepted.

Maximum string length: 1000
Example:

"Assistant for code review and debugging."

Response

200 - application/json
id
string
required

Stable route identifier.

name
string
required

Name to send in the inference request's model field. Unique within the team; immutable.

display_name
string
required

Display label, defaulting to the route's name.

team_id
string
required

Identifier of the owning team.

team_name
string
required

Name of the owning team.

description
string
required

Short description of the route, empty when unset.

target
GridRouteTargetBasetenModelAPIV1 · object
required

Configured upstream target.

metadata
GridRouteMetadataV1 · object | null
required

Resolved model metadata; for an intelligent route, the envelope of its servable models' metadata. Null when nothing is linked or the metadata has no supported API formats.

invoke_url
string
required

Base URL for inference requests using this route.

created_at
string<date-time>
required

Creation time, ISO 8601.

aliases
GridRouteAliasV1 · object[]

The route's other names, one per purpose. Empty for routes created before aliases existed.