Overview
How it works
An endpoint is a queue plus a fleet of workers. Each worker is a container started from your image on a GPU from the pools you choose. Inside the container, the apipods Python SDK connects to the queue, hands each job to your handler(job) function and reports the result.
- You send a job
POST https://run.apipods.com/v1/ep_4n8wq2zt/runwith a JSONinput. The API answers immediately with a job ID and statusIN_QUEUE. - The autoscaler adds workers
If no worker is free, a new one starts on the first available GPU in your priority list. With Warmstart it restores from a snapshot of an initialized worker, typically in under 2 seconds.
- A worker runs your handler
The job moves to
IN_PROGRESS. Whatever your handler returns becomes the joboutput; exceptions become aFAILEDjob with anerror. - You collect the result
Poll
/status/{jobId}, read partial results from/stream/{jobId}, or receive the finished job on a webhook. Idle workers shut down after the idle timeout.
Flex and Active workers
| Flex workers | Active workers | |
|---|---|---|
| Setting | minWorkers: 0 | minWorkers above 0 |
| Scales to zero | Yes | No, the minimum is always running |
| Cold starts | On scale-up (reduced by Warmstart) | None for traffic the always-on workers can absorb |
| Billing | Per second, from worker start until the idle timeout ends | Committed capacity at a discounted rate |
| How to get it | Every plan | Enterprise plan (sales@apipods.com) |
Most endpoints run on Flex workers only. Add Active workers when you have steady baseline traffic and cannot accept a cold start on the first request. Active workers are part of the Enterprise plan; on other plans, setting minWorkers above 0 returns 403 active_workers_not_enabled. Flex workers above the minimum still scale up to maxWorkers during bursts.
GPU pools and pricing
Serverless workers run in the same Tier III/IV data centers as pods and are billed per second by GPU pool. There is one pool per GPU type, named after its CLI alias; you list pools in priority order in gpuPoolIds.
| Pool ID | GPU | VRAM | Per second | Per hour |
|---|---|---|---|---|
B300 | B300 | 288 GB | $0.00666 | $23.98 |
B200 | B200 | 180 GB | $0.00599 | $21.58 |
H200 | H200 SXM | 141 GB | $0.00388 | $13.98 |
H100_SXM | H100 SXM | 80 GB | $0.00327 | $11.78 |
RTX_PRO_6000 | RTX PRO 6000 | 96 GB | $0.00205 | $7.38 |
A100_80GB | A100 80GB | 80 GB | $0.00166 | $5.98 |
L40S | L40S | 48 GB | $0.00105 | $3.78 |
L4 | L4 | 24 GB | $0.00042 | $1.50 |
Example: a job that runs for 2 seconds on L40S costs about $0.00210 of GPU time. The cheapest pool starts at $1.50/hr. Worker time includes initialization and the idle timeout, so short idle timeouts keep costs close to pure execution time. See Pricing for storage rates.
Serverless or pods?
| Use serverless when | Use a pod when |
|---|---|
| Traffic is bursty or unpredictable | You need a GPU for hours at a time (training, fine-tuning) |
| Each request is a self-contained job (inference, transcription, rendering) | You want an interactive machine with SSH or Jupyter |
| You want to scale to zero overnight | Processes keep long-lived state in memory between requests |
| You want a queue, retries and webhooks without running them yourself | You need multi-day runs beyond the 24-hour execution limit |