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

# Update a serverless endpoint

> Partially updates a serverless endpoint. This is a PATCH: only the
fields present in the body are changed; omitted fields are left
untouched. See `UpdateEndpointRequest` for the full body.

Mutable fields: `name`, `gpu`, `cpu`, `workers` (`min`/`max`),
`scaling` (`type`/`value`/`idleTimeout`), `dataCenterIds`,
`networkVolumes`, `timeout`, `flashboot`, and the container settings
(`image`, `args`, `disk`, `ports`, `env`, `registry`).

Omitted compute preserves the current selection. `cpu` completely
replaces a CPU endpoint's selection; compute family is immutable.
`gpu` on CPU, `cpu` on GPU, or both fields returns 400.

Returns `200` with the full updated endpoint. Effect timing differs
by field: scaling and worker-bound settings (`workers`, `scaling`,
`timeout`) are applied to the autoscaler promptly, while
container-affecting changes (e.g. `image`, `env`) create a new
endpoint release that rolls out as workers cycle — in-flight workers
keep the previous version until they are replaced. Track rollout via
`listEndpointReleases`.




## OpenAPI

````yaml patch /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
    patch:
      tags:
        - Serverless
      summary: Update a serverless endpoint
      description: |
        Partially updates a serverless endpoint. This is a PATCH: only the
        fields present in the body are changed; omitted fields are left
        untouched. See `UpdateEndpointRequest` for the full body.

        Mutable fields: `name`, `gpu`, `cpu`, `workers` (`min`/`max`),
        `scaling` (`type`/`value`/`idleTimeout`), `dataCenterIds`,
        `networkVolumes`, `timeout`, `flashboot`, and the container settings
        (`image`, `args`, `disk`, `ports`, `env`, `registry`).

        Omitted compute preserves the current selection. `cpu` completely
        replaces a CPU endpoint's selection; compute family is immutable.
        `gpu` on CPU, `cpu` on GPU, or both fields returns 400.

        Returns `200` with the full updated endpoint. Effect timing differs
        by field: scaling and worker-bound settings (`workers`, `scaling`,
        `timeout`) are applied to the autoscaler promptly, while
        container-affecting changes (e.g. `image`, `env`) create a new
        endpoint release that rolls out as workers cycle — in-flight workers
        keep the previous version until they are replaced. Track rollout via
        `listEndpointReleases`.
      operationId: updateEndpoint
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateEndpointRequest'
            examples:
              scaleEndpoint:
                summary: Scale endpoint
                value:
                  workers:
                    min: 1
                    max: 10
                    idleTimeout: 10
                  scaling:
                    type: QUEUE_DELAY
                    queueDelay: 8
      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: QUEUE
                    requestUrls:
                      run: https://api.runpod.ai/v2/4m7x2k9q/run
                      runSync: https://api.runpod.ai/v2/4m7x2k9q/runsync
                      status: https://api.runpod.ai/v2/4m7x2k9q/status/{job_id}
                      stream: https://api.runpod.ai/v2/4m7x2k9q/stream/{job_id}
                      cancel: https://api.runpod.ai/v2/4m7x2k9q/cancel/{job_id}
                      retry: https://api.runpod.ai/v2/4m7x2k9q/retry/{job_id}
                      purgeQueue: https://api.runpod.ai/v2/4m7x2k9q/purge-queue
                      health: https://api.runpod.ai/v2/4m7x2k9q/health
                    image: runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
                    args: ''
                    disk: 20
                    ports:
                      - 8000/http
                    env:
                      MODEL_NAME: sdxl
                    registry: null
                    gpu:
                      pools:
                        - ADA_24
                      count: 1
                      allowedCudaVersions: []
                      minCudaVersion: null
                    workers:
                      min: 1
                      max: 10
                      idleTimeout: 10
                    scaling:
                      type: QUEUE_DELAY
                      queueDelay: 8
                    dataCenterIds:
                      - US-KS-2
                    networkVolumes:
                      - 2q9m7x4c
                    timeout: 300000
                    flashboot: 'OFF'
                    createdAt: '2026-06-01T12:00:00Z'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/UnprocessableEntityError'
        '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:
  schemas:
    UpdateEndpointRequest:
      allOf:
        - $ref: '#/components/schemas/ContainerConfig'
        - type: object
          description: Only provided fields are changed.
          properties:
            cpu:
              type: array
              minItems: 1
              uniqueItems: true
              description: >
                Complete replacement CPU selection. Valid only for an existing
                CPU

                endpoint; endpoint compute family cannot be changed.
              items:
                $ref: '#/components/schemas/CreateCpuConfig'
            dataCenterIds:
              type: array
              items:
                type: string
              description: >-
                Preferred data centers for placement. Omit or pass an empty
                array to let the scheduler choose.
            flashboot:
              $ref: '#/components/schemas/FlashBoot'
            gpu:
              $ref: '#/components/schemas/UpdateEndpointGpuConfig'
            name:
              type: string
              minLength: 1
            networkVolumes:
              type: array
              items:
                type: string
            scaling:
              $ref: '#/components/schemas/EndpointScaling'
            templateId:
              type: string
              description: |
                ID of a serverless template whose container settings are
                applied as if they were provided in this PATCH body (image,
                args, disk, ports, env, registry). Explicit body fields
                override the template's; `env` merges template and body per
                key (body wins) and, per PATCH semantics, replaces the
                endpoint's env. One-time application — no link to the
                template is retained. Must be one of your templates or a
                public template (unknown or inaccessible ID → 404); must be
                a serverless template (→ 422).
              examples:
                - 30zmvf89kd
            timeout:
              type: integer
            workers:
              $ref: '#/components/schemas/EndpointWorkers'
      unevaluatedProperties: false
    Endpoint:
      allOf:
        - $ref: '#/components/schemas/ContainerConfig'
        - type: object
          required:
            - id
            - name
            - workers
            - scaling
            - dataCenterIds
            - networkVolumes
            - timeout
            - flashboot
            - 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:
              type: array
              minItems: 1
              description: |
                Eligible CPU configurations for each worker, in the order they
                were submitted. Present for CPU endpoints and omitted for GPU
                endpoints. Memory is derived from the selected flavor's catalog
                RAM multiplier.
              items:
                $ref: '#/components/schemas/CpuConfig'
            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'
            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'
    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
    CreateCpuConfig:
      allOf:
        - $ref: '#/components/schemas/BaseCpuConfig'
      unevaluatedProperties: false
    FlashBoot:
      type: string
      description: |
        FlashBoot cold-start acceleration mode.
        - `OFF`                — disabled
        - `FLASHBOOT`          — enabled
        - `PRIORITY_FLASHBOOT` — enabled with priority capacity
      enum:
        - 'OFF'
        - FLASHBOOT
        - PRIORITY_FLASHBOOT
    UpdateEndpointGpuConfig:
      description: |
        Partial GPU update — every field is optional and an omitted one is left
        unchanged. Unlike create, `pools` is optional, so changing only a CUDA
        constraint does not require resending the pool list.

        `excludedTypes` requires `pools`, because the two are one selection and
        only a supplied `pools` replaces it — an exclusion on its own would
        otherwise be silently dropped.
      allOf:
        - $ref: '#/components/schemas/BaseEndpointGpuConfig'
        - type: object
          dependentRequired:
            excludedTypes:
              - pools
          properties:
            allowedCudaVersions:
              type: array
              items:
                type: string
                pattern: ^\d+\.\d+$
              description: |
                Acceptable CUDA versions for worker placement, as
                `major.minor`. An explicit `[]` clears the constraint;
                omitting the field leaves it unchanged. Takes effect as
                workers are replaced.

                A non-empty set is mutually exclusive with minCudaVersion (400
                if both are sent). An explicit `[]` states no constraint, so it
                may accompany a floor.
                Setting one does not clear the other — clear it explicitly in
                the same patch if the endpoint already carries it.
            minCudaVersion:
              type: string
              pattern: ^$|^\d+\.\d+$
              description: |
                Lowest acceptable CUDA version for worker placement, as
                `major.minor`. An explicit `""` clears the floor; omitting the
                field leaves it unchanged. Takes effect as workers are
                replaced.

                Mutually exclusive with a non-empty allowedCudaVersions (400 if
                both are sent); an explicit `[]` there states no constraint and
                may accompany this floor.
              examples:
                - '12.1'
      unevaluatedProperties: false
    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'
    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
    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'
    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:
      allOf:
        - $ref: '#/components/schemas/BaseEndpointGpuConfig'
        - type: object
          required:
            - pools
            - allowedCudaVersions
            - minCudaVersion
          properties:
            allowedCudaVersions:
              type: array
              items:
                type: string
              description: >-
                Acceptable CUDA versions for worker placement, as `major.minor`.
                Empty means any version.
              examples:
                - []
            minCudaVersion:
              type:
                - string
                - 'null'
              description: >-
                Lowest acceptable CUDA version for worker placement, as
                `major.minor`. Null means no floor.
              examples:
                - null
    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
    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:
        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
        env:
          type: object
          additionalProperties:
            type: string
          description: Environment variables as key-value pairs
          examples:
            - JUPYTER_PASSWORD: hunter2
        image:
          type: string
          description: Docker image reference
          examples:
            - runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
        ports:
          type: array
          description: Exposed ports, formatted as port/protocol
          items:
            type: string
          examples:
            - - 8888/http
              - 22/tcp
    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
    BaseEndpointGpuConfig:
      type: object
      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.
            Narrow a pool down to specific cards with `excludedTypes`.
          items:
            type: string
          examples:
            - - ADA_24
        excludedTypes:
          type: array
          uniqueItems: true
          description: >
            GPU **type** IDs to subtract from the selected pools — the `id`

            field of `GET /v2/catalog/gpus`, the same identifiers pods take in

            `gpu.id`. Workers run on every type in `pools` except these. Omit to

            use the whole pool.


            Pools stay the unit of selection; types are the unit of

            subtraction. There is no inclusive allowlist: a card later added to

            one of your pools becomes eligible, which is the honest reading of

            "this pool, minus these".


            Tied to `pools`, because the two together are one selection:

            supplying `pools` replaces that selection wholesale, so a `PATCH`

            sending `pools` **without `excludedTypes`** **clears** them —

            restate them to keep them. A `PATCH` that omits `pools` leaves both

            the pools and the exclusions untouched, so changing only a CUDA

            constraint cannot widen a pinned endpoint.


            Rejected with 400 if a value is not a GPU type in one of `pools`;

            upstream accepts unrecognized exclusions silently, so a typo would

            otherwise produce a filter that does nothing. Surrounding whitespace

            is trimmed, so `" NVIDIA L40"` and `"NVIDIA L40"` mean the same
            card.
          items:
            type: string
            pattern: ^\s*[^-\s]
          examples:
            - - NVIDIA L40
        count:
          type: integer
          minimum: 1
          default: 1
          description: GPUs per worker
          examples:
            - 1
    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
    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
  headers:
    RateLimit:
      schema:
        $ref: '#/components/schemas/RateLimitHeader'
    RateLimit-Policy:
      schema:
        $ref: '#/components/schemas/RateLimitPolicyHeader'
  responses:
    BadRequestError:
      headers:
        RateLimit:
          $ref: '#/components/headers/RateLimit'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
      description: >-
        The request could not be processed because it is malformed or conflicts
        with request rules.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            badRequest:
              summary: Bad request
              value:
                title: Bad Request
                status: 400
                detail: request could not be processed
    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
    UnprocessableEntityError:
      headers:
        RateLimit:
          $ref: '#/components/headers/RateLimit'
        RateLimit-Policy:
          $ref: '#/components/headers/RateLimit-Policy'
      description: >-
        The request body or parameters were syntactically valid but failed
        validation.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            validationFailed:
              summary: Validation failed
              value:
                title: Unprocessable Entity
                status: 422
                detail: Request validation failed.
    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.

````