What are Serverless endpoints?
Runpod Serverless endpoints are RESTful APIs that accept HTTP requests, execute your code, and return the result via HTTP response. Each endpoint provides a unique URL and abstracts away the complexity of managing individual GPUs/CPUs. Behind the scenes, Runpod handles the entire lifecycle of Serverless workers, including job queuing, execution, and result delivery, so you can focus on your code, rather than the underlying infrastructure.Key concepts
Understanding these fundamental concepts will help you work effectively with Serverless endpoints: An endpoint is a RESTful API, which provides a URL that serves as the entry point for your Serverless worker, allowing you to send requests and receive responses. A request is an HTTP request that you send to an endpoint, which can include parameters, payloads, and headers that define what the endpoint should process. For example, aPOST request to run a job, or a GET request to check status of a job or endpoint health.
When a request is sent to an endpoint, it creates a job that gets processed by a worker. Jobs can be either synchronous (immediate response) or asynchronous (background processing).
A worker is the containerized environment that executes your handler code, providing the compute resources (CPU, GPU, memory) needed to process requests.
The handler function is the code that processes incoming requests and returns responses, defining the business logic of your endpoint.
Key features
Execution modes
Serverless offers asynchronous processing via the/run endpoint operation, which lets you submit jobs that run in the background and check results later, making this ideal for long-running tasks.
It also provides synchronous operations through the /runsync endpoint operation, allowing you to receive immediate results in the same request, which is perfect for interactive applications.
To learn more, see Operation overview.