Endpoints

Update endpoint [WRITE]

Changed on
put/v2/endpoint/{namespace}/{name}

Request

  • Base URL
    https://api.endpoints.huggingface.cloud (the document declares no server; this is the origin it was published from)
  • URL
    https://api.endpoints.huggingface.cloud/v2/endpoint/{namespace}/{name}
  • Auth
    HTTP bearer

Path parameters

namespacestring required

User or organization name

namestring required

Endpoint name

Request body

tagsstring[] nullable

Endpoint tags

type'public' | 'authenticated' | 'private'

Endpoint visibility and authentication mode

Example request

{
  "compute": {
    "instanceSize": "x2",
    "instanceType": "intel-spr",
    "scaling": {
      "maxReplica": 8,
      "measure": {
        "hardwareUsage": 80
      },
      "minReplica": 2,
      "scaleToZeroTimeout": 15,
      "schedule": [
        {
          "at": "07:30",
          "maxReplica": 4,
          "minReplica": 1,
          "scaleToZeroTimeout": 15
        }
      ]
    }
  },
  "model": {
    "image": {
      "tgi": {
        "healthRoute": "/health",
        "port": 80,
        "url": "https://host/image:tag",
        "maxBatchPrefillTokens": 2048,
        "maxBatchTotalTokens": 2048,
        "maxInputLength": 1024,
        "maxTotalTokens": 1512,
        "disableCustomKernels": true
      }
    },
    "repository": "openai-community/gpt2",
    "revision": "6c0e6080953db56375760c0471a8c5f2929baf11"
  },
  "network": {
    "cidrList": [
      "10.0.0.0/8"
    ]
  },
  "provider": {
    "region": "us-east-1",
    "vendor": "aws"
  },
  "route": {
    "domain": "api.example.com",
    "path": "/v1/models/gpt2"
  }
}

Response

Endpoint updated successfully

healthRoutestring required

Endpoint health route

namestring required

Endpoint name. Must only contains lowercase alphanumeric characters or '-' and have a length of 32 characters maximum

tagsstring[] required
type'public' | 'authenticated' | 'private' required

Endpoint visibility and authentication mode

Example response

{
  "compute": {
    "instanceSize": "x1",
    "instanceType": "intel-spr",
    "scaling": {
      "maxReplica": 4,
      "measure": {
        "hardwareUsage": 80
      },
      "minReplica": 1,
      "scaleToZeroTimeout": 15,
      "schedule": [
        {
          "at": "07:30",
          "maxReplica": 4,
          "minReplica": 1,
          "scaleToZeroTimeout": 15
        }
      ]
    }
  },
  "model": {
    "env": {
      "MAX_CONCURRENT_REQUESTS": "128"
    },
    "image": {
      "tgi": {
        "healthRoute": "/health",
        "port": 80,
        "url": "https://host/image:tag",
        "maxBatchPrefillTokens": 2048,
        "maxBatchTotalTokens": 2048,
        "maxInputLength": 1024,
        "maxTotalTokens": 1512,
        "disableCustomKernels": true
      }
    },
    "repository": "meta-llama/Llama-2-7b-hf",
    "revision": "main",
    "secrets": {
      "HF_TOKEN": "hf_xxx"
    }
  },
  "name": "my-endpoint",
  "network": {
    "cidrList": [
      "10.0.0.0/8"
    ]
  },
  "privateService": {
    "accountId": "123456789012"
  },
  "provider": {
    "region": "us-east-1",
    "vendor": "aws"
  },
  "route": {
    "domain": "api.example.com",
    "path": "/v1/models/gpt2"
  },
  "status": {
    "readyReplica": 2,
    "targetReplica": 4,
    "url": "https://68a0f3b5c6ee5c9dcc0e0a01.endpoints.huggingface.cloud"
  }
}

Changes

    • breaking

      removed subschema #2 subschema #3 subschema #4 subschema #5 subschema #6 subschema #7 subschema #8 subschema #10 from the ///////// request property oneOf list

    • breaking

      added subschema #2 subschema #3 subschema #4 subschema #5 subschema #6 subschema #7 subschema #8 subschema #10 to the / response property oneOf list for the response status

    • info

      added the new optional request property //////////

    • info

      added subschema #2 subschema #3 subschema #4 subschema #5 subschema #6 subschema #7 subschema #8 subschema #10 to the ///////// request property oneOf list

    • info

      added the optional property // to the response with the status

    • info

      removed subschema #2 subschema #3 subschema #4 subschema #5 subschema #6 subschema #7 subschema #8 subschema #10 from the / response property oneOf list for the response status

    • breaking

      added subschema #3 to the ////// response property oneOf list for the response status

    • info

      added subschema #3 to the ////////////// request property oneOf list