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.
| Host | Base URL | Used for |
|---|---|---|
| Control plane | https://api.apipods.com/v1 | Pods, endpoints, templates, volumes, GPU types, keys, webhooks, billing. |
| Serverless runtime | https://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.
$ 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
statusor webhook event type); - new error
codevalues within an existing errortype.
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.
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 areUPPER_SNAKE_CASE(RUNNING,SECURE,READ_WRITE). - Units are part of the field name:
containerDiskInGb,idleTimeoutInSec. The only exceptions are the runtime job fieldsdelayTimeandexecutionTime, 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 anobjectfield naming its type ("pod","endpoint","list", …). Runtime job responses are deliberately compact; see Jobs. PATCHrequests only change the fields you send. Object-valued fields such asenvare replaced as a whole, not merged key by key.- Every response carries an
Apipods-Request-Idheader (for examplereq_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.
| Prefix | Resource |
|---|---|
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.
{
"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.