Skip to main content
This page provides a complete reference for all parameters available on the Endpoint class.

Parameter overview

Parameter details

name

Type: str Required: Yes (unless id= is specified) The endpoint name visible in the Runpod console. Use descriptive names to easily identify endpoints.
Use naming conventions like image-generation-prod or batch-processor-dev to organize your endpoints.

id

Type: str Default: None Connect to an existing deployed endpoint by its ID. When id is specified, name is not required.

gpu

Type: GpuGroup, GpuType, or list[GpuGroup | GpuType] Default: GpuGroup.ANY (if neither gpu nor cpu is specified) Specifies GPU hardware for the endpoint. Accepts a single GPU type/group or a list for fallback strategies.
See GPU types for all available options.

cpu

Type: str or CpuInstanceType Default: None Specifies a CPU instance type. Mutually exclusive with gpu.
See CPU types for all available options.

workers

Type: int or tuple[int, int] Default: (0, 1) Controls worker scaling. Accepts either a single integer (max workers with min=0) or a tuple of (min, max).
Recommendations:
  • workers=N or workers=(0, N): Cost-optimized, allows scale to zero
  • workers=(1, N): Avoid cold starts by keeping at least one worker warm
  • workers=(N, N): Fixed worker count for consistent performance

idle_timeout

Type: int Default: 60 Valid range: 1-3600 seconds Number of seconds workers will stay active (running) after completing a request, waiting for additional requests before scaling down (to minimum workers).
Recommendations:
  • 30-60 seconds: Cost-optimized, infrequent traffic
  • 60-120 seconds: Balanced, variable traffic patterns
  • 120-300 seconds: Latency-optimized, consistent traffic

dependencies

Type: list[str] Default: None Python packages to install on the remote worker before executing your function. Supports standard pip syntax.
Packages must be imported inside the function body, not at the top of your file.

system_dependencies

Type: list[str] Default: None System-level packages to install via apt before your function runs.

accelerate_downloads

Type: bool Default: True Enables faster downloads for dependencies, models, and large files. Disable if you encounter compatibility issues.

volume

Type: NetworkVolume or list[NetworkVolume] Default: None Attaches network volume(s) for persistent storage. Volumes are mounted at /runpod-volume/. Flash uses the volume name to find an existing volume or create a new one. Each volume is tied to a specific datacenter.
For multi-datacenter deployments, pass a list of volumes (one per datacenter):
Only one network volume is allowed per datacenter. If you specify multiple volumes in the same datacenter, deployment will fail.
Use cases:
  • Share large models across workers
  • Persist data between runs
  • Share datasets across endpoints
See Storage for setup instructions.

datacenter

Type: DataCenter, list[DataCenter], str, list[str], or None Default: None (all available datacenters) Specifies the datacenter(s) for worker deployment. When set to None, the endpoint is available in all datacenters.
Available datacenters:
CPU endpoints are restricted to CPU_DATACENTERS, which currently only includes EU_RO_1.

env

Type: dict[str, str] Default: None Environment variables passed to all workers. Useful for API keys, configuration, and feature flags.
Values in your project’s .env file are only available locally for CLI commands and development. They are not passed to deployed endpoints. You must declare environment variables explicitly using the env parameter.
To pass a local environment variable to your deployed endpoint, read it from os.environ:
Environment variables are excluded from configuration hashing. Changing environment values won’t trigger endpoint recreation, making it easy to rotate API keys.

gpu_count

Type: int Default: 1 Number of GPUs per worker. Use for multi-GPU workloads.

execution_timeout_ms

Type: int Default: 0 (no limit) Maximum execution time for a single job in milliseconds. Jobs exceeding this timeout are terminated.
The Flash SDK’s runsync() method uses your execution_timeout_ms value as the client-side HTTP timeout. If set to a positive value, the SDK waits that duration for the job to complete. If unset or set to 0, the SDK defaults to a 60-second timeout. For long-running inference jobs, set execution_timeout_ms to prevent premature timeouts.

flashboot

Type: bool Default: True Enables Flashboot for faster cold starts by pre-loading container images.
Set to False for debugging or compatibility reasons.

image

Type: str Default: None Custom Docker image to deploy. When specified, the endpoint runs your Docker image instead of Flash’s managed workers.
See Custom Docker images for complete documentation.

scaler_type

Type: ServerlessScalerType Default: Auto-selected based on endpoint type Scaling algorithm strategy. Defaults are automatically set:
  • Queue-based: QUEUE_DELAY (scales based on queue depth)
  • Load-balanced: REQUEST_COUNT (scales based on active requests)

scaler_value

Type: int Default: 4 Parameter value for the scaling algorithm. With QUEUE_DELAY, represents target jobs per worker before scaling up.

template

Type: PodTemplate Default: None Advanced pod configuration overrides.

PodTemplate

PodTemplate provides advanced pod configuration options:
For simple environment variables, use the env parameter on Endpoint instead of PodTemplate.env.

min_cuda_version

Type: str or CudaVersion Default: "12.8" for GPU endpoints, None for CPU endpoints Specifies the minimum CUDA driver version required on the host machine. GPU endpoints default to "12.8" to ensure workers run on hosts with recent CUDA drivers.
This parameter has no effect on CPU endpoints.
Valid CUDA versions: CudaVersion.V11_1, V11_4, V11_7, V11_8, V12_0, V12_1, V12_2, V12_3, V12_4, V12_6, V12_8 (or equivalent strings like "12.4"). Invalid values raise a ValueError.

python_version

Type: str Default: Local Python version Sets the Python version for the worker image. Supported values: "3.10", "3.11", "3.12", and "3.13". When you don’t specify a Python version, Flash matches your local interpreter (the Python version you run Flash from). The resolution order is:
  1. --python-version CLI flag (highest priority)
  2. python_version declared on resource configs
  3. Your local Python version (sys.version_info)
All resources in a Flash app must use the same Python version because Flash ships a single tarball for the entire app. If resources declare conflicting versions, the build fails.
Breaking change: Flash now matches your local Python version by default instead of always defaulting to Python 3.12. If your local Python differs from 3.12, your first deploy after upgrading Flash will trigger a rolling release. For consistent behavior across team members, declare python_version explicitly or use the --python-version CLI flag.
Python 3.10, 3.11, and 3.13 workers incur approximately 7 GB of additional cold-start overhead on GPU endpoints because the alternative Python interpreter must be installed alongside the base image’s PyTorch environment.
Python 3.10 reaches end-of-life on 2026-10-31. Consider migrating to Python 3.11 or later.
If your local Python version is not supported (for example, 3.9 or 3.14), the build fails with an actionable error message listing the supported versions. The --python-version CLI flag on flash build and flash deploy overrides both per-resource declarations and local interpreter detection.

EndpointJob

When using Endpoint(id=...) or Endpoint(image=...), the .run() method returns an EndpointJob object for async operations:

Configuration change behavior

When you change configuration and redeploy, Flash automatically updates your endpoint.

Changes that recreate workers

These changes restart all workers:
  • GPU configuration (gpu, gpu_count)
  • CPU instance type (cpu)
  • Docker image (image)
  • Storage (volume)
  • Datacenter (datacenter)
  • Flashboot setting (flashboot)
  • CUDA version requirement (min_cuda_version)
  • Python version (python_version)
Workers are temporarily unavailable during recreation (typically 30-90 seconds).

Changes that update settings only

These changes apply immediately with no downtime:
  • Worker scaling (workers)
  • Timeouts (idle_timeout, execution_timeout_ms)
  • Scaler settings (scaler_type, scaler_value)
  • Environment variables (env)
  • Endpoint name (name)