Endpoint Service

Create an endpoint

POST
/projects/{projectId}/endpoints

Creates a stable, inference-addressable endpoint. Add one or more deployments and configure its traffic split before sending inference requests to the endpoint name.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Project identifier.

Request Body

application/json

Request parameters for creating an endpoint.

name*string

Inference-addressable endpoint name to create.

visibility?string

Who can discover the endpoint. VISIBILITY_PRIVATE restricts it to the project; VISIBILITY_INTERNAL shares it with the organization.

Default"VISIBILITY_PRIVATE"

Value in

  • "VISIBILITY_PRIVATE"
  • "VISIBILITY_INTERNAL"

Response Body

application/json

application/json

curl -X POST "https://example.com/projects/string/endpoints" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "id": "string",  "projectId": "string",  "name": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "etag": "string",  "trafficSplit": [    {      "deploymentId": "string",      "weight": 0    }  ],  "visibility": "VISIBILITY_PRIVATE",  "endpointType": "ENDPOINT_TYPE_DEDICATED",  "deployments": [    {      "id": "string",      "modelId": "string",      "hardware": "string",      "trafficMode": "TRAFFIC_MODE_LIVE",      "state": "DEPLOYMENT_STATE_PROVISIONING",      "name": "string",      "createdAt": "2019-08-24T14:15:22Z",      "autoscaling": {        "minReplicas": 0,        "maxReplicas": 0,        "scaleDownWindow": "string",        "scaleUpWindow": "string",        "scaleToZeroWindow": "string",        "scalingMetrics": [          {            "name": "active_sessions",            "type": "METRIC_TARGET_TYPE_VALUE",            "target": 0,            "percentile": "string"          }        ],        "scaleUp": {          "policies": [            {              "type": "SCALING_POLICY_TYPE_PODS",              "value": 1,              "periodSeconds": 1            }          ],          "selectPolicy": "SCALING_POLICY_SELECT_MAX"        },        "scaleDown": {          "policies": [            {              "type": "SCALING_POLICY_TYPE_PODS",              "value": 1,              "periodSeconds": 1            }          ],          "selectPolicy": "SCALING_POLICY_SELECT_MAX"        }      },      "desiredReplicas": 0,      "readyReplicas": 0,      "model": "string",      "estimatedEffectiveTrafficShare": 0.1    }  ],  "activeRolloutId": "string"}