Skip to main content
POST
Create pod

Authorizations

Authorization
string
header
required

Your AI Reserve API key (aireserve_api_…) from the API Keys page in the portal (https://portal.aireserve.com/keys).

Headers

Idempotency-Key
string
required

Client-generated key (8–180 chars, [A-Za-z0-9:_-]). Identical keys with the same normalized payload return the original accepted response without re-launching.

Body

application/json

Specification for creating a new GPU pod. A signed quote (quoteId) from POST /v1/gpu/quotes is required to lock the price before creation.

name
string
required
Maximum string length: 120
gpuTypeId
string
required

GPU type ID from GET /v1/gpu/catalog/gpus.

gpuCount
integer
required
Required range: 1 <= x <= 16
dataCenterId
string
required

Data center ID from GET /v1/gpu/catalog/datacenters.

containerDiskGb
integer
required

Ephemeral container disk in GiB. Contents are lost on stop or termination. Acknowledge via ephemeralDiskAcknowledged: true.

Required range: 1 <= x <= 1024
quoteId
string
required

Signed quote token from POST /v1/gpu/quotes. Binds the hardware spec and locks the price. Expires after 2 minutes.

ephemeralDiskAcknowledged
enum<boolean>
required

Must be true. Confirms you understand that the container disk is ephemeral and its contents are lost on stop or termination.

Available options:
true
imageName
string

Docker image reference for a custom image. Mutually exclusive with templateId.

templateId
string<uuid>

Template ID to use. Mutually exclusive with imageName.

networkVolumeId
string<uuid>

Persistent network volume to attach. Must be ready, unattached, and in the same data center.

volumeMountPath
string
default:/workspace

Mount path for the network volume inside the container.

registryCredentialId
string<uuid>

Registry credential ID to use when pulling a private image.

sshKeyIds
string<uuid>[]

SSH public key IDs to inject via the PUBLIC_KEY environment variable.

Maximum array length: 20
env
object

Environment variables injected into the container. Values are encrypted at rest and never echoed back.

ports
object[]

Ports to expose. HTTP ports create public proxy URLs not protected by AI Reserve authentication.

Maximum array length: 20

Response

Pod creation accepted. Poll GET /v1/gpu/operations/{operationId} for terminal status.

Response to a 202 Accepted Compute mutation. All fields are camelCase. Use operationId to poll GET /v1/gpu/operations/{id} for terminal status.

accepted
enum<boolean>
required
Available options:
true
resourceId
string<uuid>
required

ID of the resource created or mutated.

operationId
string<uuid>
required

ID for the durable operation record. Poll GET /v1/gpu/operations/{id} for terminal status.

status
enum<string>
required
Available options:
accepted,
pending
resourceType
enum<string>
Available options:
pod,
volume,
template,
registry,
ssh_key