---
title: "Create a new endpoint"
method: POST
path: "/endpoints"
tags: ["endpoints"]
---

# Create a new endpoint

`POST /endpoints`

Create a new endpoint. Use this API reference to review authentication, request parameters, response fields, and errors for this Runpod operation.

## Request body

- EndpointCreateInput
  - `allowedCudaVersions` string[] — If the created Serverless endpoint is a GPU endpoint, a list of acceptable CUDA versions on the created workers. If not set, any CUDA version is acceptable.
  - `computeType` 'GPU' | 'CPU' — Set to GPU to create a Serverless endpoint with GPU workers. Set to CPU to create a Serverless endpoint with CPU workers. If set to CPU, properties related to GPUs such as gpuTypeIds will be ignored. If set to GPU, properties related to CPUs such as cpuFlavorIds will be ignored.
  - `cpuFlavorIds` string[] — If the created Serverless endpoint is a CPU endpoint, a list of Runpod CPU flavors which can be attached to the created workers. The order of the list determines the order to rent CPU flavors.
  - `dataCenterIds` string[] — A list of Runpod data center IDs where workers on the created Serverless endpoint can be located.
  - `executionTimeoutMs` integer — The maximum number of milliseconds an individual request can run on a Serverless endpoint before the worker is stopped and the request is marked as failed.
  - `flashboot` boolean — Whether to use flash boot for the created Serverless endpoint.
  - `gpuCount` integer — If the created Serverless endpoint is a GPU endpoint, the number of GPUs attached to each worker on the endpoint.
  - `gpuTypeIds` string[] — If the created Serverless endpoint is a GPU endpoint, a list of Runpod GPU types which can be attached to the created workers. The order of the list determines the order to rent GPU types.
  - `idleTimeout` integer — The number of seconds a worker on the created Serverless endpoint can run without taking a job before the worker is scaled down.
  - `minCudaVersion` '13.0' | '12.9' | '12.8' | '12.7' | '12.6' | '12.5' | '12.4' | '12.3' | '12.2' | '12.1' | '12.0' | '11.8' — If the created Serverless endpoint is a GPU endpoint, the minimum acceptable CUDA version on the created workers.
  - `name` string — A user-defined name for the created Serverless endpoint. The name does not need to be unique.
  - `networkVolumeId` string — The unique string identifying the network volume to attach to the created Serverless endpoint.
  - `networkVolumeIds` string[] — A list of network volume IDs to attach to the created Serverless endpoint. Allows multiple network volumes to be used with multi-region endpoints.
  - `scalerType` 'QUEUE_DELAY' | 'REQUEST_COUNT' — The method used to scale up workers on the created Serverless endpoint. If QUEUE_DELAY, workers are scaled based on a periodic check to see if any requests have been in queue for too long. If REQUEST_COUNT, the desired number of workers is periodically calculated based on the number of requests in the endpoint's queue. Use QUEUE_DELAY if you need to ensure requests take no longer than a maximum latency, and use REQUEST_COUNT if you need to scale based on the number of requests.
  - `scalerValue` integer — If the endpoint scalerType is QUEUE_DELAY, the number of seconds a request can remain in queue before a new worker is scaled up. If the endpoint scalerType is REQUEST_COUNT, the number of workers is increased as needed to meet the number of requests in the endpoint's queue divided by scalerValue.
  - `templateId` string, required — The unique string identifying the template used to create the Serverless endpoint.
  - `vcpuCount` integer — If the created Serverless endpoint is a CPU endpoint, the number of vCPUs allocated to each created worker.
  - `workersMax` integer — The maximum number of workers that can be running at the same time on a Serverless endpoint.
  - `workersMin` integer — The minimum number of workers that will run at the same time on a Serverless endpoint. This number of workers will always stay running for the endpoint, and will be charged even if no requests are being processed, but they are charged at a lower rate than running autoscaling workers.

## Response `200`

Successful operation.

- Endpoint
  - `allowedCudaVersions` string[] — A list of acceptable CUDA versions for the workers on a Serverless endpoint. If not set, any CUDA version is acceptable.
  - `computeType` 'CPU' | 'GPU' — The type of compute used by workers on a Serverless endpoint.
  - `createdAt` string — The UTC timestamp when a Serverless endpoint was created.
  - `dataCenterIds` string[] — A list of Runpod data center IDs where workers on a Serverless endpoint can be located.
  - `env` object
  - `executionTimeoutMs` integer — The maximum number of milliseconds an individual request can run on a Serverless endpoint before the worker is stopped and the request is marked as failed.
  - `gpuCount` integer — The number of GPUs attached to each worker on a Serverless endpoint.
  - `gpuTypeIds` string[] — A list of Runpod GPU types which can be attached to a Serverless endpoint.
  - `id` string — A unique string identifying a Serverless endpoint.
  - `idleTimeout` integer — The number of seconds a worker on a Serverless endpoint can be running without taking a job before the worker is scaled down.
  - `instanceIds` string[] — For CPU Serverless endpoints, a list of instance IDs that can be attached to a Serverless endpoint.
  - `minCudaVersion` '13.0' | '12.9' | '12.8' | '12.7' | '12.6' | '12.5' | '12.4' | '12.3' | '12.2' | '12.1' | '12.0' | '11.8' — The minimum acceptable CUDA version for the workers on a Serverless endpoint.
  - `name` string — A user-defined name for a Serverless endpoint. The name does not need to be unique.
  - `networkVolumeId` string — The unique string identifying the network volume to attach to the Serverless endpoint.
  - `networkVolumeIds` string[] — A list of network volume IDs attached to the Serverless endpoint. Allows multiple network volumes to be used with multi-region endpoints.
  - `scalerType` 'QUEUE_DELAY' | 'REQUEST_COUNT' — The method used to scale up workers on a Serverless endpoint. If QUEUE_DELAY, workers are scaled based on a periodic check to see if any requests have been in queue for too long. If REQUEST_COUNT, the desired number of workers is periodically calculated based on the number of requests in the endpoint's queue. Use QUEUE_DELAY if you need to ensure requests take no longer than a maximum latency, and use REQUEST_COUNT if you need to scale based on the number of requests.
  - `scalerValue` integer — If the endpoint scalerType is QUEUE_DELAY, the number of seconds a request can remain in queue before a new worker is scaled up. If the endpoint scalerType is REQUEST_COUNT, the number of workers is increased as needed to meet the number of requests in the endpoint's queue divided by scalerValue.
  - `template` Template
    - `category` string — The category of the template. The category can be used to filter templates in the Runpod UI. Current categories are NVIDIA, AMD, and CPU.
    - `containerDiskInGb` integer — The amount of disk space, in gigabytes (GB), to allocate on the container disk for a Pod or worker. The data on the container disk is wiped when the Pod or worker restarts. To persist data across restarts, set volumeInGb to configure the local network volume.
    - `containerRegistryAuthId` string
    - `dockerEntrypoint` string[] — If specified, overrides the ENTRYPOINT for the Docker image run on a Pod or worker. If [], uses the ENTRYPOINT defined in the image.
    - `dockerStartCmd` string[] — If specified, overrides the start CMD for the Docker image run on a Pod or worker. If [], uses the start CMD defined in the image.
    - `earned` number — The amount of Runpod credits earned by the creator of a template by all Pods or workers created from the template.
    - `env` object
    - `id` string — A unique string identifying a template.
    - `imageName` string — The image tag for the container run on Pods or workers created from a template.
    - `isPublic` boolean — Set to true if a template is public and can be used by any Runpod user. Set to false if a template is private and can only be used by the creator.
    - `isRunpod` boolean — If true, a template is an official template managed by Runpod.
    - `isServerless` boolean — If true, instances created from a template are Serverless workers. If false, instances created from a template are Pods.
    - `name` string — A user-defined name for a template. The name needs to be unique.
    - `ports` string[] — A list of ports exposed on a Pod or worker. Each port is formatted as [port number]/[protocol]. Protocol can be either http or tcp.
    - `readme` string — A string of markdown-formatted text that describes a template. The readme is displayed in the Runpod UI when a user selects the template.
    - `runtimeInMin` integer
    - `volumeInGb` integer — The amount of disk space, in gigabytes (GB), to allocate on the local network volume for a Pod or worker. The data on the local network volume is persisted across restarts. To persist data so that future Pods and workers can access it, create a network volume and set networkVolumeId to attach it to the Pod or worker.
    - `volumeMountPath` string — If a local network volume or network volume is attached to a Pod or worker, the absolute path where the network volume is mounted in the filesystem.
  - `templateId` string — The unique string identifying the template used to create a Serverless endpoint.
  - `userId` string — A unique string identifying the Runpod user who created a Serverless endpoint.
  - `version` integer — The latest version of a Serverless endpoint, which is updated whenever the template or environment variables of the endpoint are changed.
  - `workers` Pod[] — Information about current workers on a Serverless endpoint.
    - `adjustedCostPerHr` number — The effective cost in Runpod credits per hour of running a Pod, adjusted by active Savings Plans.
    - `aiApiId` string — Synonym for endpointId (legacy name).
    - `consumerUserId` string — A unique string identifying the Runpod user who rents a Pod.
    - `containerDiskInGb` integer — The amount of disk space, in gigabytes (GB), to allocate on the container disk for a Pod. The data on the container disk is wiped when the Pod restarts. To persist data across Pod restarts, set volumeInGb to configure the Pod network volume.
    - `containerRegistryAuthId` string — If a Pod is created with a container registry auth, the unique string identifying that container registry auth.
    - `costPerHr` number — The cost in Runpod credits per hour of running a Pod. Note that the actual cost may be lower if Savings Plans are applied.
    - `cpuFlavorId` string — If the Pod is a CPU Pod, the unique string identifying the CPU flavor the Pod is running on.
    - `desiredStatus` 'RUNNING' | 'EXITED' | 'TERMINATED' — The current expected status of a Pod.
    - `dockerEntrypoint` string[] — If specified, overrides the ENTRYPOINT for the Docker image run on the created Pod. If [], uses the ENTRYPOINT defined in the image.
    - `dockerStartCmd` string[] — If specified, overrides the start CMD for the Docker image run on the created Pod. If [], uses the start CMD defined in the image.
    - `endpointId` string — If the Pod is a Serverless worker, a unique string identifying the associated endpoint.
    - `env` object
    - `gpu` object
      - `id` string
      - `count` integer — The number of GPUs attached to a Pod.
      - `displayName` string
      - `securePrice` number
      - `communityPrice` number
      - `oneMonthPrice` number
      - `threeMonthPrice` number
      - `sixMonthPrice` number
      - `oneWeekPrice` number
      - `communitySpotPrice` number
      - `secureSpotPrice` number
    - `id` string — A unique string identifying a [Pod](#/components/schema/Pod).
    - `image` string — The image tag for the container run on a Pod.
    - `interruptible` boolean — Describes how a Pod is rented. An interruptible Pod can be rented at a lower cost but can be stopped at any time to free up resources for another Pod. A reserved Pod is rented at a higher cost but runs until it exits or is manually stopped.
    - `lastStartedAt` string — The UTC timestamp when a Pod was last started.
    - `lastStatusChange` string — A string describing the last lifecycle event on a Pod.
    - `locked` boolean — Set to true to lock a Pod. Locking a Pod disables stopping or resetting the Pod.
    - `machine` object — Information about the machine a Pod is running on (see [Machine](#/components/schemas/Machine)).
      - `minPodGpuCount` integer
      - `gpuTypeId` string
      - `gpuType` object
        - `id` string
        - `count` integer — The number of GPUs attached to a Pod.
        - `displayName` string
        - `securePrice` number
        - `communityPrice` number
        - `oneMonthPrice` number
        - `threeMonthPrice` number
        - `sixMonthPrice` number
        - `oneWeekPrice` number
        - `communitySpotPrice` number
        - `secureSpotPrice` number
      - `cpuCount` integer
      - `cpuTypeId` string
      - `cpuType` object
        - `id` string
        - `displayName` string
        - `cores` number
        - `threadsPerCore` number
        - `groupId` string
      - `location` string
      - `dataCenterId` string
      - `diskThroughputMBps` integer
      - `maxDownloadSpeedMbps` integer
      - `maxUploadSpeedMbps` integer
      - `supportPublicIp` boolean
      - `secureCloud` boolean
      - `maintenanceStart` string
      - `maintenanceEnd` string
      - `maintenanceNote` string
      - `note` string
      - `costPerHr` number
      - `currentPricePerGpu` number
      - `gpuAvailable` integer
      - `gpuDisplayName` string
    - `machineId` string — A unique string identifying the host machine a Pod is running on.
    - `memoryInGb` number — The amount of RAM, in gigabytes (GB), attached to a Pod.
    - `name` string — A user-defined name for the created Pod. The name does not need to be unique.
    - `networkVolume` object — If a network volume is attached to a Pod, information about the network volume (see [network volume schema](#/components/schemas/NetworkVolume)).
      - `id` string — A unique string identifying a network volume.
      - `name` string — A user-defined name for a network volume. The name does not need to be unique.
      - `size` integer — The amount of disk space, in gigabytes (GB), allocated to a network volume.
      - `dataCenterId` string — The Runpod data center ID where a network volume is located.
    - `portMappings` object, nullable — A mapping of internal ports to public ports on a Pod. For example, { "22": 10341 } means that port 22 on the Pod is mapped to port 10341 and is publicly accessible at [public ip]:10341. If the Pod is still initializing, this mapping is not yet determined and will be empty.
    - `ports` string[] — A list of ports exposed on a Pod. Each port is formatted as [port number]/[protocol]. Protocol can be either http or tcp.
    - `publicIp` string, ipv4, nullable — The public IP address of a Pod. If the Pod is still initializing, this IP is not yet determined and will be empty.
    - `savingsPlans` SavingsPlan[] — The list of active Savings Plans applied to a Pod (see [Savings Plans](#/components/schemas/SavingsPlan)). If none are applied, the list is empty.
      - `costPerHr` number
      - `endTime` string
      - `gpuTypeId` string
      - `id` string
      - `podId` string
      - `startTime` string
    - `slsVersion` integer — If the Pod is a Serverless worker, the version of the associated endpoint (see [Endpoint Version](#/components/schemas/Endpoint/version)).
    - `templateId` string — If a Pod is created with a template, the unique string identifying that template.
    - `vcpuCount` number — The number of virtual CPUs attached to a Pod.
    - `volumeEncrypted` boolean — Set to true if the local network volume of a Pod is encrypted. Can only be set when creating a Pod.
    - `volumeInGb` integer — The amount of disk space, in gigabytes (GB), to allocate on the Pod volume for a Pod. The data on the Pod volume is persisted across Pod restarts. To persist data so that future Pods can access it, create a network volume and set networkVolumeId to attach it to the Pod.
    - `volumeMountPath` string — If either a Pod volume or a network volume is attached to a Pod, the absolute path where the network volume is mounted in the filesystem.
  - `workersMax` integer — The maximum number of workers that can be running at the same time on a Serverless endpoint.
  - `workersMin` integer — The minimum number of workers that will run at the same time on a Serverless endpoint. This number of workers will always stay running for the endpoint, and will be charged even if no requests are being processed, but they are charged at a lower rate than running autoscaling workers.

## Other responses

- `400` — Invalid input.

---

[API](https://skmtc.dev/runpod/apis/runpod-rest-api.md) · [All operations](https://skmtc.dev/runpod/apis/runpod-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/runpod/runpod-rest-api/revisions/504cd0394ed6/schema)
