Docs / API reference
Endpoints An endpoint is a queue plus an autoscaling pool of workers running your image. These control-plane endpoints configure it; to send jobs use the runtime API .
Pricing is per second per GPU pool, and running workers count toward your plan's concurrent-GPU limit; see Pricing .
Name Type Description idstring Unique ID, prefixed ep_. objectstring Always endpoint. namestring Display name, 1 to 64 characters. imagestring | null Worker image. Either image or templateId is set. templateIdstring | null Serverless template (type: SERVERLESS) the worker is built from. registryCredentialIdstring | null Credentials for a private registry. gpuPoolIdsstring[] GPU pools in priority order, e.g. ["L40S", "L4"]. See GPU types. gpuCountinteger GPUs per worker, 1 to 8. regionIdsstring[] Regions workers may run in. Empty means all regions. With a network volume, only the volume's region. minWorkersinteger Always-on Active workers. Default 0; above 0 requires the Enterprise plan (Active workers). maxWorkersinteger Upper bound on concurrent workers. Default 3. idleTimeoutInSecinteger Seconds an idle Flex worker stays up before scaling down. Default 5, max 3600. executionTimeoutInSecinteger Maximum run time of one job. Default 600, max 86400. scalerTypeenum QUEUE_DELAY (scale up when jobs wait longer than scalerValue seconds) or REQUEST_COUNT (target scalerValue jobs per worker).scalerValueinteger Threshold for the scaler. Default 4. warmstartboolean Restore workers from a cached snapshot for fast cold starts. Default true. containerDiskInGbinteger Container disk per worker. Default 20. networkVolumeIdstring | null Network volume mounted at /volume in every worker. envobject Environment variables. Reference secrets as {{ secrets.NAME }}. runUrlstring Base URL for the runtime API of this endpoint. createdAtstring ISO 8601 timestamp. updatedAtstring ISO 8601 timestamp.
endpoint object Copy
{
"id" : "ep_4n8wq2zt" ,
"object" : "endpoint" ,
"name" : "sdxl-turbo" ,
"image" : "ghcr.io/acme/sdxl-worker:1.4.0" ,
"templateId" : null ,
"registryCredentialId" : "rcr_6w2m9q4k" ,
"gpuPoolIds" : [
"L40S" ,
"L4"
],
"gpuCount" : 1 ,
"regionIds" : [
"eu-nl-1"
],
"minWorkers" : 0 ,
"maxWorkers" : 5 ,
"idleTimeoutInSec" : 5 ,
"executionTimeoutInSec" : 600 ,
"scalerType" : "QUEUE_DELAY" ,
"scalerValue" : 4 ,
"warmstart" : true ,
"containerDiskInGb" : 20 ,
"networkVolumeId" : "vol_c7d2h4ke" ,
"env" : {
"MODEL_ID" : "stabilityai/sdxl-turbo"
},
"runUrl" : "https://run.apipods.com/v1/ep_4n8wq2zt" ,
"createdAt" : "2026-11-12T16:40:11Z" ,
"updatedAt" : "2026-11-18T08:02:55Z"
}GET /endpoints
Returns endpoints in your organization, newest first. Supports pagination.
Parameters Name In Type Description limitquery integer 1 to 100, default 20. cursorquery string Cursor from a previous page.
Request curl https://api.apipods.com/v1/endpoints \
-H "Authorization: Bearer $APIPODS_API_KEY" Response 200 OK Copy
{
"object" : "list" ,
"data" : [
{
"id" : "ep_4n8wq2zt" ,
"object" : "endpoint" ,
"name" : "sdxl-turbo" ,
"image" : "ghcr.io/acme/sdxl-worker:1.4.0" ,
"templateId" : null ,
"registryCredentialId" : "rcr_6w2m9q4k" ,
"gpuPoolIds" : [
"L40S" ,
"L4"
],
"gpuCount" : 1 ,
"regionIds" : [
"eu-nl-1"
],
"minWorkers" : 0 ,
"maxWorkers" : 5 ,
"idleTimeoutInSec" : 5 ,
"executionTimeoutInSec" : 600 ,
"scalerType" : "QUEUE_DELAY" ,
"scalerValue" : 4 ,
"warmstart" : true ,
"containerDiskInGb" : 20 ,
"networkVolumeId" : "vol_c7d2h4ke" ,
"env" : {
"MODEL_ID" : "stabilityai/sdxl-turbo"
},
"runUrl" : "https://run.apipods.com/v1/ep_4n8wq2zt" ,
"createdAt" : "2026-11-12T16:40:11Z" ,
"updatedAt" : "2026-11-18T08:02:55Z"
}
],
"hasMore" : false ,
"nextCursor" : null
}POST /endpoints
Creates an endpoint. No workers start until the first job arrives (unless minWorkers is above 0). The response includes webhookSecret, used to sign job webhooks . It is returned only once.
Parameters Name In Type Description namerequired body string Display name. imagebody string Worker image. Required unless templateId is set. templateIdbody string A SERVERLESS template. gpuPoolIdsrequired body string[] One or more GPU pools in priority order. gpuCountbody integer Default 1. regionIdsbody string[] Restrict regions. Default: all regions. minWorkersbody integer Default 0. maxWorkersbody integer Default 3. Counts towards your worker quota. idleTimeoutInSecbody integer Default 5. executionTimeoutInSecbody integer Default 600. scalerTypebody enum Default QUEUE_DELAY. scalerValuebody integer Default 4. warmstartbody boolean Default true. containerDiskInGbbody integer Default 20. networkVolumeIdbody string Mount a network volume. Pins regionIds to the volume's region. envbody object Environment variables. registryCredentialIdbody string Credentials for a private image.
Request curl -X POST https://api.apipods.com/v1/endpoints \
-H "Authorization: Bearer $APIPODS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "sdxl-turbo",
"image": "ghcr.io/acme/sdxl-worker:1.4.0",
"registryCredentialId": "rcr_6w2m9q4k",
"gpuPoolIds": [
"L40S",
"L4"
],
"gpuCount": 1,
"maxWorkers": 5,
"idleTimeoutInSec": 5,
"executionTimeoutInSec": 600,
"networkVolumeId": "vol_c7d2h4ke",
"env": {
"MODEL_ID": "stabilityai/sdxl-turbo"
}
}' Response 201 Created Copy
{
"id" : "ep_4n8wq2zt" ,
"object" : "endpoint" ,
"name" : "sdxl-turbo" ,
"image" : "ghcr.io/acme/sdxl-worker:1.4.0" ,
"templateId" : null ,
"registryCredentialId" : "rcr_6w2m9q4k" ,
"gpuPoolIds" : [
"L40S" ,
"L4"
],
"gpuCount" : 1 ,
"regionIds" : [
"eu-nl-1"
],
"minWorkers" : 0 ,
"maxWorkers" : 5 ,
"idleTimeoutInSec" : 5 ,
"executionTimeoutInSec" : 600 ,
"scalerType" : "QUEUE_DELAY" ,
"scalerValue" : 4 ,
"warmstart" : true ,
"containerDiskInGb" : 20 ,
"networkVolumeId" : "vol_c7d2h4ke" ,
"env" : {
"MODEL_ID" : "stabilityai/sdxl-turbo"
},
"runUrl" : "https://run.apipods.com/v1/ep_4n8wq2zt" ,
"createdAt" : "2026-11-12T16:40:11Z" ,
"updatedAt" : "2026-11-12T16:40:11Z" ,
"webhookSecret" : "whsec_7Hq2…"
}Status When 400invalid_parameter or unsupported_gpu_type (unknown pool ID).403gpu_quota_exceeded (sum of maxWorkers over your quota) or active_workers_not_enabled.
GET /endpoints/{endpointId}
Returns one endpoint. webhookSecret is never included here.
Parameters Name In Type Description endpointIdrequired path string The endpoint ID.
Request curl https://api.apipods.com/v1/endpoints/ep_4n8wq2zt \
-H "Authorization: Bearer $APIPODS_API_KEY" Response 200 OK Copy
{
"id" : "ep_4n8wq2zt" ,
"object" : "endpoint" ,
"name" : "sdxl-turbo" ,
"image" : "ghcr.io/acme/sdxl-worker:1.4.0" ,
"templateId" : null ,
"registryCredentialId" : "rcr_6w2m9q4k" ,
"gpuPoolIds" : [
"L40S" ,
"L4"
],
"gpuCount" : 1 ,
"regionIds" : [
"eu-nl-1"
],
"minWorkers" : 0 ,
"maxWorkers" : 5 ,
"idleTimeoutInSec" : 5 ,
"executionTimeoutInSec" : 600 ,
"scalerType" : "QUEUE_DELAY" ,
"scalerValue" : 4 ,
"warmstart" : true ,
"containerDiskInGb" : 20 ,
"networkVolumeId" : "vol_c7d2h4ke" ,
"env" : {
"MODEL_ID" : "stabilityai/sdxl-turbo"
},
"runUrl" : "https://run.apipods.com/v1/ep_4n8wq2zt" ,
"createdAt" : "2026-11-12T16:40:11Z" ,
"updatedAt" : "2026-11-18T08:02:55Z"
}Status When 404resource_not_found.
PATCH /endpoints/{endpointId}
Changes settings. Scaling settings apply within seconds. Changing image, env, gpuPoolIds or gpuCount triggers a rolling update: idle workers are replaced right away, busy workers finish their current job first. Jobs in the queue are not lost. The Warmstart snapshot is rebuilt on the first new worker.
Parameters Name In Type Description endpointIdrequired path string The endpoint ID. …body Any writable field from the endpoint object.
Request curl -X PATCH https://api.apipods.com/v1/endpoints/ep_4n8wq2zt \
-H "Authorization: Bearer $APIPODS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image": "ghcr.io/acme/sdxl-worker:1.5.0",
"maxWorkers": 10
}' Response 200 OK Copy
{
"id" : "ep_4n8wq2zt" ,
"object" : "endpoint" ,
"name" : "sdxl-turbo" ,
"image" : "ghcr.io/acme/sdxl-worker:1.5.0" ,
"templateId" : null ,
"registryCredentialId" : "rcr_6w2m9q4k" ,
"gpuPoolIds" : [
"L40S" ,
"L4"
],
"gpuCount" : 1 ,
"regionIds" : [
"eu-nl-1"
],
"minWorkers" : 0 ,
"maxWorkers" : 10 ,
"idleTimeoutInSec" : 5 ,
"executionTimeoutInSec" : 600 ,
"scalerType" : "QUEUE_DELAY" ,
"scalerValue" : 4 ,
"warmstart" : true ,
"containerDiskInGb" : 20 ,
"networkVolumeId" : "vol_c7d2h4ke" ,
"env" : {
"MODEL_ID" : "stabilityai/sdxl-turbo"
},
"runUrl" : "https://run.apipods.com/v1/ep_4n8wq2zt" ,
"createdAt" : "2026-11-12T16:40:11Z" ,
"updatedAt" : "2026-11-18T12:15:00Z"
}Status When 403active_workers_not_enabled when raising minWorkers above 0 on a plan without Active workers (Enterprise only).
DELETE /endpoints/{endpointId}
Deletes the endpoint. Queued jobs are cancelled, running jobs are stopped and all workers are shut down. Attached network volumes are kept.
Parameters Name In Type Description endpointIdrequired path string The endpoint ID.
Request curl -X DELETE https://api.apipods.com/v1/endpoints/ep_4n8wq2zt \
-H "Authorization: Bearer $APIPODS_API_KEY" Response Returns 204 No Content with an empty body.
GET /endpoints/{endpointId}/workers
Returns the endpoint's current workers. Workers that have shut down are not listed.
Worker status Meaning INITIALIZINGThe worker is starting: pulling the image or restoring a Warmstart snapshot, then running your module-level code. IDLEReady and waiting for a job. Billed until the idle timeout expires (Flex) or always (Active). RUNNINGExecuting one or more jobs. THROTTLEDScheduled but waiting for a GPU from your priority list to free up on the host. UNHEALTHYThe worker crashed or failed its health check. It is replaced automatically.
Parameters Name In Type Description endpointIdrequired path string The endpoint ID. statusquery enum Filter by worker status.
Request curl https://api.apipods.com/v1/endpoints/ep_4n8wq2zt/workers \
-H "Authorization: Bearer $APIPODS_API_KEY" Response 200 OK Copy
{
"object" : "list" ,
"data" : [
{
"id" : "wrk_8q3m2x9k" ,
"object" : "worker" ,
"endpointId" : "ep_4n8wq2zt" ,
"status" : "RUNNING" ,
"gpuPoolId" : "L40S" ,
"regionId" : "eu-nl-1" ,
"warmstart" : true ,
"startedAt" : "2026-11-18T10:01:58Z"
},
{
"id" : "wrk_3t7n2k9w" ,
"object" : "worker" ,
"endpointId" : "ep_4n8wq2zt" ,
"status" : "IDLE" ,
"gpuPoolId" : "L40S" ,
"regionId" : "eu-nl-1" ,
"warmstart" : true ,
"startedAt" : "2026-11-18T10:03:11Z"
}
],
"hasMore" : false ,
"nextCursor" : null
}GET /endpoints/{endpointId}/metrics
Aggregated request, latency and worker metrics. Latencies are in milliseconds, matching the job delayTime and executionTime fields.
Parameters Name In Type Description endpointIdrequired path string The endpoint ID. windowquery enum 1h (1-minute buckets), 24h (15-minute buckets) or 7d (1-hour buckets). Default 1h.
Request curl https://api.apipods.com/v1/endpoints/ep_4n8wq2zt/metrics?window=1h \
-H "Authorization: Bearer $APIPODS_API_KEY" Response 200 OK Copy
{
"object" : "endpoint_metrics" ,
"endpointId" : "ep_4n8wq2zt" ,
"window" : "1h" ,
"totals" : {
"completed" : 1284 ,
"failed" : 3 ,
"cancelled" : 0 ,
"timedOut" : 1 ,
"delayTimeP50" : 420 ,
"delayTimeP95" : 2380 ,
"executionTimeP50" : 1910 ,
"executionTimeP95" : 2840 ,
"coldStarts" : 7 ,
"gpuSeconds" : 2913
},
"buckets" : [
{
"start" : "2026-11-18T10:00:00Z" ,
"completed" : 22 ,
"failed" : 0 ,
"inQueue" : 0 ,
"workersRunning" : 2 ,
"workersIdle" : 1
},
{
"start" : "2026-11-18T10:01:00Z" ,
"completed" : 25 ,
"failed" : 1 ,
"inQueue" : 3 ,
"workersRunning" : 3 ,
"workersIdle" : 0
}
]
}GET /endpoints/{endpointId}/logs
Worker stdout/stderr and system events, newest last. Kept for 7 days. Supports follow=true for server-sent events, like pod logs.
Parameters Name In Type Description endpointIdrequired path string The endpoint ID. workerIdquery string Only lines from one worker. jobIdquery string Only lines logged while this job was running. sincequery string ISO 8601 timestamp. tailquery integer Last N lines, max 5,000. Default 500. followquery boolean Stream as server-sent events.
Request curl https://api.apipods.com/v1/endpoints/ep_4n8wq2zt/logs?jobId=job_3x9wq2mt \
-H "Authorization: Bearer $APIPODS_API_KEY" Response 200 OK Copy
{
"object" : "list" ,
"data" : [
{
"object" : "log_line" ,
"timestamp" : "2026-11-18T10:02:14Z" ,
"workerId" : "wrk_8q3m2x9k" ,
"jobId" : "job_3x9wq2mt" ,
"stream" : "stdout" ,
"message" : "loading pipeline from /volume/models/sdxl-turbo"
},
{
"object" : "log_line" ,
"timestamp" : "2026-11-18T10:02:16Z" ,
"workerId" : "wrk_8q3m2x9k" ,
"jobId" : "job_3x9wq2mt" ,
"stream" : "stdout" ,
"message" : "generated 1 image in 1.71s"
}
],
"hasMore" : false ,
"nextCursor" : null
}