Endpoint APIs

Endpoints can be managed via APIs as well as UI. Use the APIs to create/delete endpoints, update capacity or other configuration parameters for each endpoint.

List All Endpoints:

curl 'https://api.spotprod.segmind.com/endpoint/list' \
  --header 'content-type: application/json' \
  --header 'x-api-key: SG_XXXXX'

Add Endpoint

curl 'https://api.spotstage.segmind.com/endpoint/add' \
  --header 'content-type: application/json' \
  --header 'x-api-key: SG_XXXXX' \
  --data-raw '{"endpoint_name":"replace-with-endpoint-name","model_name":"replace-with-model-name","workers_min":0,"workers_max":1,"idle_timeout":60,"execution_timeout":600,"scaler_type":"REQUEST_COUNT","scaler_value":1,"gpu_id":"AMPERE_80"}'

Update Endpoint

curl -XPUT 'https://api.spotprod.segmind.com/endpoint/update' \
  --header 'content-type: application/json' \
  --header 'x-api-key: SG_XXXXX' \
  --data-raw '{"workers_min":0,"workers_max":2,"endpoint_id":"tpr9hugy367nbz","scaler_type":"REQUEST_COUNT","scaler_value":1,"idle_timeout":60,"execution_timeout":600,"force_update":false}'

Use this API to automate endpoint capacity updates on schedule or demand

Delete Endpoint

curl 'https://api.spotprod.segmind.com/endpoint/delete' \
  --header 'content-type: application/json' \
  --header 'x-api-key: SG_XXXXX' \
  --data-raw '{"endpoint_id":"tpr9hugy367nbz"}

Last updated