---
title: "Create a new endpoint"
method: POST
path: "/dedicated/beta/endpoint"
tags: ["Dedicated.Endpoint"]
---

# Create a new endpoint

`POST /dedicated/beta/endpoint`

## Request

- Base URL: `https://api.friendli.ai`
- URL: `https://api.friendli.ai/dedicated/beta/endpoint`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/friendli/apis/friendli-suite-api-reference/docs/dedicated/beta/endpoint/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new endpoint and return its status

## Headers

- `X-Friendli-Team` string, nullable: ID of team to run requests as (optional parameter).

## Request body

- DedicatedEndpointCreateBody: Dedicated endpoint create request.
  - `projectId` string, required: The ID of the project that owns the endpoint.
  - `name` string, required: The name of the endpoint.
  - `instanceOptionId` string, required: The ID of the instance option. Available options: - 1x NVIDIA A100 80GB: `ShbPuOs4tfGb` - 2x NVIDIA A100 80GB: `mrAHuYt7T40o` - 4x NVIDIA A100 80GB: `JkNob0NMdoF3` - 8x NVIDIA A100 80GB: `sYH4kHmAcA5P` - 1x NVIDIA H100: `TwD5AqnBSVN0` - 2x NVIDIA H100: `zfTutSiLn0Hq` - 4x NVIDIA H100: `lfkRz5G48REc` - 8x NVIDIA H100: `GUA4qYFmsYz8` - 1x NVIDIA H200: `LnK1wTaKc7WO` - 2x NVIDIA H200: `Tu6GjBnfHPe4` - 4x NVIDIA H200: `OhTzYtZuomzI` - 8x NVIDIA H200: `ahBzWtOuomsI` - 1x NVIDIA B200: `8GiQTLKfJNOr` - 2x NVIDIA B200: `brTZGIuYgVrs` - 4x NVIDIA B200: `AFoZMFXZnAdD` - 8x NVIDIA B200: `drbc6G9FxJWZ`
  - `advanced` EndpointAdvancedConfig, required: Endpoint advanced config.
    - `max_batch_size` integer, nullable
    - `tokenizer_skip_special_tokens` boolean, required
    - `tokenizer_add_special_tokens` boolean, required
    - `max_token_count` integer
    - `enable_content_logging` boolean, nullable
    - `max_input_length` integer, nullable
  - `simplescale` EndpointSimplescaleConfig: Simple scaling options.
    - `replicas` integer, required
  - `autoscalingPolicy` AutoscalingPolicy: Autoscaling policy.
    - `minReplica` integer: Setting `minReplica` to 0 allows the endpoint to sleep when idle, reducing costs. The minimum value is 0.
    - `maxReplica` integer: The maximum replicas that the endpoint can scale up to. The maximum value is 10.
    - `cooldownPeriod` integer: Determines how long the endpoint waits before scaling down after the last request.
  - `hfModelRepo` string, required: HF ID of the model.
  - `hfModelRepoRevision` string, nullable: HF commit hash of the model.
  - `initialVersionComment` string, nullable: The comment for the initial version.

## Response `200`

Successfully created the endpoint.

- DedicatedEndpointStatus: Dedicated endpoint status.
  - `status` 'UNKNOWN' | 'INITIALIZING' | 'RUNNING' | 'UPDATING' | 'SLEEPING' | 'AWAKING' | 'FAILED' | 'STOPPING' | 'TERMINATING' | 'TERMINATED' | 'READY', required: Status of inference deployment.
  - `errorCode` 'WORKLOAD_INIT_UNKNOWN_ERROR' | 'WORKLOAD_INIT_SETTINGS_ERROR' | 'WORKLOAD_INIT_GRPC_ERROR' | 'WORKLOAD_INIT_MANIFEST_NOT_FOUND_ERROR' | 'WORKLOAD_INIT_MANIFEST_TYPE_ERROR' | 'WORKLOAD_INIT_DOWNLOAD_ERROR' | 'WORKLOAD_INIT_INVALID_TOKEN_ERROR' | 'WORKLOAD_INIT_CANNOT_ACCESS_REPO_ERROR' | 'WORKLOAD_INIT_HF_WANDB_API_ERROR' | 'WORKLOAD_INIT_INSUFFICIENT_DISK_ERROR' | 'INFERENCE_ENGINE_UNKNOWN_ERROR' | 'INFERENCE_ENGINE_INVALID_ARGUMENT_ERROR' | 'INFERENCE_ENGINE_MEMORY_ERROR' | 'INFERENCE_ENGINE_METERING_CLIENT_CONFIG_ERROR': ErrorCode type.
  - `createdAt` string, date-time, required: When the endpoint was created.
  - `updatedAt` string, date-time, nullable: When the endpoint was last updated.
  - `phase` 'REQUESTING_VIRTUAL_MACHINE' | 'DOWNLOADING_MODEL' | 'ENGINE_INITIALIZING', nullable: The current phase of the endpoint.

## Other responses

- `400`: Bad Request
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/friendli/apis/friendli-suite-api-reference.md) - [All operations](https://skmtc.dev/friendli/apis/friendli-suite-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/friendli/apis/friendli-suite-api-reference/revisions/38fb43993a11?raw)
