Skip to main content

Error codes

When something is refused, the reason arrives as a short machine-readable code. The console turns most of them into a toast; the API returns them as JSON.

{
"detail": {
"code": "OFFER_UNAVAILABLE",
"message": "This offer is no longer available"
}
}

A few codes carry extra fields alongside code and messageDISK_TOO_LARGE returns max_disk_gb and MACHINE_DISK_EXHAUSTED returns available_disk_gb, so a client can clamp the slider and retry without a second round trip.

Those two are not interchangeable, and clamping to the wrong one loops forever. max_disk_gb is the machine's total disk; available_disk_gb is what is left after the other renters on it and a 50 GB host reserve. A machine can therefore pass DISK_TOO_LARGE and still answer MACHINE_DISK_EXHAUSTED — even an empty one, because the reserve is never sellable. Clamp to available_disk_gb when you get it.

Authentication and organization scope

StatusCodeCauseWhat to do
401TOKEN_INVALIDNo Authorization header, a malformed token, an unknown or revoked API key, or an API key sent to an account endpointSend a valid bearer token. Account endpoints such as /v1/me and /v1/ssh-keys need a signed-in session, not an shk_ key
401TOKEN_EXPIREDThe session token is past its expirySign in again. For unattended scripts, use an API key instead
403NOT_A_MEMBERX-Org-Id names an organization you do not belong toDrop the header to use your personal organization, or ask an admin for an invite
403ORG_MISMATCHX-Org-Id does not match the organization the API key was created inRemove the header, or use a key belonging to that organization
403ADMIN_REQUIREDAn admin-only action — checkout, invites, member management, team API keys — attempted as a member or with an API keyAsk an admin, or repeat the action from a signed-in admin session
400INVALID_ORG_IDX-Org-Id is not a valid idCopy the id from GET /v1/orgs

Deploying

StatusCodeCauseWhat to do
402INSUFFICIENT_BALANCEYour balance does not cover one hour of the instance — GPU plus disk — when you deploy or start it. Being above zero is not enoughAdd credits. Only an admin can top up
409OFFER_UNAVAILABLEThe last free unit of that shape was taken between the moment you opened it and the moment you deployedGo back to the marketplace and pick another offer. The count on a card is a snapshot; the deploy is what decides
404OFFER_NOT_FOUNDGET /v1/offers/{id} was given an id that does not exist or has been withdrawn from the catalog. A deploy against an unknown offer returns OFFER_UNAVAILABLE insteadRe-list offers and use a current id
422DISK_TOO_LARGEThe requested disk_gb is more than the machine has in total. The response includes max_disk_gbRequest no more than max_disk_gb, or choose a machine with a larger disk
409MACHINE_IN_MAINTENANCEThe machine is booked to go offline too soon to start an instance on it. The response includes next_maintenancePick another machine, or come back after the window. A window further out does not block a deploy — it is shown on the offer instead
409MACHINE_DISK_EXHAUSTEDThe machine's disk is already committed to other renters. It carries several at once, and disk is sold against what is left, not against the total — so this can follow a disk_gb that cleared DISK_TOO_LARGE. The response includes available_disk_gb and requested_disk_gbRetry at or below available_disk_gb, or pick another machine. available_disk_gb can be 0
422OFFER_NOT_VM_CAPABLEA vm launch-mode template was aimed at a machine that cannot run virtual machinesDeploy the template onto a VM-capable offer, or pick a template in another launch mode
404TEMPLATE_NOT_FOUNDThe template id does not exist, or the template has been deletedUse a template from the gallery, or a hash_id you were given
404SSH_KEY_NOT_FOUNDThe ssh_key_id is not one of your keysList GET /v1/ssh-keys and use an id from your own account. Keys belong to a user, not to an organization

Instance actions

StatusCodeCauseWhat to do
404INSTANCE_NOT_FOUNDThe instance id does not exist in the organization the request is scoped toCheck the id, and check you are in the right organization
409INVALID_STATEThe action is not legal from the instance's current state — stopping something already stopping, destroying something mid-creationWait for the instance to reach running or stopped, then retry. See Instance states

Templates

StatusCodeCauseWhat to do
403TEMPLATE_IMMUTABLEYou tried to edit or delete a system template curated by SuperheatDuplicate it first, then edit your copy
409TEMPLATE_NAME_TAKENYour organization already has a template with that name, ignoring caseChoose a different name
404TEMPLATE_NOT_FOUNDThe id or hash_id does not resolve to a template you can seeConfirm the share link is complete and current — a hash_id changes when the launch recipe changes
422INVALID_TABThe tab query parameter on the template listing is not one of the gallery tabsUse a supported tab value

SSH keys

StatusCodeCauseWhat to do
422INVALID_SSH_KEYThe value is not an OpenSSH public key line, the key material is not valid base64, or the type is not supportedPaste the whole contents of the .pub file, one line, starting with the key type. See Supported key types
409DUPLICATE_SSH_KEYYou already added a key with the same fingerprintUse the key you already have, or delete the old entry first
404SSH_KEY_NOT_FOUNDThe key id is not yoursKeys are per user. Another member's key is never visible to you

Team and invites

StatusCodeCauseWhat to do
400PERSONAL_ORGYou tried to invite someone into a personal organizationCreate a real organization first, then invite from there
404INVITE_NOT_FOUNDThe invite token is wrong or the invite was withdrawnAsk an admin for a fresh link
410INVITE_USEDThe invite has already been acceptedAsk for a new invite link
410INVITE_EXPIREDThe invite is past its expiryAsk for a new invite link
404MEMBER_NOT_FOUNDThe user is not a member of this organizationRefresh the team page — they may have been removed already
400LAST_ADMINRemoving that member, or demoting them, would leave the organization with no adminPromote another member to admin first

Credits

StatusCodeCauseWhat to do
422INVALID_AMOUNTA custom top-up amount is missing or outside the accepted rangePick a $10, $25 or $100 pack, or a custom amount between $5 and $1,000
403ADMIN_REQUIREDCheckout was attempted by a member or with an API keyAsk an organization admin to add credits

API keys

StatusCodeCauseWhat to do
404API_KEY_NOT_FOUNDThe key id does not exist in this organizationRe-list your keys and use a current id
403ADMIN_REQUIREDAn API key tried to create or revoke another API key, or a member tried to manage a team-level keyCreate and revoke keys from a signed-in session

Requests that fail validation

A request whose body or query string does not match the schema is rejected before it reaches any of the checks above. It returns 422 with a list of field errors under detail instead of a code:

{
"detail": [
{
"type": "less_than_equal",
"loc": ["body", "disk_gb"],
"msg": "Input should be less than or equal to 20000"
}
]
}

The loc entry names the offending field. The bounds worth remembering are disk_gb between 10 and 20,000, a label of at most 64 characters, and tail on the logs endpoint between 1 and 1,000.