---
title: "Create Server"
method: POST
path: "/servers"
tags: ["Servers"]
---

# Create Server

`POST /servers`

## Request

- Base URL: `https://gpucloud.ca/api`
- URL: `https://gpucloud.ca/api/servers`
- Auth: HTTP bearer

Deploy a new GPU server. A public IP address is assigned once the server is running. The first hour (hourly billing) is taken from the credit balance. Neither a saved card nor the automatic reload is required: the only requirement is paying the first hour. onFundsExhausted chooses what happens at the threshold; when the automatic reload is off, the answer carries autoReloadWarning.

## Request body

- CreateServerRequest
  - `productId` string, required: GPU plan id (GET /v1/gpu), e.g. gpu-l40
  - `sshKeyId` string, required: SSH key id (GET /settings/ssh-keys)
  - `name` string: Optional server name
  - `region` 'canada-montreal': Deployment region
  - `onFundsExhausted` 'HIBERNATE' | 'DELETE': What happens to this hourly server when the balance reaches its threshold and no automatic reload brings it back. HIBERNATE: hibernated (its GPU place is kept, hourly hibernation fee), restarted as soon as the balance is back above the threshold, deleted after 12 hours without credit. DELETE: deleted at once, no hibernation fee, data lost. Machines that cannot be hibernated (spot) are always DELETE. Any other value: 400.

## Response `201`

Server created and provisioning started

- object
  - `data` ServerCreated
    - `id` string
    - `name` string
    - `status` string
    - `gpu` string
    - `onFundsExhausted` 'HIBERNATE' | 'DELETE', nullable: Effective action at the threshold (hourly servers), null for a prepaid server.
  - `autoReloadWarning` AutoReloadWarning, nullable: Present only when the automatic reload is OFF: show the message to the user. Never a payment link.
    - `code` 'AUTO_RELOAD_OFF'
    - `action` 'HIBERNATE' | 'DELETE'
    - `thresholdCad` number: Threshold of the server (CAD): the larger of 3 CAD and 2 hours of its rate.
    - `message` string
    - `autoReloadSettingsUrl` string, uri: Console page where the automatic reload is turned on.

## Other responses

- `400`: Invalid request
- `401`: No API key (accountAction.code NO_API_KEY) or an invalid, expired, revoked or read only key on a write (INVALID_API_KEY). Provide a valid API key as `Authorization: Bearer <key>`; accountAction gives the links to create an account and a key.
- `402`: Payment required (accountAction.code PAYMENT_REQUIRED: not enough credit, no saved card or a declined card) or a budget cap reached (BUDGET_CAP_REACHED: account or server budget limit, nothing charged). accountAction.balanceCad gives the balance and, when a server is concerned, accountAction.hibernationThresholdCad its hibernation threshold (a server is hibernated when the balance reaches it, kept 12 hours at most, then deleted; it restarts as soon as the balance is above it). Add your card and credits at accountAction.action.url (or raise the cap), then send the same request again.
- `409`: GPU not available in the requested region
- `429`: Rate limit exceeded
- `500`: Internal server error

---

[API](https://skmtc.dev/gpucloud/apis/gpu-cloud-api.md) · [All operations](https://skmtc.dev/gpucloud/apis/gpu-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gpucloud/apis/gpu-cloud-api/revisions/ed530411f5c7?raw)
