RunPod's GraphQL saveEndpoint mutation rejects GPU product names like "NVIDIA L4" in gpuIds with an Invalid GPU Pool ID error. It wants comma-separated pool IDs such as AMPERE_24,ADA_24,AMPERE_48. Two more traps hit the same deploy script: saveTemplate needs fields its docs example omits, and some fields you can read aren't valid inputs.

We hit all of them in a single session while scripting the first deployment of an HDR video upconversion pipeline to RunPod serverless. Below are the exact fixes, the complete idempotent deploy script we ended up with, and the numbers from the first end-to-end job.

What does "Invalid GPU Pool ID: "NVIDIA L4"" mean in saveEndpoint?

It means you passed a GPU product name where RunPod expects a pool ID. In serverless endpoints, gpuIds is not a list of cards. It is a comma-separated list of capacity pools like AMPERE_24 or ADA_48_PRO, each covering several cards. The fix is to swap names for pool IDs. The error message lists the valid ones.

Our first version of the script built gpuIds from the display names you see in the console: "NVIDIA L4,NVIDIA GeForce RTX 4090,NVIDIA GeForce RTX 3090,NVIDIA RTX A5000,NVIDIA L40,NVIDIA L40S,NVIDIA A40,NVIDIA RTX A6000". That's a reasonable guess, because pods do take GPU type IDs in that format. Serverless endpoints don't.

The server's answer is self-documenting. The same failure, as reported in runpodctl issue #287, reads:

graphql error: Invalid GPU Pool ID: "NVIDIA A40". The gpuIds field accepts a
comma-separated list of GPU pool IDs (e.g. "ADA_24,AMPERE_80"). ...
Valid pool IDs: AMPERE_16, AMPERE_24, ADA_24, ADA_32_PRO, AMPERE_48, ADA_48_PRO,
AMPERE_80, ADA_80_PRO, BLACKWELL_96, HOPPER_141, BLACKWELL_180.

There's a catch. You only see that list if your client surfaces the response body. Our original GraphQL helper called r.raise_for_status(), which throws a bare HTTPError and discards the body that carries the valid list. The first real fix was to the error handling, not the payload:

def _gql(api_key, query, variables=None):
    r = requests.post(
        "https://api.runpod.io/graphql",
        headers={"Authorization": f"Bearer {api_key}",
                 "Content-Type": "application/json"},
        json={"query": query, "variables": variables or {}},
        timeout=60,
    )
    # Not raise_for_status(): the 4xx body is where RunPod tells you what it wanted.
    if r.status_code >= 400:
        raise RuntimeError(f"GraphQL HTTP {r.status_code}: {r.text[:1000]}")
    body = r.json()
    if "errors" in body:
        raise RuntimeError(f"GraphQL errors: {json.dumps(body['errors'], indent=2)}")
    return body["data"]

Which RunPod pool ID covers which GPU?

Each pool ID groups cards by architecture and VRAM tier. AMPERE_24 covers L4, A5000 and 3090. ADA_24 is the 4090. AMPERE_48 is A6000 and A40. ADA_48_PRO is L40, L40S and 6000 Ada. AMPERE_80 is A100. You can't select a single card inside a pool through GraphQL. Selection is pool-granular.

From RunPod's GPU types reference as of December 2026:

Pool ID        GPUs                          VRAM
AMPERE_16      A4000, A4500, RTX 4000, RTX 2000   16 GB
AMPERE_24      L4, A5000, 3090                    24 GB
ADA_24         4090                               24 GB
AMPERE_48      A6000, A40                         48 GB
ADA_48_PRO     L40, L40S, 6000 Ada                48 GB
AMPERE_80      A100                               80 GB
ADA_80_PRO     H100                               80 GB
HOPPER_141     H200                              141 GB

Two things surprised us. First, the L4 is an Ada Lovelace card but sits in AMPERE_24. Our own commit comment had it under ADA_24, and we only noticed while writing this up. It made no difference because we listed both pools.

Second, the error message lists pools the reference table doesn't (ADA_32_PRO, BLACKWELL_96, BLACKWELL_180). Treat the error's list as the more current source.

Our original intent was "L4, with A10 as a fallback." The A10 isn't in any serverless pool, so that intent was never expressible. We replaced it with every 24 GB+ pool:

GPU_POOLS = "AMPERE_24,ADA_24,AMPERE_48,ADA_48_PRO,AMPERE_80"

Why does saveTemplate fail with "Template name must be unique" on the second run?

Because saveTemplate only creates a template when you leave out id, and template names are unique per account. Re-running a deploy script fails on the second run. The fix is to look the template up by name in myself { podTemplates { id name } } and pass its id, which turns the same mutation into an update.

The same mutation carries a second trap. RunPod's GraphQL template docs list name, imageName, containerDiskInGb and volumeInGb as required. In our run, SaveTemplateInput also rejected the payload until we sent dockerArgs, ports, startSsh and isPublic. That holds even for a serverless worker that has no ports, no SSH and no custom docker args. Empty values satisfy it:

def find_template(api_key, name):
    data = _gql(api_key, "query { myself { podTemplates { id name } } }")
    for t in ((data.get("myself") or {}).get("podTemplates")) or []:
        if t.get("name") == name:
            return t
    return None

def save_template(api_key, *, name, image_name, registry_auth_id, env,
                  container_disk_gb=30):
    payload = {
        "name": name,
        "imageName": image_name,
        "dockerArgs": "",          # required, even when empty
        "containerDiskInGb": container_disk_gb,
        "volumeInGb": 0,
        "ports": "",               # required, even for serverless
        "env": [{"key": k, "value": v} for k, v in env.items()],
        "isServerless": True,
        "containerRegistryAuthId": registry_auth_id,
        "startSsh": False,         # required
        "isPublic": False,         # required -- and you want False for a private image
        "readme": "",
    }
    existing = find_template(api_key, name)
    if existing:
        payload["id"] = existing["id"]   # turns create into update
    data = _gql(api_key, """
        mutation SaveTemplate($input: SaveTemplateInput!) {
          saveTemplate(input: $input) { id name imageName isServerless }
        }""", {"input": payload})
    return data["saveTemplate"]["id"]

We name templates {endpoint}-{image_tag}. A new image tag gets a new template, and re-deploying the same tag updates in place. That keeps the previous tag's template around if we need to roll the endpoint back.

Why does saveRegistryAuth fail when you ask for the registry field?

The ContainerRegistryAuth type that saveRegistryAuth returns only exposes id and name. Asking for registry in the selection set is a GraphQL validation error, so the whole mutation fails and no credential is created. Select { id name } and nothing else. We also dropped registry from the input. The image path tells RunPod which registry to pull from.

This one is easy to write by accident. You're storing credentials for ghcr.io, so asking for the registry back feels natural. Make it idempotent the same way as templates: list containerRegistryCreds, reuse by name, and create only when it's missing. Otherwise every run stores another copy of your registry token on RunPod's side.

def ensure_registry_auth(api_key, username, token, name):
    data = _gql(api_key, "query { myself { containerRegistryCreds { id name } } }")
    for c in ((data.get("myself") or {}).get("containerRegistryCreds")) or []:
        if c.get("name") == name:
            return c["id"]
    data = _gql(api_key, """
        mutation Save($input: SaveRegistryAuthInput!) {
          saveRegistryAuth(input: $input) { id name }   # NOT { id name registry }
        }""", {"input": {"name": name, "username": username, "password": token}})
    return data["saveRegistryAuth"]["id"]

Why does saveEndpoint reject executionTimeoutMs?

In our run, executionTimeoutMs was not a field on EndpointInput. GraphQL rejects unknown input fields outright, so one stray field failed the entire endpoint save. We removed it and added two fields the docs example uses but our first draft lacked: gpuCount: 1 and flashBootType: FLASHBOOT, which is an enum and so goes unquoted in a literal query.

The resulting endpoint mutation, upserting by name the same way:

def find_endpoint(api_key, name):
    data = _gql(api_key, "query { myself { endpoints { id name templateId } } }")
    for ep in ((data.get("myself") or {}).get("endpoints")) or []:
        if ep.get("name") == name:
            return ep
    return None

def save_endpoint(api_key, *, name, template_id, gpu_pools, workers_min, workers_max):
    existing = find_endpoint(api_key, name)
    payload = {
        "name": name,
        "templateId": template_id,
        "gpuIds": ",".join(gpu_pools),        # pool IDs, comma-separated string
        "gpuCount": 1,
        "workersMin": workers_min,
        "workersMax": workers_max,
        "idleTimeout": 5,
        "scalerType": "QUEUE_DELAY",
        "scalerValue": 4,
        "flashBootType": "FLASHBOOT",         # enum; variables carry it as a string
        "locations": "",
        "networkVolumeId": "",
        # no executionTimeoutMs -- not an EndpointInput field
    }
    if existing:
        payload["id"] = existing["id"]
    data = _gql(api_key, """
        mutation SaveEndpoint($input: EndpointInput!) {
          saveEndpoint(input: $input) {
            id name templateId gpuIds workersMin workersMax
            idleTimeout scalerType scalerValue
          }
        }""", {"input": payload})
    return data["saveEndpoint"]

One warning if you reuse this for updates. Send every field you care about, not just the one you're changing. We read the full config first and send it all back when we flip workersMax to pause and resume endpoints, which we describe in what RunPod's 409 "Endpoint is paused (max_workers=0)" means and how long cold starts really take.

The deploy itself is three calls in order: ensure_registry_auth, then save_template with the returned auth ID, then save_endpoint with the returned template ID. Every step looks itself up by name first, so the script is safe to re-run after every image build. Keep the S3 keys and other secrets in environment variables on the runner, never in the script.

What did the first end-to-end job measure on RunPod serverless?

Our first job after the fixed deploy ran a 2-second 360p SDR clip through the pipeline. It took a 48-second cold start and 5.0 seconds of inference for 48 frames, roughly 0.10 s per frame. The output came back as ProRes XQ 12-bit 4:4:4 tagged bt2020 / smpte2084, with audio passed through. The whole path worked.

The 48 s cold start used FlashBoot on a scale-to-zero endpoint with workersMin: 0 and a wide pool list. Other cold starts we've measured on RunPod ran from 3 to 9 minutes, so 48 s was a good draw rather than a guarantee. Don't treat it as an SLA.

The wide pool was a deliberate tradeoff. We chose to list five pools over pinning one because RunPod fills from whatever has capacity. On a scale-to-zero endpoint, "no worker available" is the failure that actually hurts.

The cost showed up the same day. At 480p we measured 1.1 s per frame, far off the per-frame figure we were benchmarking against. We couldn't tell whether we'd landed on a slow card, because nothing logged which GPU served the job. The next commit added GPU identity and per-stage timing to every job's log. If you list many pools, log torch.cuda.get_device_name() on every job.

Should you still deploy RunPod endpoints through GraphQL in 2026?

Not for new work. RunPod's GraphQL overview now states the API is deprecated and will be retired in early 2027, with REST API v2 as the replacement. The pool model carries over. In v2's OpenAPI schema, endpoints take gpu.pools as pool IDs, the same values this post covers.

Reading https://api.runpod.io/v2/openapi.json, three differences matter for the traps above. POST /v2/serverless takes gpu.pools plus an optional gpu.excludedTypes of GPU type IDs like "NVIDIA L40". That finally lets you take a pool minus specific cards, something GraphQL couldn't express.

It also has a timeout integer (default 300000) where GraphQL rejected executionTimeoutMs. And flashboot defaults to OFF, so a naive port silently loses FlashBoot.

We haven't migrated this script yet, so treat those as schema readings rather than battle-tested behavior. Our plan is to keep the same shape: upsert by name for registry auth, template and endpoint, and fail loudly with the response body. The idempotency logic is the part worth keeping. The GraphQL plumbing is what gets thrown away.

The RunPod GraphQL deploy checklist at a glance

Put pool IDs in gpuIds, never product names, and print the 4xx body so the error's list of valid pools reaches you. Send dockerArgs, ports, startSsh and isPublic to saveTemplate even when empty. Look templates, endpoints and registry auths up by name and pass id to update.

Select only { id name } from saveRegistryAuth, and keep executionTimeoutMs out of EndpointInput. Set flashBootType: FLASHBOOT explicitly. With those fixes, a deploy script for RunPod serverless becomes a boring, re-runnable three-step upsert. That's what you want it to be before the GraphQL API goes away in 2027 and you port it to REST v2.