> ## Documentation Index
> Fetch the complete documentation index at: https://runpod-b18f5ded-seo-aeo-docs-config.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a serverless endpoint

> Returns a single serverless endpoint by ID.



## OpenAPI

````yaml get /v2/serverless/{id}
openapi: 3.1.0
info:
  title: Runpod REST API
  version: 2.0.0
  description: Runpod public REST API — v2
servers:
  - url: https://api.runpod.io
    description: Runpod API v2 production server
security:
  - bearerAuth: []
tags:
  - name: Account
    description: Account-scoped settings and primitives (SSH public keys).
  - name: Pods
    description: GPU and CPU pod lifecycle, configuration, actions, and log streaming.
  - name: Serverless
    description: >-
      Serverless endpoint lifecycle, worker visibility, releases, and worker log
      streaming.
  - name: Templates
    description: Reusable pod and endpoint configuration templates.
  - name: Network Volumes
    description: Persistent network storage volumes for workloads.
  - name: Registries
    description: Container registry credentials used to pull private images.
  - name: Catalog
    description: Available GPU, CPU, data center, and public template catalog metadata.
  - name: Billing
    description: Billing history and usage cost records across resource types.
paths:
  /v2/serverless/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: Serverless endpoint identifier
        example: ep_abc123
    get:
      tags:
        - Serverless
      summary: Get a serverless endpoint
      description: Returns a single serverless endpoint by ID.
      operationId: getEndpoint
      responses:
        '200':
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Endpoint'
              examples:
                endpoint:
                  summary: Successful response
                  value:
                    id: 4m7x2k9q
                    name: image-generator
                    type: LOAD_BALANCER
                    requestUrls:
                      base: https://4m7x2k9q.api.runpod.ai
                      health: https://4m7x2k9q.api.runpod.ai/ping
                    image: runpod/pytorch:2.8.0-py3.11-cuda12.8.1
                    args: ''
                    disk: 20
                    ports:
                      - 8000/http
                    env:
                      MODEL_NAME: sdxl
                    registry: null
                    gpu:
                      pools:
                        - ADA_24
                      count: 1
                    workers:
                      min: 0
                      max: 5
                      idleTimeout: 5
                    scaling:
                      type: REQUEST_COUNT
                      requestCount: 4
                    dataCenterIds:
                      - US-KS-2
                    networkVolumes:
                      - 2q9m7x4c
                    timeout: 300000
                    flashboot: 'OFF'
                    allowedCudaVersions: []
                    createdAt: '2026-06-01T12:00:00Z'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '429':
          $ref: '#/components/responses/TooManyRequestsError'
        default:
          headers:
            RateLimit:
              $ref: '#/components/headers/RateLimit'
            RateLimit-Policy:
              $ref: '#/components/headers/RateLimit-Policy'
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  headers:
    RateLimit:
      schema:
        $ref: '#/components/schemas/RateLimitHeader'
    RateLimit-Policy:
      schema:
        $ref: '#/components/schemas/RateLimitPolicyHeader'
  schemas:
    Endpoint:
      allOf:
        - $ref: '#/components/schemas/ContainerConfig'
        - type: object
          required:
            - id
            - name
            - workers
            - scaling
            - dataCenterIds
            - networkVolumes
            - timeout
            - flashboot
            - allowedCudaVersions
            - createdAt
          properties:
            id:
              type: string
              examples:
                - ep_abc123
            name:
              type: string
              examples:
                - my-inference
            type:
              $ref: '#/components/schemas/EndpointType'
            requestUrls:
              $ref: '#/components/schemas/EndpointRequestUrls'
            gpu:
              anyOf:
                - $ref: '#/components/schemas/EndpointGpuConfig'
                - type: 'null'
            cpu:
              description: >-
                Read-only. Present for CPU serverless endpoints; CPU
                create/update is not yet supported.
              anyOf:
                - $ref: '#/components/schemas/CpuConfig'
                - type: 'null'
            workers:
              allOf:
                - $ref: '#/components/schemas/EndpointWorkers'
              required:
                - min
                - max
            scaling:
              $ref: '#/components/schemas/EndpointScaling'
            dataCenterIds:
              type: array
              items:
                type: string
              examples:
                - - US-TX-3
            networkVolumes:
              type: array
              items:
                type: string
              examples:
                - - vol_abc
            timeout:
              type: integer
              description: Per-request execution timeout in milliseconds
              examples:
                - 300000
            flashboot:
              $ref: '#/components/schemas/FlashBoot'
            allowedCudaVersions:
              type: array
              items:
                type: string
              description: >-
                Acceptable CUDA versions for worker placement, as `major.minor`.
                Empty means any version.
              examples:
                - []
            createdAt:
              type: string
              format: date-time
              examples:
                - '2026-03-13T20:00:00Z'
    ErrorResponse:
      type: object
      required:
        - title
        - status
        - detail
      properties:
        title:
          type: string
          description: Short human-readable summary
          examples:
            - Not Found
        status:
          type: integer
          description: HTTP status code
          examples:
            - 404
        detail:
          type: string
          description: Human-readable explanation
          examples:
            - pod not found
        errors:
          type: array
          description: Individual request-validation failures.
          items:
            type: string
          examples:
            - - '$: additional properties ''bogus'' not allowed'
    RateLimitHeader:
      type: string
      description: |
        Live per-window quota state. Optional — omitted for rate-limit-exempt
        callers.

        A structured-field list with one member per window (`minute`, `hour`,
        `day`), each carrying the remaining request count `r` and seconds until
        the window resets `t`. Returned on responses to authenticated requests,
        not only on 429s.
      examples:
        - '"minute";r=0;t=12, "hour";r=2800;t=1812, "day";r=49500;t=45012'
    RateLimitPolicyHeader:
      type: string
      description: >
        Static per-window quota policy. Optional — omitted for rate-limit-exempt

        callers.


        A structured-field list with one member per window (`minute`, `hour`,

        `day`), each carrying the quota `q` and the window length in seconds
        `w`.

        Returned on responses to authenticated requests, not only on 429s.
      examples:
        - '"minute";q=60;w=60, "hour";q=3000;w=3600, "day";q=50000;w=86400'
    ContainerConfig:
      description: >
        Reusable container configuration shared across templates, pods, and
        serverless endpoints. Adding a field here automatically propagates to
        all three resources.
      allOf:
        - $ref: '#/components/schemas/BaseContainerConfig'
        - type: object
          properties:
            registry:
              type:
                - string
                - 'null'
              description: Container registry credential ID (for private images)
              examples:
                - null
    EndpointType:
      type: string
      description: >
        Request-routing semantics for a modern serverless endpoint.

        - `QUEUE` — submit asynchronous or synchronous jobs through the managed
        queue.

        - `LOAD_BALANCER` — send requests directly to worker-defined HTTP paths.
          Configure via `env`: `PORT` (server port, default 80), `PORT_HEALTH`
          (health-check port, default 80), and `HEALTH_CHECK_PATH` (path the
          load balancer polls for worker health, default `/ping`).
      x-enum-varnames:
        - EndpointTypeQueue
        - EndpointTypeLoadBalancer
      enum:
        - QUEUE
        - LOAD_BALANCER
    EndpointRequestUrls:
      description: |
        Request URLs appropriate to the endpoint's top-level `type`.
        Queue-based endpoints provide job submission and management URLs;
        load-balancing endpoints provide `base` and `health` because their
        remaining paths are worker-defined.
      oneOf:
        - $ref: '#/components/schemas/QueueBasedRequestUrls'
        - $ref: '#/components/schemas/LoadBalancingRequestUrls'
    EndpointGpuConfig:
      type: object
      required:
        - pools
      properties:
        pools:
          type: array
          minItems: 1
          description: |
            Serverless GPU pool IDs (as returned by `GET /v2/catalog/gpus` in
            `pool`). Workers are placed on whichever listed pool has capacity.
          items:
            type: string
          examples:
            - - ADA_24
        count:
          type: integer
          minimum: 1
          default: 1
          description: GPUs per worker
          examples:
            - 1
    CpuConfig:
      allOf:
        - $ref: '#/components/schemas/BaseCpuConfig'
        - type: object
          required:
            - memory
          properties:
            memory:
              type: integer
              minimum: 1
              description: Memory allocated to the pod in GB.
              examples:
                - 16
    EndpointWorkers:
      type: object
      additionalProperties: false
      properties:
        min:
          type: integer
          minimum: 0
          description: Minimum number of workers.
          examples:
            - 0
        max:
          type: integer
          minimum: 0
          description: Maximum number of workers.
          examples:
            - 5
        idleTimeout:
          type: integer
          minimum: 1
          maximum: 3600
          description: >
            Seconds before idle workers scale down. Not applicable to
            queue-based

            endpoints scaling on `requestCount` — rejected on create/update and

            omitted from responses for that combination.
          examples:
            - 5
    EndpointScaling:
      description: |
        Autoscaling signal — a discriminated union on `type`: `QUEUE_DELAY`
        (queue-based endpoints only) or `REQUEST_COUNT`. The scaler is chosen
        independently of the endpoint's routing `type` and can be switched on
        update.
      oneOf:
        - $ref: '#/components/schemas/QueueDelayScaling'
        - $ref: '#/components/schemas/RequestCountScaling'
      discriminator:
        propertyName: type
        mapping:
          QUEUE_DELAY:
            $ref: '#/components/schemas/QueueDelayScaling'
          REQUEST_COUNT:
            $ref: '#/components/schemas/RequestCountScaling'
    FlashBoot:
      type: string
      description: |
        FlashBoot cold-start acceleration mode.
        - `OFF`                — disabled
        - `FLASHBOOT`          — enabled
        - `PRIORITY_FLASHBOOT` — enabled with priority capacity
      enum:
        - 'OFF'
        - FLASHBOOT
        - PRIORITY_FLASHBOOT
    BaseContainerConfig:
      type: object
      description: >
        Container configuration universal to every containerized resource.
        Compose ContainerConfig instead unless the resource cannot support
        private registries (clusters, until the upstream input accepts a
        registry credential).
      properties:
        image:
          type: string
          description: Docker image reference
          examples:
            - runpod/pytorch:2.8.0-py3.11-cuda12.8.1
        args:
          type: string
          description: Arguments passed to the container entrypoint
          examples:
            - ''
        disk:
          type: integer
          minimum: 1
          description: Container disk in GB (ephemeral, wiped on restart)
          examples:
            - 50
        ports:
          type: array
          description: Exposed ports, formatted as port/protocol
          items:
            type: string
          examples:
            - - 8888/http
              - 22/tcp
        env:
          type: object
          additionalProperties:
            type: string
          description: Environment variables as key-value pairs
          examples:
            - JUPYTER_PASSWORD: hunter2
    QueueBasedRequestUrls:
      type: object
      additionalProperties: false
      required:
        - run
        - runSync
        - status
        - stream
        - cancel
        - retry
        - purgeQueue
        - health
      properties:
        run:
          type: string
          format: uri
          description: URL for asynchronously submitting a queued job.
          examples:
            - https://api.runpod.ai/v2/4m7x2k9q/run
        runSync:
          type: string
          format: uri
          description: >-
            URL for synchronously submitting a queued job. Accepts an optional
            `?wait=x` query parameter to control how long the request waits for
            job completion, defaulting to 90 seconds.
          examples:
            - https://api.runpod.ai/v2/4m7x2k9q/runsync
        status:
          type: string
          format: uri
          description: >-
            Check the current state, execution statistics, and results of a
            previously submitted job.
          examples:
            - https://api.runpod.ai/v2/4m7x2k9q/status/{job_id}
        stream:
          type: string
          format: uri
          description: >-
            Receive incremental results as they become available from a job that
            generates output progressively.
          examples:
            - https://api.runpod.ai/v2/4m7x2k9q/stream/{job_id}
        cancel:
          type: string
          format: uri
          description: Stop an in-progress job or remove a queued job before it starts.
          examples:
            - https://api.runpod.ai/v2/4m7x2k9q/cancel/{job_id}
        retry:
          type: string
          format: uri
          description: Requeue a failed or timed-out job without submitting a new request.
          examples:
            - https://api.runpod.ai/v2/4m7x2k9q/retry/{job_id}
        purgeQueue:
          type: string
          format: uri
          description: >-
            Remove all pending jobs from the queue. Does not affect in-progress
            jobs.
          examples:
            - https://api.runpod.ai/v2/4m7x2k9q/purge-queue
        health:
          type: string
          format: uri
          description: Overview of an endpoint's operational status.
          examples:
            - https://api.runpod.ai/v2/4m7x2k9q/health
    LoadBalancingRequestUrls:
      type: object
      additionalProperties: false
      required:
        - base
        - health
      properties:
        base:
          type: string
          format: uri
          description: Base URL for worker-defined HTTP and WebSocket paths.
          examples:
            - https://4m7x2k9q.api.runpod.ai
        health:
          type: string
          format: uri
          description: >-
            Health check endpoint the load balancer will periodically ping to
            decide if the worker is healthy enough to receive traffic.
            Configurable by setting the `HEALTH_CHECK_PATH` environment
            variable. Defaults to `/ping` if the variable is not set.
          examples:
            - https://4m7x2k9q.api.runpod.ai/ping
    BaseCpuConfig:
      type: object
      required:
        - id
        - vcpuCount
      properties:
        id:
          type: string
          description: CPU flavor identifier, as returned by GET /v2/catalog/cpus.
          examples:
            - cpu5c
          minLength: 1
        vcpuCount:
          type: integer
          minimum: 2
          description: >-
            Number of vCPUs. Must be valid for the selected CPU flavor and must
            be a power of two.
          examples:
            - 4
    QueueDelayScaling:
      type: object
      additionalProperties: false
      description: Scale on queue wait time. Queue-based endpoints only.
      required:
        - type
        - queueDelay
      properties:
        type:
          type: string
          description: Scaler discriminator. Always `QUEUE_DELAY` for this variant.
          enum:
            - QUEUE_DELAY
        queueDelay:
          type: number
          format: float
          minimum: 0.5
          description: >-
            Adjusts the number of workers based on how long requests wait in the
            queue.
          examples:
            - 4
    RequestCountScaling:
      type: object
      additionalProperties: false
      description: |
        Scale on concurrent in-flight requests per worker. Required for
        load-balancing endpoints; also selectable for queue-based.
      required:
        - type
        - requestCount
      properties:
        type:
          type: string
          description: Scaler discriminator. Always `REQUEST_COUNT` for this variant.
          enum:
            - REQUEST_COUNT
        requestCount:
          type: integer
          minimum: 1
          description: Adjusts the number of workers based on active in-flight requests.
          examples:
            - 4
  responses:
    UnauthorizedError:
      description: >-
        Authentication failed because the bearer token is missing, malformed,
        expired, or invalid.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingBearerToken:
              summary: Missing bearer token
              value:
                title: Unauthorized
                status: 401
                detail: missing bearer token
    ForbiddenError:
      headers:
        RateLimit:
          $ref: '#/components/headers/RateLimit'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
      description: >-
        The bearer token is valid, but it does not grant access to the requested
        resource or action.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            insufficientAccess:
              summary: Insufficient access
              value:
                title: Forbidden
                status: 403
                detail: access denied
    NotFoundError:
      headers:
        RateLimit:
          $ref: '#/components/headers/RateLimit'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
      description: The requested resource was not found or is not accessible to the caller.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            notFound:
              summary: Resource not found
              value:
                title: Not Found
                status: 404
                detail: resource not found
    TooManyRequestsError:
      description: >
        The caller exceeded its per-user rate limit. The response identifies the
        window that was exceeded and how long to wait. The `RateLimit` and
        `RateLimit-Policy` headers (per the IETF ratelimit-headers draft) also
        accompany successful responses, so clients can track quota before a 429.
      headers:
        Retry-After:
          description: Seconds to wait before retrying, per the exceeded window.
          schema:
            type: integer
          example: 12
        RateLimit:
          $ref: '#/components/headers/RateLimit'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rateLimited:
              summary: Rate limit exceeded
              value:
                title: Too Many Requests
                status: 429
                detail: rate limit exceeded for the minute window
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Runpod API Key
      description: >
        Runpod API key authentication. Generate an API key in the Runpod console
        and send it in the `Authorization` header as `Bearer <api_key>`. Keys
        are scoped to the permissions granted when created; requests may return
        `403` when a valid key lacks access to the requested resource or action.

````