How long a stopped rental's files are kept, and what backups cost
API keyThe numbers behind stopping, deletion and backups, from the one place Legion keeps them, so the app, the docs and agents never hard-code them. A stopped rental's files stay on its host, kept and never reclaimed, for protected_ after the stop completes; after that its disk may be reclaimed for another renter's new or restarted rental on the host; at retained_ they are deleted unless the rental was started again. A warning email goes out warning_ before. A backup is kept backup_ (7 or 30, the renter's choice), then removed after backup_. Its price is the storage for the chosen retention plus one download, and every further download link is charged its transfer again. All of a backup's price goes to Ambient. The reclaim and the backup charges are on by default; reclaim_ and backup_ show when an operator has used their kill switch.
Send an API key as Authorization: Bearer lgn_…. Authentication
https://api.legion.ambient.xyz/v1/storage-policycurl -s "https://api.legion.ambient.xyz/v1/storage-policy" \
-H "Authorization: Bearer $LEGION_API_KEY"{
"protected_hours": 0,
"retained_hours": 0,
"warning_hours": 0,
"backup_retention_days": [
7
],
"backup_default_retention_days": 7,
"backup_purge_grace_hours": 0,
"backup_queue_timeout_hours": 0,
"backup_upload_timeout_hours": 0,
"backup_storage_price_per_gib_month": {
"amount_minor": 250,
"currency": "USD"
},
"backup_download_price_per_gib": {
"amount_minor": 250,
"currency": "USD"
},
"backup_download_links_per_day": 0,
"reclaim_enabled": false,
"backup_charges_enabled": false,
"export_cents_per_gib": 0,
"relay_cents_per_gib": 0,
"relay_free_gib_per_month": 0,
"exports_per_hour": 0,
"download_link_ttl_seconds": 0,
"auto_backup_default_retention_days": 7
}Example values.
Responses
200The policy.The policy.
protected_hoursintegerRequiredA stopped rental's files are never reclaimed for this long after the stop (24).
retained_hoursintegerRequiredA stopped rental's files are deleted this long after the stop (72).
warning_hoursintegerRequiredThe warning email goes out this long before (12).
backup_retention_daysarray of BackupRetentionDaysRequiredbackup_default_retention_daysBackupRetentionDaysRequiredHow many days a backup is kept once it is ready. 7 by default.
one of: 7, 30
backup_purge_grace_hoursintegerRequiredAn expired or deleted backup's file is purged this long after (24).
backup_queue_timeout_hoursintegerRequiredA backup that has not started uploading this long after it was requested fails (24).
backup_upload_timeout_hoursintegerRequiredA backup still uploading this long after the upload started fails (12).
backup_storage_price_per_gib_monthMoneyRequiredPer GiB per 730-hour month, prorated by the hour over the retention.
Child fields · 2
amount_minorinteger (int64)RequiredAmount in minor units (cents for USD).
at least 0
currencyMoneyCurrencyRequiredISO 4217 currency code. Only USD is supported.
one of: "USD"
backup_download_price_per_gibMoneyRequiredChild fields · 2
amount_minorinteger (int64)RequiredAmount in minor units (cents for USD).
at least 0
currencyMoneyCurrencyRequiredISO 4217 currency code. Only USD is supported.
one of: "USD"
backup_download_links_per_dayintegerRequiredDownload links a backup may have minted in 24 hours.
reclaim_enabledbooleanRequiredWhether disk reclaim is on (it is unless an operator used its kill switch).
backup_charges_enabledbooleanRequiredWhether backups are charged (they are unless an operator used its kill switch).
export_cents_per_gibinteger (int64)Required. US cents per GiB of one download of a workspace export, rounded up to a whole cent, at least 1 cent.
relay_cents_per_gibinteger (int64)Required. US cents per GiB of relay, exposed-port and terminal traffic above the free allowance.
relay_free_gib_per_monthinteger (int64)Required. GiB of that traffic per organization per UTC calendar month that is free.
exports_per_hourinteger (int64)Required. Workspace exports an organization may start an hour.
download_link_ttl_secondsinteger (int64)Required. How long a download link (export or backup) can be used before it expires.
auto_backup_default_retention_daysBackupRetentionDays. The automatic backup on interruption a new
interruptiblerental that keeps its data gets whencreateRentaldoes not nameauto_. Absent: off (today: it is opt-in, because each backup is charged and its size may be unmeasured). A rent form defaults its choice to this.backup
401Missing, unknown, expired or revoked credentials.Missing, unknown, expired or revoked credentials.
typestringRequiredURI reference identifying the problem type: the code's entry in the public error reference,
https:/. Branch on/ legion. ambient. xyz/ docs/ errors#<code> code, never ontype.titlestringRequiredstatusintegerRequiredcodestringRequiredStable machine-readable error code.
detailstringinstancestringThe request path that produced the problem.
resource_idstring (uuid)The resource a conflict refers to, when there is one (
egress_: the request already waiting;request_ exists export_: the pending workspace export).in_ progress accessMeAccessWhether a signed-in person may use Legion during the closed beta, decided on their verified email (case-insensitive):
approved(a member of an organization, holding a pending invitation, or Legion),waitlisted(on the waitlist, not approved yet) ornot_(not on the waitlist). Carried byrequested Me(alwaysapprovedfor a member) and by the problem of a 403access_, and ofnot_ approved getMe's 403no_.organization Child fields · 2
statestringRequiredone of: "approved", "waitlisted", "not_requested"
emailstring (email)RequiredThe verified email the state was decided on.
legalMeLegalThe caller's consent to Legion's legal documents.
requiredlists every document the consent step shows andacceptLegalDocumentstakes, at its current version.acceptedis true when the caller accepted the current version of everyagreedocument; while it is false, every operation exceptgetMe,acceptLegalDocuments,joinMyWaitlistand the wind-down operations (listing, stopping and deleting rentals; listing hosts, stopping new rentals on them and removing them) answers 403terms_.not_ accepted Child fields · 2
requiredarray of LegalDocumentRequiredChild fields · 6
keyLegalDocumentKeyRequiredA legal document:
terms(Terms of Use),acceptable_(Acceptable Use Policy),use privacy(Privacy Policy),data_(Data Handling).handling one of: "terms", "acceptable_use", "privacy", "data_handling"
versionstringRequiredThe current version. A new version of an
agreedocument must be accepted again.effectivestring (date)RequiredThe date the current version took effect.
titlestringRequiredurlstring (uri)RequiredThe document's public page.
acceptancestringRequiredagree: the person agrees to it, and the API is refused until the current version is accepted.acknowledge: the person confirms having read it, in the same step.one of: "agree", "acknowledge"
acceptedbooleanRequired
blocking_rentalsarray of HostRemovalBlockingRentalSorted by ID.
at most 1000 items
Child fields · 6
idstring (uuid)RequirednameFriendlyNameA host's or rental's friendly name: a lowercase DNS label that starts with a letter and does not end with a hyphen. Unique across all hosts and rentals and never reused. A host's is generated as adjective-noun (
amber-falcon) and can be changed by its owner; a rental's is generated as adjective-noun plus four base36 characters (quiet-river-7k2f) and never changes.2–63 characters · pattern ^[a-z][a-z0-9-]{0,61}[a-z0-9]$
stateRentalStateRequiredstarting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental'simage_isphase fetchingthe agent does not know it yet.running: the container runs. Billed per second.exited: the host reports the container is not running, for example after a crash; the host is restarting it. GPUs stay reserved. Not billed; returns torunningwhen the host reports it running again.stopping: stop requested, waiting for the agent. Not billed. Becomesstoppedwithout the agent once the host has been offline for 90 seconds.stopped: GPUs released, workspace kept on the host. GPU time is not billed. Storage is billed per GiB while the organization has credit, except for aninterruption_rental, which never stops with data.behavior: delete host_: the host stopped syncing. Not billed; returns tooffline runningwhen the host syncs again, and becomesfailedonce the host has not synced forHOST_(24 hours;).STALE_ AFTER deleting: delete requested, waiting for the agent. Not billed. Becomesdeletedwithout the agent once the host has been offline for 90 seconds.deleted: container and workspace removed. Final.failed: the agent could not start or keep running the container. GPUs released. The rental can only be deleted.one of: "starting", "running", "exited", "stopping", "stopped", "host_offline", "deleting", "deleted", "failed"
endablebooleanRequiredRemoving the host anyway (
removeHostwithforcetrue) would end it: it ishost_on a host that is offline, and not on a preservation hold. A rental that runs, or that the host still has to act on, is never endable.offline heldbooleanOn a preservation hold.
rented_by_youbooleanThe caller's own organization rented it, so the caller can open it (
getRental). Only fromremoveHost; absent means false.
stored_data_rentalsarray of HostStoredDataRental. Sorted by ID.
at most 1000 items
Child fields · 8
idstring (uuid)RequirednameFriendlyNameA host's or rental's friendly name: a lowercase DNS label that starts with a letter and does not end with a hyphen. Unique across all hosts and rentals and never reused. A host's is generated as adjective-noun (
amber-falcon) and can be changed by its owner; a rental's is generated as adjective-noun plus four base36 characters (quiet-river-7k2f) and never changes.2–63 characters · pattern ^[a-z][a-z0-9-]{0,61}[a-z0-9]$
stateRentalStateRequiredstarting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental'simage_isphase fetchingthe agent does not know it yet.running: the container runs. Billed per second.exited: the host reports the container is not running, for example after a crash; the host is restarting it. GPUs stay reserved. Not billed; returns torunningwhen the host reports it running again.stopping: stop requested, waiting for the agent. Not billed. Becomesstoppedwithout the agent once the host has been offline for 90 seconds.stopped: GPUs released, workspace kept on the host. GPU time is not billed. Storage is billed per GiB while the organization has credit, except for aninterruption_rental, which never stops with data.behavior: delete host_: the host stopped syncing. Not billed; returns tooffline runningwhen the host syncs again, and becomesfailedonce the host has not synced forHOST_(24 hours;).STALE_ AFTER deleting: delete requested, waiting for the agent. Not billed. Becomesdeletedwithout the agent once the host has been offline for 90 seconds.deleted: container and workspace removed. Final.failed: the agent could not start or keep running the container. GPUs released. The rental can only be deleted.one of: "starting", "running", "exited", "stopping", "stopped", "host_offline", "deleting", "deleted", "failed"
estimated_size_bytesinteger (int64)RequiredThe size of its files on the host; with
estimate_basis disk_an upper bound.share estimate_basisBackupEstimateBasisRequired. What a backup's quote was computed on.
disk_: the size the rental's host last reported its workspace uses (used disk_).used_ gib disk_: the host does not report it (a host whose disk quota is not enforced, for example not on XFS), so the quote is the rental's whole disk share (share resources.): an upper bound, "up to" this price, trued down to the real size when the backup is ready. Either way the charge never exceeds the quote: a backup larger than its estimate (a staledisk_ gib disk_) is charged the quote, not more.used_ gib one of: "disk_used", "disk_share"
delete_afterstring (date-time)When its files are deleted (its
delete_); absent while held.after backup_stateBackupStateIts renter's newest backup, when it has one.
rented_by_youbooleanThe caller's own organization rented it. Only on the public listener; absent means false.
available_untilstring (date-time). On 409
host_frommaintenance createRental(whatever the window's state), when the host's window starts. Nothing more about the window: its end and reason are only for the renters of rentals on the host.maintenanceMaintenanceSummary. On 409
host_frommaintenance startRentalof the renter's own rental, the window that keeps it stopped.Child fields · 4
startstring (date-time)RequiredWhen the window starts: the host's rentals stop then (after a 5-minute notice).
endstring (date-time)RequiredThe planned end. The provider may end the window earlier.
reasonMaintenanceReasonRequired. Why a provider takes a host down, shown to the renters of rentals on it. The list grows: accept a value you do not know.
one of: "hardware", "software", "network", "power", "facility", "other"
stateMaintenanceStateRequired.
scheduled(announced, renters told),closing(the last 5 minutes before the start: the penalty-free outcome is decided, nothing can start, rentals in their notice),active(the host is in maintenance, its rentals stopped),overrun(the planned end passed and the host has not synced back),completed,cancelled. The list grows: accept a value you do not know.one of: "scheduled", "closing", "active", "overrun", "completed", "cancelled"
test_switchAdminOrgTestSwitchChild fields · 5
test_orgbooleanRequiredallowedbooleanRequiredblocking_rentalsarray of AdminOrgTestBlockingRentalRequiredat most 100 items
Child fields · 7
idstring (uuid)RequirednameFriendlyNameA host's or rental's friendly name: a lowercase DNS label that starts with a letter and does not end with a hyphen. Unique across all hosts and rentals and never reused. A host's is generated as adjective-noun (
amber-falcon) and can be changed by its owner; a rental's is generated as adjective-noun plus four base36 characters (quiet-river-7k2f) and never changes.2–63 characters · pattern ^[a-z][a-z0-9-]{0,61}[a-z0-9]$
stateRentalStateRequiredstarting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental'simage_isphase fetchingthe agent does not know it yet.running: the container runs. Billed per second.exited: the host reports the container is not running, for example after a crash; the host is restarting it. GPUs stay reserved. Not billed; returns torunningwhen the host reports it running again.stopping: stop requested, waiting for the agent. Not billed. Becomesstoppedwithout the agent once the host has been offline for 90 seconds.stopped: GPUs released, workspace kept on the host. GPU time is not billed. Storage is billed per GiB while the organization has credit, except for aninterruption_rental, which never stops with data.behavior: delete host_: the host stopped syncing. Not billed; returns tooffline runningwhen the host syncs again, and becomesfailedonce the host has not synced forHOST_(24 hours;).STALE_ AFTER deleting: delete requested, waiting for the agent. Not billed. Becomesdeletedwithout the agent once the host has been offline for 90 seconds.deleted: container and workspace removed. Final.failed: the agent could not start or keep running the container. GPUs released. The rental can only be deleted.one of: "starting", "running", "exited", "stopping", "stopped", "host_offline", "deleting", "deleted", "failed"
renter_orgOrgRequiredChild fields · 2
idstring (uuid)RequirednamestringRequired
provider_orgOrgRequiredChild fields · 2
idstring (uuid)RequirednamestringRequired
host_idstring (uuid)Requiredhost_nameFriendlyNameA host's or rental's friendly name: a lowercase DNS label that starts with a letter and does not end with a hyphen. Unique across all hosts and rentals and never reused. A host's is generated as adjective-noun (
amber-falcon) and can be changed by its owner; a rental's is generated as adjective-noun plus four base36 characters (quiet-river-7k2f) and never changes.2–63 characters · pattern ^[a-z][a-z0-9-]{0,61}[a-z0-9]$
blocking_rental_countintegerRequiredat least 0
unpaid_earningsMoneyRequiredChild fields · 2
amount_minorinteger (int64)RequiredAmount in minor units (cents for USD).
at least 0
currencyMoneyCurrencyRequiredISO 4217 currency code. Only USD is supported.
one of: "USD"
current_price_per_gpu_hourMoneyThe host's price per GPU-hour now, on 409
price_fromchanged createRental, the price a bid would win now on 409bid_, or the floor on 409too_ low bid_; all-in, as the renter sees prices.below_ floor Child fields · 2
amount_minorinteger (int64)RequiredAmount in minor units (cents for USD).
at least 0
currencyMoneyCurrencyRequiredISO 4217 currency code. Only USD is supported.
one of: "USD"
next_available_atstring (date-time)When the action is allowed again, on 429
benchmark_fromrequest_ limited requestHostBenchmark.reasonPromoIneligibleReasonWhy the organization may not redeem the promo code, on 403
promo_.code_ not_ eligible registryRegistrySignInRegistry. The registry a sign-in would be for, on 422
image_of an image on a registry Legion takes sign-ins for (offer to add one withprivate putRegistrySignIn), and on 422registry_(the sign-in the registry refused). Only ever one of these four;sign_ in_ rejected registry_names any host.host registry_hoststring. The registry host a credential is or would be for: on 422
image_(offer to add one withprivate createRegistryCredential),registry_,sign_ in_ rejected registry_, and the refusals of a registry (credential_ rejected registry_,ecr_ unsupported registry_,auth_ unsupported registry_,host_ not_ allowed registry_).realm_ not_ allowed at most 253 characters
registry_credential_idstring (uuid). The credential the registry refused, on 422
registry_.sign_ in_ rejected registry_credential_rentalsarray of RegistryCredentialRental. The rentals that still use a registry credential, on 409
registry_fromcredential_ in_ use deleteRegistryCredentialanddeleteRegistrySignIn. Oldest first.at most 100 items
Child fields · 3
idstring (uuid)RequirednamestringRequiredstateRentalStateRequiredstarting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental'simage_isphase fetchingthe agent does not know it yet.running: the container runs. Billed per second.exited: the host reports the container is not running, for example after a crash; the host is restarting it. GPUs stay reserved. Not billed; returns torunningwhen the host reports it running again.stopping: stop requested, waiting for the agent. Not billed. Becomesstoppedwithout the agent once the host has been offline for 90 seconds.stopped: GPUs released, workspace kept on the host. GPU time is not billed. Storage is billed per GiB while the organization has credit, except for aninterruption_rental, which never stops with data.behavior: delete host_: the host stopped syncing. Not billed; returns tooffline runningwhen the host syncs again, and becomesfailedonce the host has not synced forHOST_(24 hours;).STALE_ AFTER deleting: delete requested, waiting for the agent. Not billed. Becomesdeletedwithout the agent once the host has been offline for 90 seconds.deleted: container and workspace removed. Final.failed: the agent could not start or keep running the container. GPUs released. The rental can only be deleted.one of: "starting", "running", "exited", "stopping", "stopped", "host_offline", "deleting", "deleted", "failed"
invited_emailstring. The address an invitation is for, masked (
g•••y@example.), on 403com invitation_fromfor_ another_ account getMyInvitation.at most 320 characters
403The caller lacks the permission this operation requires (`forbidden`), or signed in without having joined an organization yet (`no_organization`; `getOnboarding` and the invitation and organization operations under it work), or could not sign in (`email_unverified`, `account_conflict`, and `domain_not_allowed`). `not_invited` is no longer returned to session tokens.The caller lacks the permission this operation requires (
forbidden), or signed in without having joined an organization yet (no_;organization getOnboardingand the invitation and organization operations under it work), or could not sign in (email_,unverified account_, andconflict domain_).not_ allowed not_is no longer returned to session tokens.invited access_: a signed-in person who is not approved for the beta yet. Every operation that takes a credential answers it to them, exceptnot_ approved getMeandjoinMyWaitlist; the problem carriesaccess(waitlistedornot_, and the email). Approved means a member of an organization, holding a pending invitation, or Legion; an API key always belongs to a member.requested oauth_: the caller sent an OAuth access token (token_ mcp_ only lgo_), which is accepted only bymcpMessageand the tool calls it dispatches. Every other operation answers it, whatever the token's scope. Use an API key or the Legion web app.org_: the caller's organization is suspended. Every operation that takes a credential answers it, by session or API key, exceptsuspended getMe(which showsorg.andsuspended_ at org.) and the support operations undersuspension_ reason /.v1/ support/ terms_: an approved caller who has not accepted the current version of the Terms of Use and the Acceptable Use Policy. Every operation that takes a credential answers it, exceptnot_ accepted getMe,acceptLegalDocuments,joinMyWaitlistand the wind-down operations (listRentals,stopRental,deleteRental,listHosts,updateListingwithlistedfalse,removeHost); the problem carrieslegal. An API key acts for the person who created it, so it is refused until that person accepts. Terminal operations also returnsession_(called with an API key) andrequired step_(neither a sign-in nor a step-up challenge within the step-up window).up_ required typestringRequiredURI reference identifying the problem type: the code's entry in the public error reference,
https:/. Branch on/ legion. ambient. xyz/ docs/ errors#<code> code, never ontype.titlestringRequiredstatusintegerRequiredcodestringRequiredStable machine-readable error code.
detailstringinstancestringThe request path that produced the problem.
resource_idstring (uuid)The resource a conflict refers to, when there is one (
egress_: the request already waiting;request_ exists export_: the pending workspace export).in_ progress accessMeAccessWhether a signed-in person may use Legion during the closed beta, decided on their verified email (case-insensitive):
approved(a member of an organization, holding a pending invitation, or Legion),waitlisted(on the waitlist, not approved yet) ornot_(not on the waitlist). Carried byrequested Me(alwaysapprovedfor a member) and by the problem of a 403access_, and ofnot_ approved getMe's 403no_.organization Child fields · 2
statestringRequiredone of: "approved", "waitlisted", "not_requested"
emailstring (email)RequiredThe verified email the state was decided on.
legalMeLegalThe caller's consent to Legion's legal documents.
requiredlists every document the consent step shows andacceptLegalDocumentstakes, at its current version.acceptedis true when the caller accepted the current version of everyagreedocument; while it is false, every operation exceptgetMe,acceptLegalDocuments,joinMyWaitlistand the wind-down operations (listing, stopping and deleting rentals; listing hosts, stopping new rentals on them and removing them) answers 403terms_.not_ accepted Child fields · 2
requiredarray of LegalDocumentRequiredChild fields · 6
keyLegalDocumentKeyRequiredA legal document:
terms(Terms of Use),acceptable_(Acceptable Use Policy),use privacy(Privacy Policy),data_(Data Handling).handling one of: "terms", "acceptable_use", "privacy", "data_handling"
versionstringRequiredThe current version. A new version of an
agreedocument must be accepted again.effectivestring (date)RequiredThe date the current version took effect.
titlestringRequiredurlstring (uri)RequiredThe document's public page.
acceptancestringRequiredagree: the person agrees to it, and the API is refused until the current version is accepted.acknowledge: the person confirms having read it, in the same step.one of: "agree", "acknowledge"
acceptedbooleanRequired
blocking_rentalsarray of HostRemovalBlockingRentalSorted by ID.
at most 1000 items
Child fields · 6
idstring (uuid)RequirednameFriendlyNameA host's or rental's friendly name: a lowercase DNS label that starts with a letter and does not end with a hyphen. Unique across all hosts and rentals and never reused. A host's is generated as adjective-noun (
amber-falcon) and can be changed by its owner; a rental's is generated as adjective-noun plus four base36 characters (quiet-river-7k2f) and never changes.2–63 characters · pattern ^[a-z][a-z0-9-]{0,61}[a-z0-9]$
stateRentalStateRequiredstarting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental'simage_isphase fetchingthe agent does not know it yet.running: the container runs. Billed per second.exited: the host reports the container is not running, for example after a crash; the host is restarting it. GPUs stay reserved. Not billed; returns torunningwhen the host reports it running again.stopping: stop requested, waiting for the agent. Not billed. Becomesstoppedwithout the agent once the host has been offline for 90 seconds.stopped: GPUs released, workspace kept on the host. GPU time is not billed. Storage is billed per GiB while the organization has credit, except for aninterruption_rental, which never stops with data.behavior: delete host_: the host stopped syncing. Not billed; returns tooffline runningwhen the host syncs again, and becomesfailedonce the host has not synced forHOST_(24 hours;).STALE_ AFTER deleting: delete requested, waiting for the agent. Not billed. Becomesdeletedwithout the agent once the host has been offline for 90 seconds.deleted: container and workspace removed. Final.failed: the agent could not start or keep running the container. GPUs released. The rental can only be deleted.one of: "starting", "running", "exited", "stopping", "stopped", "host_offline", "deleting", "deleted", "failed"
endablebooleanRequiredRemoving the host anyway (
removeHostwithforcetrue) would end it: it ishost_on a host that is offline, and not on a preservation hold. A rental that runs, or that the host still has to act on, is never endable.offline heldbooleanOn a preservation hold.
rented_by_youbooleanThe caller's own organization rented it, so the caller can open it (
getRental). Only fromremoveHost; absent means false.
stored_data_rentalsarray of HostStoredDataRental. Sorted by ID.
at most 1000 items
Child fields · 8
idstring (uuid)RequirednameFriendlyNameA host's or rental's friendly name: a lowercase DNS label that starts with a letter and does not end with a hyphen. Unique across all hosts and rentals and never reused. A host's is generated as adjective-noun (
amber-falcon) and can be changed by its owner; a rental's is generated as adjective-noun plus four base36 characters (quiet-river-7k2f) and never changes.2–63 characters · pattern ^[a-z][a-z0-9-]{0,61}[a-z0-9]$
stateRentalStateRequiredstarting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental'simage_isphase fetchingthe agent does not know it yet.running: the container runs. Billed per second.exited: the host reports the container is not running, for example after a crash; the host is restarting it. GPUs stay reserved. Not billed; returns torunningwhen the host reports it running again.stopping: stop requested, waiting for the agent. Not billed. Becomesstoppedwithout the agent once the host has been offline for 90 seconds.stopped: GPUs released, workspace kept on the host. GPU time is not billed. Storage is billed per GiB while the organization has credit, except for aninterruption_rental, which never stops with data.behavior: delete host_: the host stopped syncing. Not billed; returns tooffline runningwhen the host syncs again, and becomesfailedonce the host has not synced forHOST_(24 hours;).STALE_ AFTER deleting: delete requested, waiting for the agent. Not billed. Becomesdeletedwithout the agent once the host has been offline for 90 seconds.deleted: container and workspace removed. Final.failed: the agent could not start or keep running the container. GPUs released. The rental can only be deleted.one of: "starting", "running", "exited", "stopping", "stopped", "host_offline", "deleting", "deleted", "failed"
estimated_size_bytesinteger (int64)RequiredThe size of its files on the host; with
estimate_basis disk_an upper bound.share estimate_basisBackupEstimateBasisRequired. What a backup's quote was computed on.
disk_: the size the rental's host last reported its workspace uses (used disk_).used_ gib disk_: the host does not report it (a host whose disk quota is not enforced, for example not on XFS), so the quote is the rental's whole disk share (share resources.): an upper bound, "up to" this price, trued down to the real size when the backup is ready. Either way the charge never exceeds the quote: a backup larger than its estimate (a staledisk_ gib disk_) is charged the quote, not more.used_ gib one of: "disk_used", "disk_share"
delete_afterstring (date-time)When its files are deleted (its
delete_); absent while held.after backup_stateBackupStateIts renter's newest backup, when it has one.
rented_by_youbooleanThe caller's own organization rented it. Only on the public listener; absent means false.
available_untilstring (date-time). On 409
host_frommaintenance createRental(whatever the window's state), when the host's window starts. Nothing more about the window: its end and reason are only for the renters of rentals on the host.maintenanceMaintenanceSummary. On 409
host_frommaintenance startRentalof the renter's own rental, the window that keeps it stopped.Child fields · 4
startstring (date-time)RequiredWhen the window starts: the host's rentals stop then (after a 5-minute notice).
endstring (date-time)RequiredThe planned end. The provider may end the window earlier.
reasonMaintenanceReasonRequired. Why a provider takes a host down, shown to the renters of rentals on it. The list grows: accept a value you do not know.
one of: "hardware", "software", "network", "power", "facility", "other"
stateMaintenanceStateRequired.
scheduled(announced, renters told),closing(the last 5 minutes before the start: the penalty-free outcome is decided, nothing can start, rentals in their notice),active(the host is in maintenance, its rentals stopped),overrun(the planned end passed and the host has not synced back),completed,cancelled. The list grows: accept a value you do not know.one of: "scheduled", "closing", "active", "overrun", "completed", "cancelled"
test_switchAdminOrgTestSwitchChild fields · 5
test_orgbooleanRequiredallowedbooleanRequiredblocking_rentalsarray of AdminOrgTestBlockingRentalRequiredat most 100 items
Child fields · 7
idstring (uuid)RequirednameFriendlyNameA host's or rental's friendly name: a lowercase DNS label that starts with a letter and does not end with a hyphen. Unique across all hosts and rentals and never reused. A host's is generated as adjective-noun (
amber-falcon) and can be changed by its owner; a rental's is generated as adjective-noun plus four base36 characters (quiet-river-7k2f) and never changes.2–63 characters · pattern ^[a-z][a-z0-9-]{0,61}[a-z0-9]$
stateRentalStateRequiredstarting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental'simage_isphase fetchingthe agent does not know it yet.running: the container runs. Billed per second.exited: the host reports the container is not running, for example after a crash; the host is restarting it. GPUs stay reserved. Not billed; returns torunningwhen the host reports it running again.stopping: stop requested, waiting for the agent. Not billed. Becomesstoppedwithout the agent once the host has been offline for 90 seconds.stopped: GPUs released, workspace kept on the host. GPU time is not billed. Storage is billed per GiB while the organization has credit, except for aninterruption_rental, which never stops with data.behavior: delete host_: the host stopped syncing. Not billed; returns tooffline runningwhen the host syncs again, and becomesfailedonce the host has not synced forHOST_(24 hours;).STALE_ AFTER deleting: delete requested, waiting for the agent. Not billed. Becomesdeletedwithout the agent once the host has been offline for 90 seconds.deleted: container and workspace removed. Final.failed: the agent could not start or keep running the container. GPUs released. The rental can only be deleted.one of: "starting", "running", "exited", "stopping", "stopped", "host_offline", "deleting", "deleted", "failed"
renter_orgOrgRequiredChild fields · 2
idstring (uuid)RequirednamestringRequired
provider_orgOrgRequiredChild fields · 2
idstring (uuid)RequirednamestringRequired
host_idstring (uuid)Requiredhost_nameFriendlyNameA host's or rental's friendly name: a lowercase DNS label that starts with a letter and does not end with a hyphen. Unique across all hosts and rentals and never reused. A host's is generated as adjective-noun (
amber-falcon) and can be changed by its owner; a rental's is generated as adjective-noun plus four base36 characters (quiet-river-7k2f) and never changes.2–63 characters · pattern ^[a-z][a-z0-9-]{0,61}[a-z0-9]$
blocking_rental_countintegerRequiredat least 0
unpaid_earningsMoneyRequiredChild fields · 2
amount_minorinteger (int64)RequiredAmount in minor units (cents for USD).
at least 0
currencyMoneyCurrencyRequiredISO 4217 currency code. Only USD is supported.
one of: "USD"
current_price_per_gpu_hourMoneyThe host's price per GPU-hour now, on 409
price_fromchanged createRental, the price a bid would win now on 409bid_, or the floor on 409too_ low bid_; all-in, as the renter sees prices.below_ floor Child fields · 2
amount_minorinteger (int64)RequiredAmount in minor units (cents for USD).
at least 0
currencyMoneyCurrencyRequiredISO 4217 currency code. Only USD is supported.
one of: "USD"
next_available_atstring (date-time)When the action is allowed again, on 429
benchmark_fromrequest_ limited requestHostBenchmark.reasonPromoIneligibleReasonWhy the organization may not redeem the promo code, on 403
promo_.code_ not_ eligible registryRegistrySignInRegistry. The registry a sign-in would be for, on 422
image_of an image on a registry Legion takes sign-ins for (offer to add one withprivate putRegistrySignIn), and on 422registry_(the sign-in the registry refused). Only ever one of these four;sign_ in_ rejected registry_names any host.host registry_hoststring. The registry host a credential is or would be for: on 422
image_(offer to add one withprivate createRegistryCredential),registry_,sign_ in_ rejected registry_, and the refusals of a registry (credential_ rejected registry_,ecr_ unsupported registry_,auth_ unsupported registry_,host_ not_ allowed registry_).realm_ not_ allowed at most 253 characters
registry_credential_idstring (uuid). The credential the registry refused, on 422
registry_.sign_ in_ rejected registry_credential_rentalsarray of RegistryCredentialRental. The rentals that still use a registry credential, on 409
registry_fromcredential_ in_ use deleteRegistryCredentialanddeleteRegistrySignIn. Oldest first.at most 100 items
Child fields · 3
idstring (uuid)RequirednamestringRequiredstateRentalStateRequiredstarting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental'simage_isphase fetchingthe agent does not know it yet.running: the container runs. Billed per second.exited: the host reports the container is not running, for example after a crash; the host is restarting it. GPUs stay reserved. Not billed; returns torunningwhen the host reports it running again.stopping: stop requested, waiting for the agent. Not billed. Becomesstoppedwithout the agent once the host has been offline for 90 seconds.stopped: GPUs released, workspace kept on the host. GPU time is not billed. Storage is billed per GiB while the organization has credit, except for aninterruption_rental, which never stops with data.behavior: delete host_: the host stopped syncing. Not billed; returns tooffline runningwhen the host syncs again, and becomesfailedonce the host has not synced forHOST_(24 hours;).STALE_ AFTER deleting: delete requested, waiting for the agent. Not billed. Becomesdeletedwithout the agent once the host has been offline for 90 seconds.deleted: container and workspace removed. Final.failed: the agent could not start or keep running the container. GPUs released. The rental can only be deleted.one of: "starting", "running", "exited", "stopping", "stopped", "host_offline", "deleting", "deleted", "failed"
invited_emailstring. The address an invitation is for, masked (
g•••y@example.), on 403com invitation_fromfor_ another_ account getMyInvitation.at most 320 characters
500An unexpected server error. Safe to retry.An unexpected server error. Safe to retry.
typestringRequiredURI reference identifying the problem type.
titlestringRequiredstatusintegerRequiredcodestringRequiredStable machine-readable error code.
detailstringinstancestringThe request path that produced the problem.
Errors
| Status | Code |
|---|---|
| 403 | no_organization |
Every operation can also answer the general codes on the errors page.