Docs / API reference

Overview

The Apipods API is a JSON-over-HTTPS REST API. Everything you can do in the console you can do through the API: create pods, deploy serverless endpoints, manage storage, keys and billing.

Base URLs

The API is split into two hosts. Both use the same API keys and the same error format.

HostBase URLUsed for
Control planehttps://api.apipods.com/v1Pods, endpoints, templates, volumes, GPU types, keys, webhooks, billing.
Serverless runtimehttps://run.apipods.com/v1/{endpointId}Submitting and tracking jobs: /run, /runsync, /status, /stream and the OpenAI-compatible routes. See Jobs.

All requests must use HTTPS (TLS 1.2 or newer). Plain HTTP requests are rejected, not redirected.

First request
$ curl https://api.apipods.com/v1/pods \
  -H "Authorization: Bearer $APIPODS_API_KEY"

Versioning

The major version is part of the path (/v1). Within a major version we only make additive, backwards-compatible changes, and we ship them continuously:

  • new endpoints, new optional request parameters and new response fields;
  • new values in existing enums (for example a new pod status or webhook event type);
  • new error code values within an existing error type.

Your client must ignore unknown fields and handle unknown enum values gracefully. Breaking changes only ship in a new major version. When a v1 endpoint is scheduled for removal we announce it in the changelog at least 12 months in advance, and responses from that endpoint carry Deprecation and Sunset headers.

Deprecated endpoint response headers
HTTP/1.1 200 OK
Deprecation: @1798761600
Sunset: Fri, 31 Dec 2027 00:00:00 GMT
Link: <https://apipods.com/docs/help/changelog>; rel="deprecation"

Requests and responses

  • Request bodies are JSON and must be sent with Content-Type: application/json. Responses are always JSON, including errors.
  • Field names are camelCase. Enum values are UPPER_SNAKE_CASE (RUNNING, SECURE, READ_WRITE).
  • Units are part of the field name: containerDiskInGb, idleTimeoutInSec. The only exceptions are the runtime job fields delayTime and executionTime, which are in milliseconds.
  • Timestamps are ISO 8601 strings in UTC, for example 2026-11-18T09:14:02Z.
  • Money is a JSON number in US dollars, for example "costPerHr": 8.78.
  • On the control plane, fields without a value are returned as null, never omitted, and every object carries an object field naming its type ("pod", "endpoint", "list", …). Runtime job responses are deliberately compact; see Jobs.
  • PATCH requests only change the fields you send. Object-valued fields such as env are replaced as a whole, not merged key by key.
  • Every response carries an Apipods-Request-Id header (for example req_4x8m2k9q7w3tnc). Include it when you contact support.

Object IDs

IDs are opaque strings made of a type prefix and 8 lowercase alphanumeric characters, for example pod_8f2k1x9q. The prefix tells you what kind of object an ID points to, which makes logs easier to read. Treat IDs as case-sensitive and do not parse anything beyond the prefix.

PrefixResource
pod_Pod
ep_Serverless endpoint
job_Serverless job
wrk_Serverless worker
vol_Network volume
tpl_Template
sec_Secret
rcr_Registry credential
key_API key (metadata object)
ssh_SSH key
whk_Webhook subscription
evt_Webhook event
dlv_Webhook delivery attempt
s3k_S3 access key (metadata object)
aud_Audit log entry
inv_Invoice
org_Organization
usr_User
req_Request ID (response header)

Lists

List endpoints return a list object and are paginated with cursors. See Pagination.

GET /pods
{
  "object": "list",
  "data": [
    {
      "id": "pod_8f2k1x9q",
      "object": "pod",
      "name": "llama-finetune",
      "status": "RUNNING",
      "desiredStatus": "RUNNING",
      "image": "apipods/pytorch:2.9.0-py3.12-cuda12.8.1",
      "gpuTypeId": "NVIDIA_H100_80GB_SXM",
      "gpuCount": 1,
      "regionId": "eu-nl-1",
      "vcpuCount": 20,
      "memoryInGb": 125,
      "containerDiskInGb": 50,
      "volumeInGb": 100,
      "volumeMountPath": "/workspace",
      "networkVolumeId": null,
      "templateId": null,
      "startCommand": null,
      "ports": [
        {
          "port": 8888,
          "protocol": "http",
          "url": "https://8f2k1x9q-8888.proxy.apipods.net"
        },
        {
          "port": 22,
          "protocol": "tcp",
          "publicIp": "203.0.113.42",
          "publicPort": 40122
        }
      ],
      "env": {
        "HF_HOME": "/workspace/hf",
        "HF_TOKEN": "{{ secrets.HF_TOKEN }}"
      },
      "costPerHr": 8.78,
      "lastExitCode": null,
      "createdAt": "2026-11-18T09:14:02Z",
      "startedAt": "2026-11-18T09:14:41Z",
      "updatedAt": "2026-11-18T09:14:41Z"
    }
  ],
  "hasMore": true,
  "nextCursor": "cur_eyJpZCI6InBvZF80bTh3Mm43cSJ9"
}

SDKs

The Python SDK and JavaScript SDK wrap every endpoint on this reference, handle pagination and retries, and map Python keyword arguments (gpu_type_id) to the JSON fields (gpuTypeId). The CLI covers the same surface from your terminal.