Docs / Serverless

Create an endpoint

Once your worker image is in a registry, creating an endpoint takes one API call. You choose the image, GPU pools, scaling limits and timeouts; everything else has sensible defaults.

From the console

  1. Open Serverless

    In the console, go to Serverless → New endpoint.

  2. Choose the image

    Enter the image reference, or pick a template. Select a registry credential for private images.

  3. Pick GPU pools

    Select one or more pools in priority order. Every pool must have enough VRAM for your model.

  4. Set scaling and storage

    Set max workers, idle and execution timeouts, and optionally attach a network volume. Then click Create.

With the API or SDKs

POST/endpoints
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,
    "regionIds": [
      "eu-nl-1"
    ],
    "maxWorkers": 5,
    "idleTimeoutInSec": 5,
    "executionTimeoutInSec": 600,
    "networkVolumeId": "vol_c7d2h4ke",
    "env": {
      "MODEL_ID": "stabilityai/sdxl-turbo",
      "HF_HOME": "/volume/hf"
    }
  }'

The response is the endpoint object. The webhookSecret used to sign job webhooks is only returned in this response; store it now.

201 Created
{
  "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",
  "webhookSecret": "whsec_7Hq2…"
}

Choosing GPU pools

Pick the smallest pool that fits your model with headroom for activations, then add one or two fallbacks. A good starting point by model size:

WorkloadPrimary poolFallback
SDXL, Flux schnell, Whisper, 7B LLM in FP16L40SL4
Flux dev, 13B to 30B LLM in FP8L40SRTX_PRO_6000
70B LLM in FP8H200H100_SXM

See Choosing a GPU and the GPU reference for details.

Send the first request

The first request triggers a full cold start because no snapshot exists yet. Later workers start from Warmstart.

Terminal
curl -X POST https://run.apipods.com/v1/ep_4n8wq2zt/runsync \
  -H "Authorization: Bearer $APIPODS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "prompt": "a lighthouse on a cliff at dusk, 35mm photo",
      "steps": 4
    }
  }'

Continue with Send requests, or tune the endpoint in Endpoint settings.