Get a service
API keyOne service with its status, replica counts, cold-start time and this month's spend, plus (on this read only) its keys (keys), live and warm replicas (replica_) and a 24-hour usage summary (usage). Another organization's service is 404. Needs services..
Send an API key as Authorization: Bearer lgn_…. Authentication
https://api.legion.ambient.xyz/v1/services/{service_id}curl -s "https://api.legion.ambient.xyz/v1/services/$SERVICE_ID" \
-H "Authorization: Bearer $LEGION_API_KEY"{
"id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
"name": "string",
"mode": "rental",
"url": "string",
"protocol": "openai",
"target": {
"mode": "rental",
"rental_id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
"port": 0,
"template": {
"catalog_id": "string",
"image": "string",
"port": 0,
"model": "string",
"health_path": "string",
"registry_credential_id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
"env": [
{
"name": "HF_TOKEN",
"secret": false,
"value": "string"
}
],
"model_settings": {},
"command": [
"string"
],
"args": [
"string"
]
},
"hardware": {
"strategy": "cheapest_fit",
"max_price_per_replica_hour": {
"amount_minor": 250,
"currency": "USD"
},
"gpu_models": [
"string"
],
"tier": "on_demand",
"placement": "own_hosts",
"min_gpu_memory_gb": 1,
"gpu_counts": [
1
]
},
"scaling": {
"min_replicas": 0,
"max_replicas": 0,
"scale_to_zero": false,
"idle_timeout_seconds": 0,
"scale_down_delay_seconds": 0,
"warm_replicas": 0,
"target_concurrency": 0,
"max_concurrency": 0,
"queue_wait_threshold_ms": 0,
"request_timeout_seconds": 0
}
},
"access": {
"mode": "public",
"sources": [
"203.0.113.0/24"
]
},
"state": "active",
"status": "ready",
"status_reason": "string",
"monthly_spend_cap": {
"amount_minor": 250,
"currency": "USD"
},
"spend_this_month": {
"month": "2026-11",
"estimated": {
"amount_minor": 250,
"currency": "USD"
},
"cap": {
"amount_minor": 250,
"currency": "USD"
},
"alerted_pct": 0
},
"replicas": {
"ready": 0,
"provisioning": 0,
"draining": 0,
"warm": 0,
"desired": 0
},
"cold_start_seconds": 0,
"last_request_at": "2026-10-15T12:00:00Z",
"created_at": "2026-10-15T12:00:00Z",
"created_by": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
"revision": 0,
"replica_web_terminal": {
"enabled": false,
"access": "organization"
},
"keys": [
{
"id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
"kind": "service",
"name": "string",
"prefix": "string",
"status": "active",
"created_at": "2026-10-15T12:00:00Z",
"created_by": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
"expires_at": "2026-10-15T12:00:00Z",
"last_used_at": "2026-10-15T12:00:00Z",
"revoked_at": "2026-10-15T12:00:00Z",
"rate_limit_per_minute": 0,
"direct_url": "string"
}
],
"replica_list": [
{
"rental_id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
"rental_name": "string",
"phase": "active",
"rental_state": "string",
"ready": false,
"ready_at": "2026-10-15T12:00:00Z",
"host": {
"name": "string",
"country": "string",
"gpu_model": "string"
},
"gpu_count": 0,
"price_per_gpu_hour": {
"amount_minor": 250,
"currency": "USD"
},
"tier": "on_demand",
"in_flight": 0,
"created_at": "2026-10-15T12:00:00Z",
"retire_reason": "string",
"current_template": false,
"startup": {
"steps": [
{
"started_at": "2026-10-15T12:00:00Z",
"ended_at": "2026-10-15T12:00:00Z",
"reason": "string",
"detail": "string"
}
]
},
"failure": {
"reason": "string",
"message": "string",
"reported_at": "2026-10-15T12:00:00Z"
}
}
],
"startup": {
"steps": [
{
"step": "finding_host",
"state": "done",
"started_at": "2026-10-15T12:00:00Z",
"ended_at": "2026-10-15T12:00:00Z",
"progress": {
"done_bytes": 0,
"total_bytes": 0,
"bytes_per_second": 0,
"eta_seconds": 0,
"fraction": 0,
"reported_at": "2026-10-15T12:00:00Z"
},
"reason": "string",
"detail": "string",
"facts": {
"gpu_model": "string",
"gpu_count": 1,
"price_per_gpu_hour": {
"amount_minor": 250
},
"country": "string",
"hosts_checked": 0,
"hosts_busy": 0,
"hosts_over_price": 0,
"cached": false,
"items_done": 0,
"items_total": 0,
"load_fraction": 0,
"gpu_memory_used_bytes": 0,
"gpu_memory_total_bytes": 0,
"kv_cache_bytes": 0,
"compile_fraction": 0,
"health_path": "string",
"attempts": 0,
"last_status_code": 0,
"latency_ms": 0
}
}
]
},
"usage": {
"requests_24h": 0,
"errors_24h": 0,
"replica_seconds_24h": 0
}
}Example values.
Path parameters
service_idstring (uuid)Required
Responses
200The service.The service.
idstring (uuid)RequirednamestringRequiredThe service's name, unique within the organization; the start of the URL's label: https://<name>-<suffix>.ambi.run. A service made for a serve rental or an exposed port keeps that hostname as its address, which has no suffix.
modeServiceModeRequiredHow a service runs.
rental("On a rental"): a port on one of your rentals, one replica, your machine.autoscaled("Autoscaled"): Legion rents GPUs and runs 0 to N replicas with traffic (serverless: scales to zero when idle). Whether a service serves a model is said bytarget.andtemplate catalog_, not by the mode.id one of: "rental", "autoscaled"
urlstringRequiredhttps://<name>-<suffix>.ambi.run: the name and a random 4-character suffix drawn at creation, fixed for the service's life (the label is at most 63 characters, the name cut if needed). Use it as given; do not build it from the name. For openai the base URL is this plus /v1.
protocolServiceProtocolRequiredopenai: an OpenAI-compatible API under/(adds the quickstart, the model check and model-aware readiness).v1/ http: any HTTP service.one of: "openai", "http"
targetServiceTargetRequiredChild fields · 6
modeServiceModeRequiredHow a service runs.
rental("On a rental"): a port on one of your rentals, one replica, your machine.autoscaled("Autoscaled"): Legion rents GPUs and runs 0 to N replicas with traffic (serverless: scales to zero when idle). Whether a service serves a model is said bytarget.andtemplate catalog_, not by the mode.id one of: "rental", "autoscaled"
rental_idstring (uuid)Mode rental: the rental.
portintegerMode rental: the rental's port.
templateServiceTemplateChild fields · 10
catalog_idstringmay be null
imagestringRequiredportintegerRequiredmodelstringRequiredhealth_pathstringRequiredregistry_credential_idstring (uuid). The registry credential an own private image is read with: resolved when the service is created or its image changes, and used by every replica, so replicas never switch credentials. Absent for a catalog model and for a public image.
may be null
envarray of EnvVar. Each replica container's environment variables, secrets without their values. Absent when there are none.
Child fields · 3
namestringRequiredsecretbooleanRequiredvaluestringThe value; absent when
secretis true.
model_settingsModelSettings. The model settings set on the template; absent when none are.
commandCommandOverride. The entrypoint override; absent when the image's is used.
argsCommandOverride. The CMD override; absent when the image's is used.
hardwareServiceHardwareCheapest that fits (decisions 40 to 46): for each replica the autoscaler evaluates every eligible offer and every GPU count the model can split across (powers of two up to 8, at least the catalog entry's min_gpus), keeps the configurations the catalog fit check accepts and rents the cheapest total price per hour; ties go to the host with the higher Legion score. Every field is an optional constraint. Replicas may differ in hardware; a replacement re-runs the choice.
Child fields · 7
strategystringone of: "cheapest_fit"
max_price_per_replica_hourMoneyThe most one replica may cost an hour, all GPUs together, all-in. No replica starts above it; for interruptible it is also the bid, per GPU-hour each GPU's share (rounded down). Changed by updateService, it applies in place: no replica rolls, the next placement uses it, and each interruptible replica's bid moves to its share of the new ceiling at once, within the rental bid rules (at least the host's interruptible floor, at most its on-demand price, not under a preemption notice, a few changes an hour); a bid those rules refuse keeps its old value.
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"
gpu_modelsarray of stringOnly these GPU models (unordered: price decides). Absent: any.
at most 16 items
tierRentalTierThe kind of rental.
on_: the host'sdemand price_; never stopped for another rental.per_ gpu_ hour interruptible: a bid on the host's spot auction, above the host's floorinterruptible_, on GPUs no on-demand rental needs: an on-demand rental on the same host that needs its GPUs stops it, with the stop of the container (after a 5-minute notice,price_ per_ gpu_ hour preempt_, on hosts whose agent supports it; the notice is also written toat /), and it endsworkspace/ . legion/ preemption. json stoppedwithstop_reason preemptedand its workspace kept (billed as storage, and started again by itself withauto_), or deleted when it choseresume interruption_behavior delete. The on-demand price is fixed for the rental. An interruptible rental is a bid on the host's spot auction: it pays the clearing price, which moves every 2 minutes between the host's floor and the rental'smax_, and a higher bid can also stop it (price_ per_ gpu_ hour stop_reason outbid) with the same notice.one of: "on_demand", "interruptible"
placementServicePlacementWhere replicas run.
eligible_(the default), any host passing the service eligibility floor;hosts own_, only the organization's own hosts. A host can see the traffic it serves.hosts one of: "own_hosts", "eligible_hosts"
min_gpu_memory_gbnumberOwn images: the GPU memory one replica needs, all GPUs together.
1–2000
gpu_countsarray of integerOwn images: the GPU counts the model can run on (tensor parallel). Default 1, 2, 4, 8.
at most 4 items
scalingServiceScalingChild fields · 10
min_replicasintegerRequiredmax_replicasintegerRequiredscale_to_zerobooleanRequiredidle_timeout_secondsintegerRequiredscale_down_delay_secondsintegerRequiredwarm_replicasintegerRequiredtarget_concurrencyintegerRequiredmax_concurrencyintegerRequiredqueue_wait_threshold_msintegerRequiredrequest_timeout_secondsintegerRequired
accessServiceAccessRequiredpublic: anyone (withinsources) reaches the URL; the router limits requests per address.keys: callers sendAuthorization: Bearer lek_; Legion checks the key and it never reaches the host. Keys can be created while public, so switching to keys needs no downtime.. . . sources(CIDR ranges; empty for anyone) apply with either mode.Child fields · 2
modeServiceAccessModeRequiredone of: "public", "keys"
sourcesarray of stringat most 16 items
stateServiceStateRequiredWhat was decided.
cappedis set by the autoscaler when the monthly cap is reached.one of: "active", "paused", "capped", "deleting", "deleted"
statusServiceStatusRequiredWhat is happening, first match wins:
deleting,disabled(Legion took it down),paused,capped,suspended(the organization is),no_,credit scaled_,to_ zero waiting_(no host of the chosen GPU types fits the price ceiling now),for_ gpus starting(a replica is starting and none is ready),degraded(status_says why, for examplereason start_),failures scaling,ready. A service in moderentalfollows its rental:starting,ready, orstoppedwhile the rental is not running.one of: "ready", "scaling", "starting", "scaled_to_zero", "waiting_for_gpus", "degraded", "no_credit", "suspended", "capped", "paused", "disabled", "deleting", "stopped"
status_reasonstringRequiredmay be null
monthly_spend_capMoneyRequiredRequired with mode autoscaled; optional for a rental.
may be null
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"
spend_this_monthServiceSpendRequiredChild fields · 4
monthstringRequiredThe UTC month, YYYY-MM.
estimatedMoneyRequiredGPU time of the replicas this month at their all-in prices, the figure the cap is enforced on.
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"
capMoneyRequiredThe monthly spend cap; null on a service in mode
rentalwithout one.may be null
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"
alerted_pctintegerRequiredThe highest cap alert sent this month. Alerts go to owners and the creator at the fixed thresholds 50, 80 and 100 percent.
one of: 0, 50, 80, 100
replicasServiceReplicaCountsRequiredChild fields · 5
readyintegerRequiredReplicas the router sends requests to.
provisioningintegerRequiredReplicas starting or loading.
drainingintegerRequiredwarmintegerRequiredStopped replicas kept for a fast restart.
desiredintegerRequiredWhat the autoscaler last decided.
cold_start_secondsintegerRequiredThe median time a replica took to become ready; null before one did.
may be null
last_request_atstring (date-time)Requiredmay be null
created_atstring (date-time)Requiredcreated_bystring (uuid)Requiredmay be null
revisioninteger (int64)RequiredBumped on every change; send it back as
revisionto update safely.replica_web_terminalServiceReplicaWebTerminalRequired. The Legion web terminal on the service's replicas, an autoscaled service's setting (a service in mode
rentalruns on a rental with its ownweb_andterminal terminal_, and this does not change them). Each replica is a rental withaccess web_=terminal enabledandterminal_=access access, created by the service's creator; its rental read names the service (service_,id service_,name service_). Off by default.managed Child fields · 2
enabledbooleanRequiredWhether replicas allow the web terminal. A change applies to the replicas started after it; a live or warm replica keeps the web terminal it was created with until it is replaced (a rental's
web_is fixed at creation), and a warm replica restarted keeps its own.terminal accessTerminalAccessRequiredWho may open a replica's web terminal:
organization(the default) orcreator_(the service's creator and the organization's owners). A change applies at once to every live and warm replica, and to every replica after.and_ owners
keysarray of ServiceKeyOn getService only: the keys, as listServiceKeys' first page.
Child fields · 12
idstring (uuid)RequiredkindServiceKeyKindRequiredservice, anlek_key.legacy_, thedirect lsk_key of a public model rental from before services; revoking it switches the service's access to keys.one of: "service", "legacy_direct"
namestringRequiredprefixstringRequiredThe first 12 characters,
lek_and 8 more (lsk_for a legacy direct key). Display only.statusServiceKeyStatusRequiredone of: "active", "expired", "revoked"
created_atstring (date-time)Requiredcreated_bystring (uuid)Requiredmay be null
expires_atstring (date-time)Requiredmay be null
last_used_atstring (date-time)RequiredUpdated at most once a minute.
may be null
revoked_atstring (date-time)Requiredmay be null
rate_limit_per_minuteintegerRequiredmay be null
direct_urlstringRequiredThe direct address a legacy direct key opens.
may be null
replica_listarray of ServiceReplicaOn getService only: live and warm replicas.
Child fields · 16
rental_idstring (uuid)Requiredrental_namestringRequiredmay be null
phaseServiceReplicaPhaseRequiredone of: "active", "draining", "warm", "retired"
rental_statestringRequiredreadybooleanRequiredThe router's health probe passed in the last 15 seconds.
ready_atstring (date-time)Requiredmay be null
hostServiceReplicaHostRequiredChild fields · 3
namestringRequiredmay be null
countrystringRequiredmay be null
gpu_modelstringRequired
gpu_countintegerRequiredprice_per_gpu_hourMoneyRequiredChild 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"
tierRentalTierRequiredThe kind of rental.
on_: the host'sdemand price_; never stopped for another rental.per_ gpu_ hour interruptible: a bid on the host's spot auction, above the host's floorinterruptible_, on GPUs no on-demand rental needs: an on-demand rental on the same host that needs its GPUs stops it, with the stop of the container (after a 5-minute notice,price_ per_ gpu_ hour preempt_, on hosts whose agent supports it; the notice is also written toat /), and it endsworkspace/ . legion/ preemption. json stoppedwithstop_reason preemptedand its workspace kept (billed as storage, and started again by itself withauto_), or deleted when it choseresume interruption_behavior delete. The on-demand price is fixed for the rental. An interruptible rental is a bid on the host's spot auction: it pays the clearing price, which moves every 2 minutes between the host's floor and the rental'smax_, and a higher bid can also stop it (price_ per_ gpu_ hour stop_reason outbid) with the same notice.one of: "on_demand", "interruptible"
in_flightintegerRequests in flight, as the router last reported.
created_atstring (date-time)Requiredretire_reasonstringRequiredmay be null
current_templatebooleanRequiredFalse while a rolling change has not replaced this replica yet.
startupStartup. How far the replica's start has come: its rental's steps, after
finding_(done when the replica was placed), andhost receiving_once the router's health probe passed (traffic ready_). Absent for a replica whose rental has no recorded steps (created before).at Child fields · 1
stepsarray of StartupStepRequiredat most 12 items
Child fields · 8
stepStartupStepNameRequired. A step of a start, in order.
finding_: an autoscaled service looks for a host with free GPUs (services only).host reserving_: Legion reserves the GPUs on the chosen host (done when the rental is created or started; itsgpu factssay which GPUs, where and at what price).preparing_: Legion's mirror copies the image in (image image_phase fetching).pulling_: the host pulls the image.image starting_: the container is created and started.container downloading_: the model service downloads the model's weights (a Legion model image, the first time).weights loading_: it loads the model onto the GPUs.model warming_: the model is in GPU memory and the server prepares it for this GPU (compiling, capturing CUDA graphs).up health_: the model is loaded and the service is asked the way a client would (OpenAIcheck GET /listing the model, ComfyUIv1/ models GET /, or the service's health path) until it answers.system_ stats ready: the rental runs, and a model service answered its health check.receiving_: the service's router sends the replica requests (services only). The list may grow: show a name you do not know as it is.traffic one of: "finding_host", "reserving_gpu", "preparing_image", "pulling_image", "starting_container", "downloading_weights", "loading_model", "warming_up", "health_check", "ready", "receiving_traffic"
stateStartupStepStateRequiredone of: "done", "current", "next", "failed"
started_atstring (date-time)When the step began; absent for a step that is
next, and for afinding_whose start Legion did not record.host ended_atstring (date-time)When the step ended (
doneorfailed).progressStartupProgress. How far a pull or a download is, as the host's agent last reported it (
startup_). Every figure is absent when it is not known;progress_ v1 eta_is the bytes left over the current rate.seconds Child fields · 6
done_bytesinteger (int64)at least 0
total_bytesinteger (int64)at least 0
bytes_per_secondinteger (int64)at least 0
eta_secondsinteger (int64)at least 0
fractionnumber (double)The share done, from the bytes or from the agent's own share.
0–1
reported_atstring (date-time)When the agent last reported these figures.
reasonstringOn a
currentfinding_: why no host was found yet,host waiting_(no offer has the free GPUs the service needs) or another code. Showfor_ gpus detailfor a code you do not know.detailstringWith
reason: the same in plain words, for example how many offers did not fit and why.factsStartupFacts. What is known about a step beyond its time and progress. Every field is optional and only on the steps it belongs to; an older agent reports fewer of them.
Child fields · 20
gpu_modelstringfinding_(done),host reserving_: the GPU model chosen.gpu gpu_countintegerat least 1
price_per_gpu_hourMoneymax_price_per_gpu_hourMoneyfinding_(current): the most the service pays per GPU-hour, when it has a limit.host countrystringThe host's country (ISO 3166-1 alpha-2), as offers show it.
hosts_checkedintegerfinding_(current): offers of the service's GPU class looked at by the last placement.host at least 0
hosts_busyintegerOf those, how many had too few free GPUs.
at least 0
hosts_over_priceintegerOf those, how many cost more than the service's limit.
at least 0
cachedbooleanpulling_: the image was already on the host;image downloading_: the weights were already on its disk.weights items_doneintegerpulling_: layers done;image downloading_: files done.weights at least 0
items_totalintegerat least 0
load_fractionnumber (double)loading_: the share of the weights in GPU memory.model 0–1
gpu_memory_used_bytesinteger (int64)loading_: GPU memory the model holds.model at least 0
gpu_memory_total_bytesinteger (int64)The memory of the rental's GPUs.
at least 0
kv_cache_bytesinteger (int64)loading_: the KV cache the server allocated.model at least 0
compile_fractionnumber (double)warming_: how far compiling or graph capture is, when the server says.up 0–1
health_pathstringhealth_: the path asked, for examplecheck /.v1/ models attemptsintegerhealth_: checks made so far.check at least 0
last_status_codeintegerhealth_: the last answer's HTTP status; 0 when it did not answer.check 0–599
latency_msintegerhealth_: how long the last answer took.check at least 0
failureServeFailure. Why the replica's model service last failed, when its host's agent said; also on a retired replica.
Child fields · 3
reasonstringRequiredA short code:
gpu_(the GPU did not have the memory the model needs, for example because something outside Legion uses it),memory_ insufficient disk_,full download_,failed invalid_,setting server_,exited container_, or another code a newer agent sends. Showfailed messagefor a code you do not know.messagestringRequiredOne sentence in plain words, for example
The model needs 21.; may be empty.6 GiB of GPU memory; 5. 2 GiB is free. reported_atstring (date-time)RequiredWhen the agent first reported this failure.
startupStartup. On getService only, while an autoscaled service places or starts a replica (
statusstarting,waiting_orfor_ gpus scaling): while it waits for GPUs,finding_current with the last placement's numbers (host facts.,hosts_ checked hosts_,busy hosts_,over_ price detail); else the steps of the starting replica that is furthest behind. Absent otherwise; each replica carries its own onreplica_.list Child fields · 1
stepsarray of StartupStepRequiredat most 12 items
Child fields · 8
stepStartupStepNameRequired. A step of a start, in order.
finding_: an autoscaled service looks for a host with free GPUs (services only).host reserving_: Legion reserves the GPUs on the chosen host (done when the rental is created or started; itsgpu factssay which GPUs, where and at what price).preparing_: Legion's mirror copies the image in (image image_phase fetching).pulling_: the host pulls the image.image starting_: the container is created and started.container downloading_: the model service downloads the model's weights (a Legion model image, the first time).weights loading_: it loads the model onto the GPUs.model warming_: the model is in GPU memory and the server prepares it for this GPU (compiling, capturing CUDA graphs).up health_: the model is loaded and the service is asked the way a client would (OpenAIcheck GET /listing the model, ComfyUIv1/ models GET /, or the service's health path) until it answers.system_ stats ready: the rental runs, and a model service answered its health check.receiving_: the service's router sends the replica requests (services only). The list may grow: show a name you do not know as it is.traffic one of: "finding_host", "reserving_gpu", "preparing_image", "pulling_image", "starting_container", "downloading_weights", "loading_model", "warming_up", "health_check", "ready", "receiving_traffic"
stateStartupStepStateRequiredone of: "done", "current", "next", "failed"
started_atstring (date-time)When the step began; absent for a step that is
next, and for afinding_whose start Legion did not record.host ended_atstring (date-time)When the step ended (
doneorfailed).progressStartupProgress. How far a pull or a download is, as the host's agent last reported it (
startup_). Every figure is absent when it is not known;progress_ v1 eta_is the bytes left over the current rate.seconds Child fields · 6
done_bytesinteger (int64)at least 0
total_bytesinteger (int64)at least 0
bytes_per_secondinteger (int64)at least 0
eta_secondsinteger (int64)at least 0
fractionnumber (double)The share done, from the bytes or from the agent's own share.
0–1
reported_atstring (date-time)When the agent last reported these figures.
reasonstringOn a
currentfinding_: why no host was found yet,host waiting_(no offer has the free GPUs the service needs) or another code. Showfor_ gpus detailfor a code you do not know.detailstringWith
reason: the same in plain words, for example how many offers did not fit and why.factsStartupFacts. What is known about a step beyond its time and progress. Every field is optional and only on the steps it belongs to; an older agent reports fewer of them.
Child fields · 20
gpu_modelstringfinding_(done),host reserving_: the GPU model chosen.gpu gpu_countintegerat least 1
price_per_gpu_hourMoneyChild 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"
max_price_per_gpu_hourMoneyfinding_(current): the most the service pays per GPU-hour, when it has a limit.host 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"
countrystringThe host's country (ISO 3166-1 alpha-2), as offers show it.
hosts_checkedintegerfinding_(current): offers of the service's GPU class looked at by the last placement.host at least 0
hosts_busyintegerOf those, how many had too few free GPUs.
at least 0
hosts_over_priceintegerOf those, how many cost more than the service's limit.
at least 0
cachedbooleanpulling_: the image was already on the host;image downloading_: the weights were already on its disk.weights items_doneintegerpulling_: layers done;image downloading_: files done.weights at least 0
items_totalintegerat least 0
load_fractionnumber (double)loading_: the share of the weights in GPU memory.model 0–1
gpu_memory_used_bytesinteger (int64)loading_: GPU memory the model holds.model at least 0
gpu_memory_total_bytesinteger (int64)The memory of the rental's GPUs.
at least 0
kv_cache_bytesinteger (int64)loading_: the KV cache the server allocated.model at least 0
compile_fractionnumber (double)warming_: how far compiling or graph capture is, when the server says.up 0–1
health_pathstringhealth_: the path asked, for examplecheck /.v1/ models attemptsintegerhealth_: checks made so far.check at least 0
last_status_codeintegerhealth_: the last answer's HTTP status; 0 when it did not answer.check 0–599
latency_msintegerhealth_: how long the last answer took.check at least 0
usageServiceUsageSummaryChild fields · 3
requests_24hinteger (int64)Requirederrors_24hinteger (int64)Requiredreplica_seconds_24hinteger (int64)Required
400The request is malformed or fails validation. An image reference that is not a container image reference answers `invalid_image_reference`.The request is malformed or fails validation. An image reference that is not a container image reference answers
invalid_.image_ reference 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
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
404The resource does not exist or belongs to another organization.The resource does not exist or belongs to another organization.
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.