Skip to content

Rent GPUs on a host

API keyIdempotent

Allocates gpu_count GPUs on the host at the host's current price and asks its agent to start the container. The price is fixed for the life of the rental. Requires the organization to have credit, as last reported by billing.

Before anything is allocated the image is checked in its registry, as inspectImage does, and refused with a plain message if it cannot run on the host. The rental is pinned to the digest the image's tag resolves to at that moment (image_digest), and the agent pulls that digest, so a tag that moves afterwards cannot change what runs. image stays as the renter wrote it.

**The mirror.** The agent pulls the image through Legion's own registry, which mirrors the public registries docker.io, ghcr.io, nvcr.io and quay.io: DesiredRental.image is registry.legion.ambient.xyz/<upstream>/<path>@<digest>, never a reference on an upstream. The image is checked on its upstream first and refused, before the mirror copies anything, with 422 registry_not_supported (any other registry; detail lists the supported upstreams), 422 image_not_allowed (a namespace Legion never mirrors), 422 image_not_found (missing upstream, or private), 422 image_too_large (more than the mirror's cap over every platform) or 429 mirror_quota_exceeded (too many different tags or digests of one repository today; Retry-After is the time to midnight UTC). Nothing is allocated. Private images are out of scope: an image that is private on its registry cannot be mirrored.

**The rental never waits for the mirror.** Copying a large image into Legion's registry for the first time can take many minutes, so the rental is created at once, in starting with the GPUs allocated, and image_phase is fetching. A background worker has the mirror copy the image in, retrying with backoff when the upstream rate limits; the host's agent is told about the rental only when image_phase becomes ready. If the image has not arrived two hours after the rental was created, the rental becomes failed with a failure_reason that names the image. Poll getRental to follow it.

Retrying with the same Idempotency-Key and body returns the original rental without checking the image again. Reusing a key with a different body is rejected with 422.

The rental's outbound network mode is set here: the organization's own (audit or enforce), else enforce while the platform's enforcement of new rentals is on, else the platform's default. When that is enforce, a host whose agent cannot enforce the allow-list is refused with 409 host_unsupported.

**Catalog entries.** A rental of a catalog entry (the one serve.catalog_id names, else the listed entry whose reference is image) is refused before anything is written with 409 catalog_entry_incompatible when gpu_count GPUs of the host cannot run it: the checks of listCatalog with host_id, the model's serve.min_vram_gb counted over gpu_count GPUs. detail says every reason.

**Disk.** The rental's disk share is 95% of the host's disk times gpu_count / gpu_count of the host, rounded down; the other 5% is room for what stopped rentals keep.

**Tiers and preemption.** tier picks the price: on_demand (the default) the host's price_per_gpu_hour, interruptible the host's spot auction, whose floor is its interruptible_price_per_gpu_hour (409 tier_unavailable when it has none; see below). An on-demand rental that needs more GPUs than are free takes the rest from the host's interruptible rentals (gpus_interruptible on the offer): the fewest rentals that cover the shortfall, the youngest first among equals. Each one stops (stopping, then stopped, with stop_reason preempted) and its members get an email. What is left of its data depends on its interruption_behavior (keep: the workspace stays; delete: it is deleted), and its container stops at preempt_at: at once, or after a 5-minute notice when the host's agent supports it (below). The new rental is starting until every one of them has stopped on the host, and is billed only once it runs. If they have not all stopped 7 minutes after the preemption, the new rental fails instead (failure_reason says the GPUs weren't released in time; it was never billed). When even all of them would not cover it, nothing changes and the request is refused with 409 gpus_unavailable. A replay with the same Idempotency-Key preempts nothing.

**What preemption does to the data, and the notice.** interruption_behavior (interruptible only; 400 interruption_behavior_not_allowed with on_demand) is keep by default, today's behavior, or delete: Legion then deletes a preempted rental as soon as its agent confirms it stopped, and the workspace is never billed. A preempted keep rental starts again by itself when GPUs on its host are free within 72 hours of the stop; after that its files are deleted (auto_resume, on by default; updateRental turns it off;). A host whose agent advertised preemption_notice_v1 gives the victim 300 seconds (5 minutes) before its container is stopped (preempt_at); the new rental still waits until the victim has stopped, and the 7 minutes above still bound the wait. Every rental on the host that is not yet deleted keeps its share, except that a stopped or failed one counts only the disk its agent reports it uses (RentalReport.disk_used_gib, at most its share), so a host whose free disk is less than the new share is refused with 409 host_disk_full, even with enough free GPUs. Offer.gpus_free already counts it.

**Automatic backup on interruption.** auto_backup ({"retention_days": 7} or 30) asks Legion to back the workspace up by itself each time an interruptible rental that keeps its data (interruption_behavior keep) is stopped by Legion: preempted, outbid, or stopped because its organization ran out of credit. It is off unless set (getStoragePolicy's auto_backup_default_retention_days says what a rental that names none gets; absent there means off), and null is off. Any other rental is 400 auto_backup_not_applicable. Each automatic backup is an ordinary backup (createRentalBackup), started once the container has stopped: the same quote, charged when it starts at $0.05 per GiB-month of storage for the retention plus one download at $0.12 per GiB, on the size the host last measured or, when unmeasured, up to the whole resources.disk_gib (trued down when it is ready). It never delays the preemption, its notice or the hand-over of the GPUs. It is skipped, never retried later, when the organization has no credit or the balance does not cover the quote, when it would not finish in 12 hours (backup_too_slow), when a backup or download of the rental is already running, when the host stays offline, or when an automatic backup of the rental started less than 6 hours before (recent_backup); the rental's auto_backup.last_skipped_reason says why, the stop email says so, and rental.auto_backup_skipped is emitted. Each automatic backup is charged on its own. While one runs the rental does not start again: auto_resume, and a waiting bid's place in the spot auction, wait for it to be ready (or cancel it with cancelBackup). Change it with updateRental. Part of the Idempotency-Key body only when set.

**Price cap.** The host's price can change between reading an offer and renting it. Send the price you showed the user as max_price_per_gpu_hour: if the host's price is higher when the GPUs are allocated, nothing is allocated, the image is not checked, and the answer is 409 price_changed with the host's price in current_price_per_gpu_hour.

**Spot auction.** Each host is its own spot market for the GPUs its on-demand rentals do not hold. For an interruptible rental max_price_per_gpu_hour is the rental's bid: the most it pays per GPU-hour (its limit). Without it the limit is the host's floor (interruptible_price_per_gpu_hour); a limit under the floor is 409 price_changed with the floor in current_price_per_gpu_hour. A create on the organization's own host is own use, not a bid (below). The create takes part in a clearing of the host at once, with the host's other bids: the running, starting and waiting interruptible rentals (those stopped with stop_reason preempted or outbid and auto_resume). Bids are ranked by limit, then the earlier bid (when the limit was last raised, or the rental created), and whole bids are allocated in that order; one that does not fit is skipped. A new bid takes the GPUs of a lower one only when its limit is at least 2% and 1 cent above it, and never within that rental's first 10 minutes. Everyone who wins pays the same clearing price, the highest limit among the losing bids or the floor, and never more than their own limit (current_price_per_gpu_hour on the rental). A rental whose GPUs the new one takes is stopped with stop_reason outbid, with the same notice, hand-over and auto_resume as a preemption. When the new rental does not win, nothing is created: 409 bid_too_low, whose current_price_per_gpu_hour is a limit that would win now, or 409 gpus_unavailable when no limit would (the GPUs are held by on-demand rentals or by rentals in their first 10 minutes). The market clears again every 2 minutes; a running rental's price moves with it, within the band from the floor to its limit, and each change starts a new usage segment at the new price. While the platform's spot auction is switched off, an interruptible rental takes free GPUs only and pays the floor (capped at its limit), as before.

**Auction hardening.** bid_too_low's current_price_per_gpu_hour is a hint, not the exact lowest winning limit: the host's current spot price when a bid at it wins, else the lowest winning limit rounded up to the next multiple of a step of the larger of 5 cents and 5% of the host's on-demand price (rounded up), capped at the on-demand price, so it is never below the exact threshold. Since that hint is the minimum bid, the offer's spot_price_to_win_per_gpu_hour: a limit under it is refused with it before anything clears, even where a lower limit would have won, and a limit at it wins. An organization's refused bids on a host (bid_too_low, gpus_unavailable) are limited to 10 an hour: further bids there are 429 bid_rate_limited with Retry-After. A bid that takes an incumbent's GPUs pays a displacement bond: at least the preemption notice (5 minutes) plus 10 minutes of its GPUs at its clearing price, even when it is deleted before it runs; its metered time counts toward it, and what is left is charged when it stops, is deleted or fails, as a usage segment of kind displacement_bond. Nothing is charged when Legion fails the hand-over (preemption_timeout). A losing bid sets the clearing price only when its limit was unchanged through a whole earlier clearing, its organization is neither the host's nor linked to it, and it has not set the price for 30 clearings in a row. The host's provider, and an organization legion-risk linked to it, cannot bid, and a bid made before the link takes no part from then on (a running one is displaced as outbid at the next clearing, a waiting one never resumes).

**Own use and linked organizations.** A create on a host the caller's own organization owns is own use (own_use on the rental), on a listed or unlisted host: the organization pays only Ambient's platform fee, 5% of the host's own listed price per GPU-hour (its on-demand price, or its interruptible floor when tier is interruptible; the last listed price while unlisted), charged from its credit like any rental and never with promo credit, and earns nothing. It is created on demand with no bid, takes free GPUs only (409 gpus_unavailable otherwise) and any paid rental of the host takes its GPUs. A create by an organization linked to the host's provider (Legion's or legion-risk's links) is refused, on demand or interruptible: 409 linked_host, recorded as rental.refused.

**Capped at on demand.** An interruptible rental's max_price_per_gpu_hour is at most the host's current on-demand price_per_gpu_hour: above it is 400 max_above_on_demand, whose detail names the on-demand price. No clearing prices above the on-demand price. When the provider lowers the on-demand price under existing limits, the next clearing lowers those limits to it, each with rental.bid_changed.

Send an API key as Authorization: Bearer lgn_…. Authentication

Requires an Idempotency-Key: a retry with the same key and body returns the first answer. Idempotency

Rate limited: a 429 says when to try again in Retry-After. Rate limits

POSTEndpointhttps://api.legion.ambient.xyz/v1/rentals
curl
curl -s -X POST "https://api.legion.ambient.xyz/v1/rentals" \
  -H "Authorization: Bearer $LEGION_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "host_id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
  "gpu_count": 1,
  "image": "string",
  "registry_credential_id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
  "ssh_public_key": "string",
  "web_terminal": true,
  "terminal_access": "organization",
  "ssh_agent_forwarding": false,
  "serve": {
    "port": 1024,
    "kind": "openai",
    "model": "string",
    "catalog_id": "string"
  },
  "max_price_per_gpu_hour": {
    "amount_minor": 250,
    "currency": "USD"
  },
  "tier": "on_demand",
  "interruption_behavior": "keep",
  "auto_backup": {
    "retention_days": 7
  },
  "env": [
    {
      "name": "HF_TOKEN",
      "value": "string",
      "secret": false
    }
  ],
  "model_settings": {},
  "command": [
    "string"
  ],
  "args": [
    "string"
  ]
}'

This operation changes your account, so run it with the curl sample.

Response 201
{
  "maintenance": {
    "start": "2026-10-15T12:00:00Z",
    "end": "2026-10-15T12:00:00Z",
    "reason": "hardware",
    "state": "scheduled",
    "resume": false
  },
  "id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
  "service_id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
  "service_managed": false,
  "service_name": "string",
  "service_initial_key": {
    "key": {
      "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"
    },
    "secret": "string"
  },
  "name": "quiet-river-7k2f",
  "host_id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
  "host_name": "quiet-river-7k2f",
  "host_score": 0,
  "state": "starting",
  "ssh_key_fingerprint": "string",
  "tier": "on_demand",
  "own_use": false,
  "own_use_reference_price": {
    "amount_minor": 250,
    "currency": "USD"
  },
  "own_use_reference_basis": "on_demand",
  "own_use_fee_bps": 0,
  "stop_reason": "preempted",
  "interruption_behavior": "keep",
  "auto_resume": false,
  "preempt_at": "2026-10-15T12:00:00Z",
  "gpu_count": 0,
  "gpu_model": "string",
  "image": "string",
  "image_digest": "sha256:3f2a9c1d5b7e8f40a6c3d2b19e0f7a845c6d1e2f3a4b5c6d7e8f9a0b1c2d3e4f",
  "private_image": false,
  "registry_credential_id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
  "price_per_gpu_hour": {
    "amount_minor": 250,
    "currency": "USD"
  },
  "renter_fee_bps": 0,
  "max_price_per_gpu_hour": {
    "amount_minor": 250,
    "currency": "USD"
  },
  "spot_price_to_win_per_gpu_hour": {
    "amount_minor": 250,
    "currency": "USD"
  },
  "spot_win_status": "free_gpus",
  "current_price_per_gpu_hour": {
    "amount_minor": 250,
    "currency": "USD"
  },
  "resources": {
    "cpu_cores": 0,
    "memory_mib": 0,
    "disk_gib": 0
  },
  "ssh": {
    "host": "string",
    "port": 1,
    "host_key_fingerprint": "SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU"
  },
  "failure_reason": "string",
  "storage_price_per_gib_month": {
    "amount_minor": 250,
    "currency": "USD"
  },
  "delete_after": "2026-10-15T12:00:00Z",
  "data_status": "on_host",
  "data_protected_until": "2026-10-15T12:00:00Z",
  "data_reclaimable": false,
  "data_deleted_at": "2026-10-15T12:00:00Z",
  "data_deleted_reason": "renter_deleted",
  "delete_attempts": 1,
  "delete_error": "string",
  "latest_backup": {
    "id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
    "rental_id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
    "rental_name": "quiet-river-7k2f",
    "state": "queued",
    "retention_days": 7,
    "requested_at": "2026-10-15T12:00:00Z",
    "upload_started_at": "2026-10-15T12:00:00Z",
    "ready_at": "2026-10-15T12:00:00Z",
    "expires_at": "2026-10-15T12:00:00Z",
    "ended_at": "2026-10-15T12:00:00Z",
    "purge_at": "2026-10-15T12:00:00Z",
    "size_bytes": 0,
    "estimated_size_bytes": 0,
    "estimate_basis": "disk_used",
    "total_bytes": 0,
    "uploaded_bytes": 0,
    "upload_rate_bytes_per_second": 0,
    "estimated_completion_at": "2026-10-15T12:00:00Z",
    "upload_deadline": "2026-10-15T12:00:00Z",
    "price": {
      "quoted": {
        "amount_minor": 250,
        "currency": "USD"
      },
      "charged": {
        "amount_minor": 250,
        "currency": "USD"
      },
      "refunded": {
        "amount_minor": 250,
        "currency": "USD"
      },
      "storage": {
        "amount_minor": 250,
        "currency": "USD"
      },
      "download": {
        "amount_minor": 250,
        "currency": "USD"
      }
    },
    "delete_rental_after": false,
    "download_links": 0,
    "error": "string",
    "automatic": false,
    "origin": "member"
  },
  "auto_backup": {
    "retention_days": 7,
    "last_skipped_at": "2026-10-15T12:00:00Z",
    "last_skipped_reason": "no_credit"
  },
  "created_at": "2026-10-15T12:00:00Z",
  "web_terminal": false,
  "ssh_agent_forwarding": false,
  "image_phase": "fetching",
  "runtime": {
    "version": "1.3.0",
    "sshd_set": "string",
    "sshd_version": "1.3.0",
    "sshd_state": "current",
    "swap_error": "verify_failed",
    "restart_after": "2026-10-15T12:00:00Z"
  },
  "terminal": {
    "available": false,
    "reason": "platform_disabled"
  },
  "terminal_access": "organization",
  "created_by": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
  "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
        }
      }
    ]
  },
  "serve": {
    "kind": "openai",
    "model": "string",
    "catalog_id": "string",
    "readiness": {
      "phase": "pulling",
      "progress": 0,
      "since": "2026-10-15T12:00:00Z",
      "reported_at": "2026-10-15T12:00:00Z"
    },
    "failure": {
      "reason": "string",
      "message": "string",
      "reported_at": "2026-10-15T12:00:00Z"
    }
  },
  "env": [
    {
      "name": "HF_TOKEN",
      "secret": false,
      "value": "string"
    }
  ],
  "model_settings": {},
  "command": [
    "string"
  ],
  "args": [
    "string"
  ]
}

Example values.

Headers

  • Idempotency-KeystringRequired

    Client-chosen key, unique per request intent, at most 255 characters.

    1–255 characters

Request body

application/json · CreateRentalRequest · required

  • host_idstring (uuid)Required

  • gpu_countintegerRequired

    at least 1

  • imagestringRequired

    Container image reference, for example pytorch/pytorch:2.4.0-cuda12.4-cudnn9-runtime. A public image on docker.io, ghcr.io, nvcr.io or quay.io (or already in Legion's registry) is pulled through Legion's registry; a private image on any registry the organization saved a credential for is pulled straight from its registry.

    1–500 characters

  • registry_credential_idstring (uuid)

    . Read and pull a private image with this registry credential instead of the one matched by host and path prefix (inspectImage). It must be the organization's (else 422 registry_credential_not_found) and on the image's host (else 422 registry_credential_host_mismatch). The rental records the credential it used (Rental.registry_credential_id) and its host only ever gets pull tokens made from that one. Part of the idempotency hash only when set.

  • ssh_public_keystringRequired

    OpenSSH public key authorized to connect to the container: one line, type base64 with an optional comment. The rental keeps it as type base64 only: the comment is dropped and never stored, shown or sent to the host. A private key is 400 private_key_refused; anything that is not exactly one public key (several lines, options before the type, a malformed key) is 400 invalid_ssh_key, and nothing is allocated.

    1–8192 characters

  • web_terminalboolean

    Allow the Legion web terminal: members of the organization with rentals.manage can open a root terminal from the browser, and the container trusts the Legion terminal certificate authority. Immutable. Who among them may open it is terminal_access.

    default true

  • terminal_accessTerminalAccess

    . Who may open the web terminal: organization (the default) or creator_and_owners (the person creating the rental and the organization's owners). It can be changed later with updateRental. Not in the idempotency hash when it is organization, so a request that never names it hashes as it did before.

    default "organization"

  • ssh_agent_forwardingboolean

    Allow ssh -A agent forwarding into the rental. Off by default: while a forwarded agent is connected, every root process in the rental (every member of the organization, and any code running as root) can use its keys. Immutable: it cannot be changed after the rental is created, and starting, stopping or recreating the rental keeps it. Applies to rentals with the Legion runtime; rentals without it use their image's own sshd configuration.

    default false

  • serveRentalServeRequest

    Run a pre-made model service in the rental. The container serves it on port and checks the API key in its LEGION_API_KEY environment variable; Legion makes the key, sets that variable (with LEGION_SERVE_PORT and LEGION_SERVE_MODEL) and exposes the port at https://<rental name>.<edge domain> as createIngressRule does, when exposed ports are available to the organization.

    Child fields · 4
    • portintegerRequired

      The port the service listens on. Not 22022, which the Legion agent uses.

      1024–65535

    • kindRentalServeKindRequired

      What the service speaks. openai, an OpenAI-compatible API; comfyui, ComfyUI; http, any other HTTP service.

      one of: "openai", "comfyui", "http"

    • modelstringRequired

      A label for the model, for example a Hugging Face repository ID.

      1–200 characters

    • catalog_idstring

      The model's ID in the catalog, when it came from there.

      at most 64 characters · pattern ^[a-z0-9-]+$

  • max_price_per_gpu_hourMoney

    The most the caller agrees to pay per GPU-hour, all-in (: with the renter platform fee, as getOffer and listOffers show prices), usually the price getOffer or listOffers showed. It is compared with the host's price inside the transaction that locks the host and allocates its GPUs: when the host's price is higher, nothing is allocated and the request is refused with 409 price_changed, whose current_price_per_gpu_hour is the host's price. When the price is the same or lower the rental is created at the host's price, as without it. Leaving it out keeps the old behavior: the rental gets the host's price at that moment. Part of the Idempotency-Key body only when set. With tier interruptible it is the rental's bid on the host's spot auction: the most it pays per GPU-hour, at least the host's interruptible price (the floor; under it is 409 price_changed), and the floor when it is left out. The rental pays the clearing price, never more than this. See createRental. Legion turns an all-in bid into the provider's price it allows (the largest whose all-in price is within it), and the auction compares providers' prices only, so a bid equal to an offer's all-in price wins that offer's price. At most the host's on-demand price, all-in (400 max_above_on_demand).

    Child fields · 2
    • amount_minorinteger (int64)Required

      Amount in minor units (cents for USD).

      at least 0

    • currencyMoneyCurrencyRequired

      ISO 4217 currency code. Only USD is supported.

      one of: "USD"

  • tierRentalTier

    on_demand (the default) or interruptible. The tier's price on the host is copied onto the rental. interruptible on a host without an interruptible_price_per_gpu_hour is refused with 409 tier_unavailable. Part of the Idempotency-Key body only when interruptible.

    default "on_demand"

  • interruption_behaviorInterruptionBehavior

    What happens to the rental's data when an on-demand rental preempts it: keep (the default, and what every rental did before) or delete. Accepted only with tier interruptible; with on_demand, naming it at all is 400 interruption_behavior_not_allowed. Immutable. Part of the Idempotency-Key body only when delete.

  • auto_backupAutoBackup

    . Back the workspace up automatically each time Legion stops this rental (preempted, outbid, or out of credit), kept retention_days, each backup charged as createRentalBackup charges one. Only with tier interruptible and interruption_behavior keep (400 auto_backup_not_applicable otherwise). Absent: getStoragePolicy's auto_backup_default_retention_days (off today); null: off. See createRental.

    may be null

    Child fields · 1
    • retention_daysBackupRetentionDaysRequired

      How many days a backup is kept once it is ready. 7 by default.

      one of: 7, 30

  • envarray of EnvVarInput

    . Environment variables of the container (own images, starter images and models). See EnvVarInput. Needs a host whose agent supports them (409 host_unsupported). Part of the idempotency hash only when set: the names, and the values of variables that are not secret (a secret's value is never hashed or stored outside Vault).

    at most 64 items

    Child fields · 3
    • namestringRequired

      1–128 characters

    • valuestring

      Required except on an update that keeps a stored secret (see above).

      at most 32768 characters

    • secretboolean

      default false

  • model_settingsModelSettings

    . With serve.catalog_id only. See ModelSettings.

  • commandCommandOverride

    . Replaces the image's entrypoint; own images only. See CommandOverride.

  • argsCommandOverride

    . Replaces the image's CMD; own images only. See CommandOverride.

Request example
{
  "host_id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
  "gpu_count": 1,
  "image": "string",
  "registry_credential_id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
  "ssh_public_key": "string",
  "web_terminal": true,
  "terminal_access": "organization",
  "ssh_agent_forwarding": false,
  "serve": {
    "port": 1024,
    "kind": "openai",
    "model": "string",
    "catalog_id": "string"
  },
  "max_price_per_gpu_hour": {
    "amount_minor": 250,
    "currency": "USD"
  },
  "tier": "on_demand",
  "interruption_behavior": "keep",
  "auto_backup": {
    "retention_days": 7
  },
  "env": [
    {
      "name": "HF_TOKEN",
      "value": "string",
      "secret": false
    }
  ],
  "model_settings": {},
  "command": [
    "string"
  ],
  "args": [
    "string"
  ]
}

Responses

  • 201The rental.

    The rental.

    Headers: Cache-Control

    • maintenanceRentalMaintenance

      . The window of the rental's host, or the window that stopped the rental until it starts again: a MaintenanceSummary and resume. Absent for rentals under a preservation hold and for deleted and failed rentals.

      Child fields · 5
      • startstring (date-time)Required

        When the window starts: the rental stops then (after a 5-minute notice).

      • endstring (date-time)Required

        The 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"

      • resumebooleanRequired

        Whether maintenance starts the rental again by itself when the window that stopped it, or the window shown, ends. false after resume_after_maintenance false on updateRental, for a stopped rental no window stopped (maintenance starts only what it stopped), and for one the resume queue gave up on (its host is under review).

    • idstring (uuid)Required

    • service_idstring (uuid)

      The service that serves this rental: a rental created with serve gets a service with target rental (its URL https://<rental name>.ambi.run, keys access), and a replica of an autoscaled service names that service. Absent otherwise; a rental's exposed ports are listed by listServices.

    • service_managedboolean

      True for a replica of an autoscaled service: only the autoscaler changes it, and stop, start, delete, update, exposed ports, backups and exports answer 409 rental_managed_by_service. Its web_terminal and terminal_access are the service's replica_web_terminal: change them on the service.

    • service_namestring

      . The name of the service_id service, so a replica can say whose setting it follows (for example "Web terminal: off, set by service chat"). Absent when service_id is.

      read-only

    • service_initial_keyServiceKeyCreated

      On createRental with serve only, the first key of the rental's service, its secret shown once (the answer carries Cache-Control: no-store). Never on a replay or a read.

      Child fields · 2
      • keyServiceKeyRequired

        Child fields · 12
        • idstring (uuid)Required

        • kindServiceKeyKindRequired

          service, an lek_ key. legacy_direct, the lsk_ key of a public model rental from before services; revoking it switches the service's access to keys.

          one of: "service", "legacy_direct"

        • namestringRequired

        • prefixstringRequired

          The first 12 characters, lek_ and 8 more (lsk_ for a legacy direct key). Display only.

        • statusServiceKeyStatusRequired

          one of: "active", "expired", "revoked"

        • created_atstring (date-time)Required

        • created_bystring (uuid)Required

          may be null

        • expires_atstring (date-time)Required

          may be null

        • last_used_atstring (date-time)Required

          Updated at most once a minute.

          may be null

        • revoked_atstring (date-time)Required

          may be null

        • rate_limit_per_minuteintegerRequired

          may be null

        • direct_urlstringRequired

          The direct address a legacy direct key opens.

          may be null

      • secretstringRequired

        The whole key, lek_ and 43 URL-safe characters. Shown once.

    • nameFriendlyNameRequired

      The rental's friendly name, assigned at creation and never changed. It is the container's hostname (for a container created after it was assigned) and the SSH target: the gateway resolves <name> and <name>.<zone> as it resolves the rental ID, so ssh -J <ssh.host>:<ssh.port> root@<name> connects. Pin the rental's host key under the name (HostKeyAlias <name>).

    • host_idstring (uuid)Required

    • host_nameFriendlyName

      . The current friendly name of the host the rental runs on, as the marketplace shows it. Absent only for a host from before friendly names. getRentalHost has the rest.

    • host_scoreinteger

      . The host's current Legion score (LegionScore.value); absent until Legion scored it.

      0–100

    • stateRentalStateRequired

      starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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"

    • ssh_key_fingerprintstring

      . The SHA256 fingerprint of the SSH public key that may connect to the rental, as ssh-keygen -l prints it (SHA256: and the unpadded base64 digest): the key of createRental, or the last one updateRental set. Absent when the stored key does not parse. The key itself is never returned.

    • tierRentalTierRequired

      The rental's tier, chosen at creation and never changed. price_per_gpu_hour is that tier's price at creation, except for an interruptible rental: its price follows the host's spot auction, and price_per_gpu_hour is the price of the last clearing it won. Own use (own_use) is always on_demand, and its price_per_gpu_hour is Ambient's own-use platform fee.

    • own_useboolean

      (CONTRACTS.md "Own use of one's own host"). The rental is the organization's use of a host it owns. It pays only Ambient's own-use platform fee, price_per_gpu_hour: own_use_fee_bps of own_use_reference_price (the host's own listed price when the rental last started), charged from the organization's credit like any rental and never paid with promo credit. The organization earns nothing on it, its stopped workspace is not billed for storage, and any paid rental of the host (on demand, or a bid that wins the host's spot auction) takes its GPUs: it is then stopped with stop_reason preempted or outbid and does not start again by itself. It never takes GPUs from anybody. Absent or false for every other rental.

    • own_use_reference_priceMoney

      On own use: the price per GPU-hour the fee was taken from, snapshotted at the rental's last start; a later change of the host's listing does not change it until the rental starts again.

      Child fields · 2
      • amount_minorinteger (int64)Required

        Amount in minor units (cents for USD).

        at least 0

      • currencyMoneyCurrencyRequired

        ISO 4217 currency code. Only USD is supported.

        one of: "USD"

    • own_use_reference_basisstring

      On own use: which price own_use_reference_price is. on_demand: the host's on-demand price (also its last one while it is not listed). interruptible: its interruptible floor, when the rental was asked for as interruptible. advisor: the price advisor's recommendation for a host that was never priced.

      one of: "on_demand", "interruptible", "advisor"

    • own_use_fee_bpsinteger

      On own use, the platform fee's rate in basis points of own_use_reference_price (500 is 5%).

      0–10000

    • stop_reasonRentalStopReason

      Why Legion stopped this rental, while it is stopping or stopped because of it. Absent when a member, Legion or a lack of credit stopped it, and once it is started again. start_timeout stays on a stopped rental whose last start did not complete.

    • interruption_behaviorInterruptionBehavior

      What happens to the rental's data when it is preempted, chosen at creation and never changed. keep for every on-demand rental.

    • auto_resumeboolean

      . Whether the rental starts again by itself after it was preempted, when GPUs on its host are free within 72 hours of the stop; after that its files are deleted: the rental is stopped with stop_reason preempted (or outbid: it then starts when it wins a clearing of the host's spot auction, in bid order rather than oldest first), and neither a preservation hold, a suspended or unfunded organization, a full host disk nor missing free GPUs stops it from starting; these leave it queued, oldest preemption first. true for an interruptible rental that keeps its data unless it was set to false with updateRental. A member's stopRental of a rental that is already stopped and preempted sets it to false; any other stop or start leaves it. A resume never preempts anything and keeps the rental's tier and price.

    • preempt_atstring (date-time)

      . While the rental is stopping or stopped because it was preempted: when its container is stopped. For a host whose agent advertised preemption_notice_v1 it is 300 seconds (PreemptionNoticeSeconds) after the preemption, and the container keeps running, and billing, until then; else it is the moment of the preemption; billing ends at the agent's stop report and never runs past preempt_at plus 30 seconds. Absent otherwise, and once the rental is started again.

    • gpu_countintegerRequired

    • gpu_modelstring

      The host's GPU model.

    • imagestringRequired

      The image reference as the renter wrote it. It is not what the host pulls: that is registry.legion.ambient.xyz/<upstream>/<path>@<digest> for an image of a mirrored registry, pinned to image_digest.

    • image_digestImageDigest

      The content digest of the image a rental is pinned to: of its manifest list for a multi-platform image, so the same digest runs on any platform the image offers. Absent on rentals created before images were pinned.

      at most 135 characters · pattern ^(sha256:[a-f0-9]{64}|sha512:[a-f0-9]{128})$

    • private_imageboolean

      . True when the image is private: its registry did not serve it anonymously and it was read with the organization's registry sign-in. The host pulls it straight from that registry with a short-lived token made from the sign-in; it never goes through Legion's mirror. Absent means false.

    • registry_credential_idstring (uuid)

      . The registry credential a private image was read with, and the only one its host gets pull tokens from. Absent for a public image.

    • price_per_gpu_hourMoneyRequired

      Child fields · 2
      • amount_minorinteger (int64)Required

        Amount in minor units (cents for USD).

        at least 0

      • currencyMoneyCurrencyRequired

        ISO 4217 currency code. Only USD is supported.

        one of: "USD"

    • renter_fee_bpsinteger

      . The renter platform fee, in basis points, this rental pays on top of the provider's price, fixed when it was created (500 is 5%). 0 for rentals created before and for own use (which pays its own-use fee in price_per_gpu_hour). Every price on the rental (price_per_gpu_hour, max_price_per_gpu_hour, current_price_per_gpu_hour, storage_price_per_gib_month) already includes it.

      0–10000

    • max_price_per_gpu_hourMoney

      . An interruptible rental's bid on its host's spot auction: the most it pays per GPU-hour, set at creation (the host's floor by default) and changed with updateRental. Absent for an on-demand rental. All-in, at the rental's renter_fee_bps: the stored bid is the provider's price it allows, so this is the all-in price of that, at most the limit the renter asked for.

      Child fields · 2
      • amount_minorinteger (int64)Required

        Amount in minor units (cents for USD).

        at least 0

      • currencyMoneyCurrencyRequired

        ISO 4217 currency code. Only USD is supported.

        one of: "USD"

    • spot_price_to_win_per_gpu_hourMoney

      . On a rental waiting as a bid (stopped, stop_reason outbid or preempted, auto_resume), the lowest limit that wins its host's GPUs back now, all-in at the rental's renter_fee_bps: the same number as an offer's spot_price_to_win_per_gpu_hour, with this rental's own bid left out. Raising max_price_per_gpu_hour to it with updateRental wins at the clearing that follows at once; a new limit under it is 409 bid_too_low with it. Absent on every other rental and when no bid can win now.

      Child fields · 2
      • amount_minorinteger (int64)Required

        Amount in minor units (cents for USD).

        at least 0

      • currencyMoneyCurrencyRequired

        ISO 4217 currency code. Only USD is supported.

        one of: "USD"

    • spot_win_statusSpotWinStatus

      . What a new interruptible bid on the host meets now. free_gpus: a bid at the spot price (spot_price_per_gpu_hour) wins. outbid: the GPUs are held by bids, or wanted by waiting ones, that a new bid must outbid, at spot_price_to_win_per_gpu_hour. unavailable: no bid can win now, the GPUs being held by on-demand rentals or by interruptible rentals in their first 10 minutes. Absent where spot_price_to_win_per_gpu_hour is not computed (not interruptible, own host).

      one of: "free_gpus", "outbid", "unavailable"

    • current_price_per_gpu_hourMoney

      . What an interruptible rental that holds GPUs pays per GPU-hour now, all-in: the host's clearing price, never more than max_price_per_gpu_hour, never less than the floor unless the limit is (a limit set before the floor rose). Absent while it holds no GPUs (it is stopped or waiting to win), and for an on-demand rental.

      Child fields · 2
      • amount_minorinteger (int64)Required

        Amount in minor units (cents for USD).

        at least 0

      • currencyMoneyCurrencyRequired

        ISO 4217 currency code. Only USD is supported.

        one of: "USD"

    • resourcesResourcesRequired

      Child fields · 3
      • cpu_coresintegerRequired

        at least 0

      • memory_mibinteger (int64)Required

        at least 0

      • disk_gibinteger (int64)Required

        at least 0

    • sshSSHEndpoint

      On a Rental: the platform SSH gateway, a jump host, set by Legion from its own configuration and never from the host. Connect with ssh -J <host>:<port> root@<rental id>: the user on the rental is root. Absent until the host's agent reports the rental running and reachable through the gateway.

      In a RentalReport: the agent's view of the endpoint. It is read only as "reachable through the gateway"; a host or port other than the gateway's is ignored and counted (controller_agent_ssh_endpoint_mismatch_total), and never shown. host_key_fingerprint is ignored in a report.

      Child fields · 3
      • hoststringRequired

      • portintegerRequired

        1–65535

      • host_key_fingerprintstring

        The SHA256 fingerprint of the gateway's SSH host key, as ssh-keygen -lf prints it, for the renter to compare on first connection. Absent when Legion is not configured with it.

        pattern ^SHA256:[A-Za-z0-9+/]{43}$

    • failure_reasonstring

      Why a failed rental failed, in words for the renter: what its host's agent reported, or what Legion decided. Among the latter: a new on-demand rental that took GPUs from interruptible rentals fails with "The GPUs weren't released in time:... You weren't charged." when they did not stop within 7 minutes (rental.failed with reason preemption_timeout); it was never billed.

    • storage_price_per_gib_monthMoney

      What a stopped rental is charged per GiB per 730-hour month while its organization has credit, on the disk it uses as its host's agent reports it, at most resources.disk_gib, and on resources.disk_gib when the agent does not report it. The rate the rental's host charged when the rental was created, fixed for the rental like price_per_gpu_hour; for a rental created before, the platform's current rate. All-in with the renter platform fee. Absent when storage is free.

      read-only

      Child fields · 2
      • amount_minorinteger (int64)Required

        Amount in minor units (cents for USD).

        at least 0

      • currencyMoneyCurrencyRequired

        ISO 4217 currency code. Only USD is supported.

        one of: "USD"

    • delete_afterstring (date-time)

      Legion deletes this rental, with the data in its workspace, no earlier than this; deletion also waits for a warning email sent at least 24 hours earlier. 72 hours after the rental failed, or, for a stopped rental, 72 hours after its organization ran out of credit or its host was removed (a stopped rental of an organization with credit is billed for storage instead). Absent while the rental is in any other state, on hold, or its organization is suspended.

      : a stopped rental is deleted 72 hours after it stopped (the latest of its stop, the release of its last hold, and the Terms 1.2 effective date, 2026-10-23), whether or not its organization has credit, and while its organization is suspended; a warning email goes out 12 hours before (24 for a failed rental). While a backup or export of the rental is queued or uploading the deletion waits for it to end, with no extra time after a failed one.

      read-only

    • data_statusDataStatus

      Where a rental's files are. on_host: on its host (running, or stopped and kept until delete_after). deleting: their deletion was decided (data_deleted_reason) and the host's agent has not confirmed it yet. deleted: gone (data_deleted_at). The list may grow: treat an unknown value as deleting.

      one of: "on_host", "deleting", "deleted"

    • data_protected_untilstring (date-time)

      . For a stopped rental: until when its files are kept and never reclaimed for another renter, 24 hours after the stop completed. For a rental a maintenance window stopped, 24 hours after the window's end (absent while the window is open: never reclaimed then). Absent in any other state.

      read-only

    • data_reclaimableboolean

      . Whether the files of this stopped rental may be reclaimed right now for another renter's rental on the host: past data_protected_until, with no backup or export queued or uploading, not on hold, and the reclaim not switched off. False in any other state.

      read-only

    • data_deleted_atstring (date-time)

      . When the rental's files were deleted, as the host's agent confirmed (or the host left Legion).

      read-only

    • data_deleted_reasonDataDeletedReason

      . Why the files were (deleted) or are being (deleting) deleted. Kept for ever.

      read-only

    • delete_attemptsinteger

      . While the rental is deleting: how many times its host's agent failed to delete it so far (agents with delete_report_v1); the agent keeps retrying. 3 or more is a stuck delete. Absent otherwise.

      at least 1 · read-only

    • delete_errorstring

      . With delete_attempts: the agent's fixed sentence naming the step that failed (never the container engine's text), safe to show.

      read-only

    • latest_backupBackup

      . The rental's newest backup, whatever its state, so a page can resume after a reload. Absent when it has none. Its other backups are on listRentalBackups.

      read-only

      Child fields · 25
      • idstring (uuid)Required

      • rental_idstring (uuid)Required

      • rental_nameFriendlyName

        A 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]$

      • stateBackupStateRequired

        . queued: accepted, waiting for the rental to stop or for its host's agent to start uploading. uploading: the agent is uploading. ready: download it (createBackupDownloadLink) until expires_at. failed: see error; refunded in full. cancelled: cancelled before it was ready; refunded in full. expired: its retention ended. deleted: deleted early. An expired or deleted backup's file is purged 24 hours later.

        one of: "queued", "uploading", "ready", "failed", "cancelled", "expired", "deleted"

      • retention_daysBackupRetentionDaysRequired

        How many days a backup is kept once it is ready. 7 by default.

        one of: 7, 30

      • requested_atstring (date-time)Required

      • upload_started_atstring (date-time)

        When the agent started uploading.

      • ready_atstring (date-time)

      • expires_atstring (date-time)

        With ready and after, when it expires: ready_at plus retention_days.

      • ended_atstring (date-time)

        When it failed, was cancelled, expired or was deleted.

      • purge_atstring (date-time)

        For an expired or deleted backup, when its file is removed for good (24 hours on).

      • size_bytesinteger (int64)

        The size of the tar file; with ready.

      • estimated_size_bytesinteger (int64)Required

        The size the quote was computed on.

      • estimate_basisBackupEstimateBasis

        . What a backup's quote was computed on. disk_used: the size the rental's host last reported its workspace uses (disk_used_gib). disk_share: 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 (resources.disk_gib): 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 stale disk_used_gib) is charged the quote, not more.

        one of: "disk_used", "disk_share"

      • total_bytesinteger (int64)

        The size of /workspace the host's agent measured before uploading ('s total_bytes, as on an export); absent until it says. estimated_completion_at is against it, else against a measured estimated_size_bytes.

        at least 0

      • uploaded_bytesinteger (int64)

        Progress, as an export's: the bytes of the parts the agent finished uploading so far (the one in flight is not counted). With uploading; equal to size_bytes once ready.

        at least 0

      • upload_rate_bytes_per_secondinteger (int64)

        With uploading, once at least one part finished, the average upload speed so far.

        at least 0

      • estimated_completion_atstring (date-time)

        With uploading, once at least one part finished: when the upload should finish at the speed it has had so far, against estimated_size_bytes (an upper bound with disk_share). An estimate, not a promise.

      • upload_deadlinestring (date-time)

        With uploading: when the backup fails if it has not finished, 12 hours after the upload started (the agent cuts the upload at the same time).

      • priceBackupPriceRequired

        A backup's price, all of it Ambient's. quoted is what was charged when it was requested; charged is what it costs now, net of refunds: the quote until it is ready, then the price of its real size (never more than the quote), zero once it failed or was cancelled. refunded is what was given back. storage and download split the current price. Further download links are charged apart, on each link. All zero when backup charges are switched off.

        Child fields · 5
        • quotedMoneyRequired

          Child fields · 2
          • amount_minorinteger (int64)Required

            Amount in minor units (cents for USD).

            at least 0

          • currencyMoneyCurrencyRequired

            ISO 4217 currency code. Only USD is supported.

            one of: "USD"

        • chargedMoneyRequired

          Child fields · 2
          • amount_minorinteger (int64)Required

            Amount in minor units (cents for USD).

            at least 0

          • currencyMoneyCurrencyRequired

            ISO 4217 currency code. Only USD is supported.

            one of: "USD"

        • refundedMoneyRequired

          Child fields · 2
          • amount_minorinteger (int64)Required

            Amount in minor units (cents for USD).

            at least 0

          • currencyMoneyCurrencyRequired

            ISO 4217 currency code. Only USD is supported.

            one of: "USD"

        • storageMoneyRequired

          Child fields · 2
          • amount_minorinteger (int64)Required

            Amount in minor units (cents for USD).

            at least 0

          • currencyMoneyCurrencyRequired

            ISO 4217 currency code. Only USD is supported.

            one of: "USD"

        • downloadMoneyRequired

          Child fields · 2
          • amount_minorinteger (int64)Required

            Amount in minor units (cents for USD).

            at least 0

          • currencyMoneyCurrencyRequired

            ISO 4217 currency code. Only USD is supported.

            one of: "USD"

      • delete_rental_afterbooleanRequired

        Whether the rental is deleted once this backup is ready ("back up, then delete").

      • download_linksintegerRequired

        How many download links were minted. The first is included in the price.

        at least 0

      • errorstring

        Why a failed backup failed, in words for the renter.

      • automaticboolean

        . True for a backup Legion started by itself because the rental's auto_backup was on when Legion stopped it; absent for one a member asked for.

      • originstring

        . Who asked for it: member (the renter), automatic (the rental's auto_backup) or admin (a Legion Legion's "back up and stop" or "back up, then delete"). Every backup is the renter's, at its price.

        one of: "member", "automatic", "admin"

    • auto_backupRentalAutoBackup

      . The rental's automatic backup on interruption; absent when it is off. See createRental.

      read-only

      Child fields · 3
      • retention_daysBackupRetentionDaysRequired

        How many days a backup is kept once it is ready. 7 by default.

        one of: 7, 30

      • last_skipped_atstring (date-time)

        When the last automatic backup was skipped; absent when none was. Cleared when the next one starts.

      • last_skipped_reasonAutoBackupSkipReason

        . Why an automatic backup was not made when Legion stopped the rental. no_credit: the organization had no credit or its balance did not cover the quote. backup_too_slow: at the host's measured upload speed it would not finish in 12 hours. backup_in_progress: a backup or a workspace download of the rental was already running. host_offline: the host stayed offline for 30 minutes after the stop. host_unsupported: the host's agent cannot back up. rental_held: the rental is on hold. unavailable: backup storage or billing could not be reached for 30 minutes. recent_backup: an automatic backup of the rental was started less than 6 hours before, so a rental Legion stops again and again is not charged a backup each time. The list may grow: treat an unknown value as "not backed up".

        one of: "no_credit", "backup_too_slow", "backup_in_progress", "host_offline", "host_unsupported", "rental_held", "unavailable", "recent_backup"

    • created_atstring (date-time)Required

    • web_terminalbooleanRequired

      Whether the Legion web terminal was allowed at creation. Immutable.

    • ssh_agent_forwardingbooleanRequired

      Whether ssh -A agent forwarding was allowed at creation. Immutable. Applies to rentals with runtime; a rental without it uses its image's own sshd configuration.

    • image_phaseImagePhaseRequired

      Whether the rental's image is in Legion's registry. fetching: the mirror is still copying it in, which can take many minutes the first time, and the host's agent is not told about the rental yet; the rental is starting meanwhile. ready: the agent has been told to run it. A rental whose image has not arrived two hours after it was created fails.

      one of: "fetching", "ready"

    • runtimeRentalRuntime

      What the host's agent last reported for a rental created with the Legion runtime: the base bundle its container mounted and the sshd set that serves it. Absent for a rental created without the runtime. It is the provider's report, not proof.

      Child fields · 6
      • versionRuntimeVersionRequired

        A release of the Legion runtime bundle: x.y.z, no prefix, no suffix, no leading zeros, at most four digits a part. Compare numerically: 1.10.0 is above 1.9.0.

        at most 16 characters · pattern ^(0|[1-9][0-9]{0,3})\.(0|[1-9][0-9]{0,3})\.(0|[1-9][0-9]{0,3})$

      • sshd_setstringRequired

        pattern ^[0-9a-f]{12}$

      • sshd_versionRuntimeVersionRequired

        A release of the Legion runtime bundle: x.y.z, no prefix, no suffix, no leading zeros, at most four digits a part. Compare numerically: 1.10.0 is above 1.9.0.

        at most 16 characters · pattern ^(0|[1-9][0-9]{0,3})\.(0|[1-9][0-9]{0,3})\.(0|[1-9][0-9]{0,3})$

      • sshd_stateRuntimeSshdStateRequired

        current: the sshd set the agent last proved by banner is the newest one it could apply. swapping: a hot-swap to a newer set is in progress. swap_failed: it failed and the container serves its previous set (see swap_error).

        one of: "current", "swapping", "swap_failed"

      • swap_errorRuntimeSwapError

        one of: "verify_failed", "listener_failed", "banner_timeout", "rolled_back"

      • restart_afterstring (date-time)

        Present only while the rental's base version is below the forced-restart floor: after this time the host's agent restarts the rental (same container, workspace kept) onto a newer base. The renter's banner reads it.

    • terminalTerminalAvailabilityRequired

      Whether the caller can open the web terminal on the rental now, and if not, the first reason that applies (CONTRACTS.md "Web terminal", Availability). Since it is the caller's own answer: with the rental's terminal_access creator_and_owners, a person who may not open it reads not_allowed.

      Child fields · 2
      • availablebooleanRequired

      • reasonTerminalUnavailableReason

        platform_disabled: the kill switch is off. not_running: the rental is not running. disabled: the rental was created with web_terminal: false. agent_outdated: the host's agent does not report terminal data. restart_required: the container started before the Legion CA lines were written; restart the rental. host_keys_unknown: the agent has not yet reported a host-key scan for the current container. image_unsupported: the sshd answering for the rental does not meet the web-terminal requirements. Read it with the rental's runtime. Without runtime the rental was created before Legion's built-in SSH server and runs its image's own sshd, which is too old or has no usable host key. With runtime Legion's SSH server is the one that should answer, so this means something else answers on the rental's SSH port (it may have been replaced from inside the container): restart the rental, or connect with SSH. not_allowed: the rental's terminal_access is creator_and_owners and the caller is neither the person who created it nor an owner of the organization. It is the caller's own answer: another person reading the same rental may see it available. The list grows: treat a value you do not know as unavailable.

        one of: "platform_disabled", "not_running", "disabled", "agent_outdated", "restart_required", "host_keys_unknown", "image_unsupported", "not_allowed"

    • terminal_accessTerminalAccessRequired

      . Who may open the web terminal on the rental. organization for every rental created before it.

    • created_bystring (uuid)

      . The person who created the rental: the signed-in person, or the person an API key or a connected app's token belongs to. Absent for a rental created before; it is never guessed after the fact.

      read-only

    • startupStartup

      . How far the rental's start has come, step by step, from when it was created or last started: preparing_image (only when Legion's mirror had to copy the image in), pulling_image, starting_container, and for a rental with serve downloading_weights, loading_model, health_check, then ready. Each step is done, current, next or failed, with when it started and ended; a step a start did not need (an image already on the host, weights already downloaded) is left out once a later step began. The current step of a pull or a download carries its progress. A failed step is where the start stopped: the reason is failure_reason on the rental, or serve.failure for the model service. Absent for a rental with no recorded steps (one created before and not started since).

      Child fields · 1
      • stepsarray of StartupStepRequired

        at most 12 items

        Child fields · 8
        • stepStartupStepNameRequired

          . A step of a start, in order. finding_host: an autoscaled service looks for a host with free GPUs (services only). reserving_gpu: Legion reserves the GPUs on the chosen host (done when the rental is created or started; its facts say which GPUs, where and at what price). preparing_image: Legion's mirror copies the image in (image_phase fetching). pulling_image: the host pulls the image. starting_container: the container is created and started. downloading_weights: the model service downloads the model's weights (a Legion model image, the first time). loading_model: it loads the model onto the GPUs. warming_up: the model is in GPU memory and the server prepares it for this GPU (compiling, capturing CUDA graphs). health_check: the model is loaded and the service is asked the way a client would (OpenAI GET /v1/models listing the model, ComfyUI GET /system_stats, or the service's health path) until it answers. ready: the rental runs, and a model service answered its health check. receiving_traffic: the service's router sends the replica requests (services only). The list may grow: show a name you do not know as it is.

          one of: "finding_host", "reserving_gpu", "preparing_image", "pulling_image", "starting_container", "downloading_weights", "loading_model", "warming_up", "health_check", "ready", "receiving_traffic"

        • stateStartupStepStateRequired

          one of: "done", "current", "next", "failed"

        • started_atstring (date-time)

          When the step began; absent for a step that is next, and for a finding_host whose start Legion did not record.

        • ended_atstring (date-time)

          When the step ended (done or failed).

        • progressStartupProgress

          . How far a pull or a download is, as the host's agent last reported it (startup_progress_v1). Every figure is absent when it is not known; eta_seconds is the bytes left over the current rate.

          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.

        • reasonstring

          On a current finding_host: why no host was found yet, waiting_for_gpus (no offer has the free GPUs the service needs) or another code. Show detail for a code you do not know.

        • detailstring

          With 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_modelstring

            finding_host (done), reserving_gpu: the GPU model chosen.

          • gpu_countinteger

            at least 1

          • price_per_gpu_hourMoney

            Child fields · 2
            • amount_minorinteger (int64)Required

              Amount in minor units (cents for USD).

              at least 0

            • currencyMoneyCurrencyRequired

              ISO 4217 currency code. Only USD is supported.

              one of: "USD"

          • max_price_per_gpu_hourMoney

            finding_host (current): the most the service pays per GPU-hour, when it has a limit.

            Child fields · 2
            • amount_minorinteger (int64)Required

              Amount in minor units (cents for USD).

              at least 0

            • currencyMoneyCurrencyRequired

              ISO 4217 currency code. Only USD is supported.

              one of: "USD"

          • countrystring

            The host's country (ISO 3166-1 alpha-2), as offers show it.

          • hosts_checkedinteger

            finding_host (current): offers of the service's GPU class looked at by the last placement.

            at least 0

          • hosts_busyinteger

            Of those, how many had too few free GPUs.

            at least 0

          • hosts_over_priceinteger

            Of those, how many cost more than the service's limit.

            at least 0

          • cachedboolean

            pulling_image: the image was already on the host; downloading_weights: the weights were already on its disk.

          • items_doneinteger

            pulling_image: layers done; downloading_weights: files done.

            at least 0

          • items_totalinteger

            at least 0

          • load_fractionnumber (double)

            loading_model: the share of the weights in GPU memory.

            0–1

          • gpu_memory_used_bytesinteger (int64)

            loading_model: GPU memory the model holds.

            at least 0

          • gpu_memory_total_bytesinteger (int64)

            The memory of the rental's GPUs.

            at least 0

          • kv_cache_bytesinteger (int64)

            loading_model: the KV cache the server allocated.

            at least 0

          • compile_fractionnumber (double)

            warming_up: how far compiling or graph capture is, when the server says.

            0–1

          • health_pathstring

            health_check: the path asked, for example /v1/models.

          • attemptsinteger

            health_check: checks made so far.

            at least 0

          • last_status_codeinteger

            health_check: the last answer's HTTP status; 0 when it did not answer.

            0–599

          • latency_msinteger

            health_check: how long the last answer took.

            at least 0

    • serveRentalServeSummary

      What the rental serves; absent for a rental created without serve. The key and the address are on getRentalServe.

      may be null

      Child fields · 5
      • kindRentalServeKindRequired

        What the service speaks. openai, an OpenAI-compatible API; comfyui, ComfyUI; http, any other HTTP service.

        one of: "openai", "comfyui", "http"

      • modelstringRequired

      • catalog_idstring

      • readinessRentalServeReadiness

        How far the rental's model service has come, as the host's agent last reported it. Absent until an agent that reports it (serve_status_v1) has, and while the rental is not starting or running. A report older than 120 seconds is not shown.

        Child fields · 4
        • phaseServePhaseRequired

          How far the model service of a rental created with serve has come. pulling: the host is pulling the rental's image. starting: the container is being created or started, or runs and the service has said nothing yet. downloading: the service is downloading the model's weights (a Legion model image on its first start). loading: it is loading the model, or its port does not accept connections yet. ready: the service says it is ready and its port accepts connections. error: the service says it failed, or the container failed.

          one of: "pulling", "starting", "downloading", "loading", "ready", "error"

        • progressnumber (double)

          With pulling, the share of the image the host has; with downloading, the share of the weights. Absent when not known.

          0–1

        • sincestring (date-time)Required

          When Legion first saw this phase.

        • reported_atstring (date-time)Required

          When the agent last reported it.

      • failureServeFailure

        . Why the rental's model service last failed, as the host's agent reported it (serve_failure_v1). Kept after the rental stops or is deleted, and cleared once the service is ready again. Absent when no failure was reported (an older agent sends none).

        Child fields · 3
        • reasonstringRequired

          A short code: gpu_memory_insufficient (the GPU did not have the memory the model needs, for example because something outside Legion uses it), disk_full, download_failed, invalid_setting, server_exited, container_failed, or another code a newer agent sends. Show message for a code you do not know.

        • messagestringRequired

          One sentence in plain words, for example The model needs 21.6 GiB of GPU memory; 5.2 GiB is free.; may be empty.

        • reported_atstring (date-time)Required

          When the agent first reported this failure.

    • envarray of EnvVar

      . The container's environment variables, secrets without their values. Absent when there are none.

      Child fields · 3
      • namestringRequired

      • secretbooleanRequired

      • valuestring

        The value; absent when secret is true.

    • model_settingsModelSettings

      . The model settings set on a catalog model rental; 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.

  • 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.

    • typestringRequired

      URI reference identifying the problem type: the code's entry in the public error reference, https://legion.ambient.xyz/docs/errors#<code>. Branch on code, never on type.

    • titlestringRequired

    • statusintegerRequired

    • codestringRequired

      Stable machine-readable error code.

    • detailstring

    • instancestring

      The request path that produced the problem.

    • resource_idstring (uuid)

      The resource a conflict refers to, when there is one (egress_request_exists: the request already waiting; export_in_progress: the pending workspace export).

    • accessMeAccess

      Whether 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) or not_requested (not on the waitlist). Carried by Me (always approved for a member) and by the problem of a 403 access_not_approved, and of getMe's 403 no_organization.

      Child fields · 2
      • statestringRequired

        one of: "approved", "waitlisted", "not_requested"

      • emailstring (email)Required

        The verified email the state was decided on.

    • legalMeLegal

      The caller's consent to Legion's legal documents. required lists every document the consent step shows and acceptLegalDocuments takes, at its current version. accepted is true when the caller accepted the current version of every agree document; while it is false, every operation except getMe, acceptLegalDocuments, joinMyWaitlist and the wind-down operations (listing, stopping and deleting rentals; listing hosts, stopping new rentals on them and removing them) answers 403 terms_not_accepted.

      Child fields · 2
      • requiredarray of LegalDocumentRequired

        Child fields · 6
        • keyLegalDocumentKeyRequired

          A legal document: terms (Terms of Use), acceptable_use (Acceptable Use Policy), privacy (Privacy Policy), data_handling (Data Handling).

          one of: "terms", "acceptable_use", "privacy", "data_handling"

        • versionstringRequired

          The current version. A new version of an agree document must be accepted again.

        • effectivestring (date)Required

          The date the current version took effect.

        • titlestringRequired

        • urlstring (uri)Required

          The document's public page.

        • acceptancestringRequired

          agree: 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 HostRemovalBlockingRental

      Sorted by ID.

      at most 1000 items

      Child fields · 6
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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"

      • endablebooleanRequired

        Removing the host anyway (removeHost with force true) would end it: it is host_offline 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.

      • heldboolean

        On a preservation hold.

      • rented_by_youboolean

        The caller's own organization rented it, so the caller can open it (getRental). Only from removeHost; absent means false.

    • stored_data_rentalsarray of HostStoredDataRental

      . Sorted by ID.

      at most 1000 items

      Child fields · 8
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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)Required

        The size of its files on the host; with estimate_basis disk_share an upper bound.

      • estimate_basisBackupEstimateBasisRequired

        . What a backup's quote was computed on. disk_used: the size the rental's host last reported its workspace uses (disk_used_gib). disk_share: 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 (resources.disk_gib): 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 stale disk_used_gib) is charged the quote, not more.

        one of: "disk_used", "disk_share"

      • delete_afterstring (date-time)

        When its files are deleted (its delete_after); absent while held.

      • backup_stateBackupState

        Its renter's newest backup, when it has one.

      • rented_by_youboolean

        The caller's own organization rented it. Only on the public listener; absent means false.

    • available_untilstring (date-time)

      . On 409 host_maintenance from 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_maintenance from startRental of the renter's own rental, the window that keeps it stopped.

      Child fields · 4
      • startstring (date-time)Required

        When the window starts: the host's rentals stop then (after a 5-minute notice).

      • endstring (date-time)Required

        The 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_switchAdminOrgTestSwitch

      Child fields · 5
      • test_orgbooleanRequired

      • allowedbooleanRequired

      • blocking_rentalsarray of AdminOrgTestBlockingRentalRequired

        at most 100 items

        Child fields · 7
        • idstring (uuid)Required

        • nameFriendlyName

          A 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]$

        • stateRentalStateRequired

          starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • provider_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • host_idstring (uuid)Required

        • host_nameFriendlyName

          A 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_countintegerRequired

        at least 0

      • unpaid_earningsMoneyRequired

        Child fields · 2
        • amount_minorinteger (int64)Required

          Amount in minor units (cents for USD).

          at least 0

        • currencyMoneyCurrencyRequired

          ISO 4217 currency code. Only USD is supported.

          one of: "USD"

    • current_price_per_gpu_hourMoney

      The host's price per GPU-hour now, on 409 price_changed from createRental, the price a bid would win now on 409 bid_too_low, or the floor on 409 bid_below_floor; all-in, as the renter sees prices.

      Child fields · 2
      • amount_minorinteger (int64)Required

        Amount in minor units (cents for USD).

        at least 0

      • currencyMoneyCurrencyRequired

        ISO 4217 currency code. Only USD is supported.

        one of: "USD"

    • next_available_atstring (date-time)

      When the action is allowed again, on 429 benchmark_request_limited from requestHostBenchmark.

    • reasonPromoIneligibleReason

      Why 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_private of an image on a registry Legion takes sign-ins for (offer to add one with putRegistrySignIn), and on 422 registry_sign_in_rejected (the sign-in the registry refused). Only ever one of these four; registry_host names any host.

    • registry_hoststring

      . The registry host a credential is or would be for: on 422 image_private (offer to add one with createRegistryCredential), registry_sign_in_rejected, registry_credential_rejected, and the refusals of a registry (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_credential_in_use from deleteRegistryCredential and deleteRegistrySignIn. Oldest first.

      at most 100 items

      Child fields · 3
      • idstring (uuid)Required

      • namestringRequired

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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.com), on 403 invitation_for_another_account from getMyInvitation.

      at most 320 characters

  • 401Missing, unknown, expired or revoked credentials.

    Missing, unknown, expired or revoked credentials.

    • typestringRequired

      URI reference identifying the problem type: the code's entry in the public error reference, https://legion.ambient.xyz/docs/errors#<code>. Branch on code, never on type.

    • titlestringRequired

    • statusintegerRequired

    • codestringRequired

      Stable machine-readable error code.

    • detailstring

    • instancestring

      The request path that produced the problem.

    • resource_idstring (uuid)

      The resource a conflict refers to, when there is one (egress_request_exists: the request already waiting; export_in_progress: the pending workspace export).

    • accessMeAccess

      Whether 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) or not_requested (not on the waitlist). Carried by Me (always approved for a member) and by the problem of a 403 access_not_approved, and of getMe's 403 no_organization.

      Child fields · 2
      • statestringRequired

        one of: "approved", "waitlisted", "not_requested"

      • emailstring (email)Required

        The verified email the state was decided on.

    • legalMeLegal

      The caller's consent to Legion's legal documents. required lists every document the consent step shows and acceptLegalDocuments takes, at its current version. accepted is true when the caller accepted the current version of every agree document; while it is false, every operation except getMe, acceptLegalDocuments, joinMyWaitlist and the wind-down operations (listing, stopping and deleting rentals; listing hosts, stopping new rentals on them and removing them) answers 403 terms_not_accepted.

      Child fields · 2
      • requiredarray of LegalDocumentRequired

        Child fields · 6
        • keyLegalDocumentKeyRequired

          A legal document: terms (Terms of Use), acceptable_use (Acceptable Use Policy), privacy (Privacy Policy), data_handling (Data Handling).

          one of: "terms", "acceptable_use", "privacy", "data_handling"

        • versionstringRequired

          The current version. A new version of an agree document must be accepted again.

        • effectivestring (date)Required

          The date the current version took effect.

        • titlestringRequired

        • urlstring (uri)Required

          The document's public page.

        • acceptancestringRequired

          agree: 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 HostRemovalBlockingRental

      Sorted by ID.

      at most 1000 items

      Child fields · 6
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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"

      • endablebooleanRequired

        Removing the host anyway (removeHost with force true) would end it: it is host_offline 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.

      • heldboolean

        On a preservation hold.

      • rented_by_youboolean

        The caller's own organization rented it, so the caller can open it (getRental). Only from removeHost; absent means false.

    • stored_data_rentalsarray of HostStoredDataRental

      . Sorted by ID.

      at most 1000 items

      Child fields · 8
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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)Required

        The size of its files on the host; with estimate_basis disk_share an upper bound.

      • estimate_basisBackupEstimateBasisRequired

        . What a backup's quote was computed on. disk_used: the size the rental's host last reported its workspace uses (disk_used_gib). disk_share: 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 (resources.disk_gib): 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 stale disk_used_gib) is charged the quote, not more.

        one of: "disk_used", "disk_share"

      • delete_afterstring (date-time)

        When its files are deleted (its delete_after); absent while held.

      • backup_stateBackupState

        Its renter's newest backup, when it has one.

      • rented_by_youboolean

        The caller's own organization rented it. Only on the public listener; absent means false.

    • available_untilstring (date-time)

      . On 409 host_maintenance from 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_maintenance from startRental of the renter's own rental, the window that keeps it stopped.

      Child fields · 4
      • startstring (date-time)Required

        When the window starts: the host's rentals stop then (after a 5-minute notice).

      • endstring (date-time)Required

        The 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_switchAdminOrgTestSwitch

      Child fields · 5
      • test_orgbooleanRequired

      • allowedbooleanRequired

      • blocking_rentalsarray of AdminOrgTestBlockingRentalRequired

        at most 100 items

        Child fields · 7
        • idstring (uuid)Required

        • nameFriendlyName

          A 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]$

        • stateRentalStateRequired

          starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • provider_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • host_idstring (uuid)Required

        • host_nameFriendlyName

          A 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_countintegerRequired

        at least 0

      • unpaid_earningsMoneyRequired

        Child fields · 2
        • amount_minorinteger (int64)Required

          Amount in minor units (cents for USD).

          at least 0

        • currencyMoneyCurrencyRequired

          ISO 4217 currency code. Only USD is supported.

          one of: "USD"

    • current_price_per_gpu_hourMoney

      The host's price per GPU-hour now, on 409 price_changed from createRental, the price a bid would win now on 409 bid_too_low, or the floor on 409 bid_below_floor; all-in, as the renter sees prices.

      Child fields · 2
      • amount_minorinteger (int64)Required

        Amount in minor units (cents for USD).

        at least 0

      • currencyMoneyCurrencyRequired

        ISO 4217 currency code. Only USD is supported.

        one of: "USD"

    • next_available_atstring (date-time)

      When the action is allowed again, on 429 benchmark_request_limited from requestHostBenchmark.

    • reasonPromoIneligibleReason

      Why 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_private of an image on a registry Legion takes sign-ins for (offer to add one with putRegistrySignIn), and on 422 registry_sign_in_rejected (the sign-in the registry refused). Only ever one of these four; registry_host names any host.

    • registry_hoststring

      . The registry host a credential is or would be for: on 422 image_private (offer to add one with createRegistryCredential), registry_sign_in_rejected, registry_credential_rejected, and the refusals of a registry (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_credential_in_use from deleteRegistryCredential and deleteRegistrySignIn. Oldest first.

      at most 100 items

      Child fields · 3
      • idstring (uuid)Required

      • namestringRequired

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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.com), on 403 invitation_for_another_account from getMyInvitation.

      at most 320 characters

  • 402The organization has no credit (`code` is `insufficient_credit`).

    The organization has no credit (code is insufficient_credit).

    • typestringRequired

      URI reference identifying the problem type: the code's entry in the public error reference, https://legion.ambient.xyz/docs/errors#<code>. Branch on code, never on type.

    • titlestringRequired

    • statusintegerRequired

    • codestringRequired

      Stable machine-readable error code.

    • detailstring

    • instancestring

      The request path that produced the problem.

    • resource_idstring (uuid)

      The resource a conflict refers to, when there is one (egress_request_exists: the request already waiting; export_in_progress: the pending workspace export).

    • accessMeAccess

      Whether 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) or not_requested (not on the waitlist). Carried by Me (always approved for a member) and by the problem of a 403 access_not_approved, and of getMe's 403 no_organization.

      Child fields · 2
      • statestringRequired

        one of: "approved", "waitlisted", "not_requested"

      • emailstring (email)Required

        The verified email the state was decided on.

    • legalMeLegal

      The caller's consent to Legion's legal documents. required lists every document the consent step shows and acceptLegalDocuments takes, at its current version. accepted is true when the caller accepted the current version of every agree document; while it is false, every operation except getMe, acceptLegalDocuments, joinMyWaitlist and the wind-down operations (listing, stopping and deleting rentals; listing hosts, stopping new rentals on them and removing them) answers 403 terms_not_accepted.

      Child fields · 2
      • requiredarray of LegalDocumentRequired

        Child fields · 6
        • keyLegalDocumentKeyRequired

          A legal document: terms (Terms of Use), acceptable_use (Acceptable Use Policy), privacy (Privacy Policy), data_handling (Data Handling).

          one of: "terms", "acceptable_use", "privacy", "data_handling"

        • versionstringRequired

          The current version. A new version of an agree document must be accepted again.

        • effectivestring (date)Required

          The date the current version took effect.

        • titlestringRequired

        • urlstring (uri)Required

          The document's public page.

        • acceptancestringRequired

          agree: 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 HostRemovalBlockingRental

      Sorted by ID.

      at most 1000 items

      Child fields · 6
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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"

      • endablebooleanRequired

        Removing the host anyway (removeHost with force true) would end it: it is host_offline 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.

      • heldboolean

        On a preservation hold.

      • rented_by_youboolean

        The caller's own organization rented it, so the caller can open it (getRental). Only from removeHost; absent means false.

    • stored_data_rentalsarray of HostStoredDataRental

      . Sorted by ID.

      at most 1000 items

      Child fields · 8
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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)Required

        The size of its files on the host; with estimate_basis disk_share an upper bound.

      • estimate_basisBackupEstimateBasisRequired

        . What a backup's quote was computed on. disk_used: the size the rental's host last reported its workspace uses (disk_used_gib). disk_share: 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 (resources.disk_gib): 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 stale disk_used_gib) is charged the quote, not more.

        one of: "disk_used", "disk_share"

      • delete_afterstring (date-time)

        When its files are deleted (its delete_after); absent while held.

      • backup_stateBackupState

        Its renter's newest backup, when it has one.

      • rented_by_youboolean

        The caller's own organization rented it. Only on the public listener; absent means false.

    • available_untilstring (date-time)

      . On 409 host_maintenance from 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_maintenance from startRental of the renter's own rental, the window that keeps it stopped.

      Child fields · 4
      • startstring (date-time)Required

        When the window starts: the host's rentals stop then (after a 5-minute notice).

      • endstring (date-time)Required

        The 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_switchAdminOrgTestSwitch

      Child fields · 5
      • test_orgbooleanRequired

      • allowedbooleanRequired

      • blocking_rentalsarray of AdminOrgTestBlockingRentalRequired

        at most 100 items

        Child fields · 7
        • idstring (uuid)Required

        • nameFriendlyName

          A 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]$

        • stateRentalStateRequired

          starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • provider_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • host_idstring (uuid)Required

        • host_nameFriendlyName

          A 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_countintegerRequired

        at least 0

      • unpaid_earningsMoneyRequired

        Child fields · 2
        • amount_minorinteger (int64)Required

          Amount in minor units (cents for USD).

          at least 0

        • currencyMoneyCurrencyRequired

          ISO 4217 currency code. Only USD is supported.

          one of: "USD"

    • current_price_per_gpu_hourMoney

      The host's price per GPU-hour now, on 409 price_changed from createRental, the price a bid would win now on 409 bid_too_low, or the floor on 409 bid_below_floor; all-in, as the renter sees prices.

      Child fields · 2
      • amount_minorinteger (int64)Required

        Amount in minor units (cents for USD).

        at least 0

      • currencyMoneyCurrencyRequired

        ISO 4217 currency code. Only USD is supported.

        one of: "USD"

    • next_available_atstring (date-time)

      When the action is allowed again, on 429 benchmark_request_limited from requestHostBenchmark.

    • reasonPromoIneligibleReason

      Why 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_private of an image on a registry Legion takes sign-ins for (offer to add one with putRegistrySignIn), and on 422 registry_sign_in_rejected (the sign-in the registry refused). Only ever one of these four; registry_host names any host.

    • registry_hoststring

      . The registry host a credential is or would be for: on 422 image_private (offer to add one with createRegistryCredential), registry_sign_in_rejected, registry_credential_rejected, and the refusals of a registry (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_credential_in_use from deleteRegistryCredential and deleteRegistrySignIn. Oldest first.

      at most 100 items

      Child fields · 3
      • idstring (uuid)Required

      • namestringRequired

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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.com), on 403 invitation_for_another_account from 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; 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.

    access_not_approved: a signed-in person who is not approved for the beta yet. Every operation that takes a credential answers it to them, except getMe and joinMyWaitlist; the problem carries access (waitlisted or not_requested, and the email). Approved means a member of an organization, holding a pending invitation, or Legion; an API key always belongs to a member.

    oauth_token_mcp_only: the caller sent an OAuth access token (lgo_), which is accepted only by mcpMessage and 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_suspended: the caller's organization is suspended. Every operation that takes a credential answers it, by session or API key, except getMe (which shows org.suspended_at and org.suspension_reason) and the support operations under /v1/support/.

    terms_not_accepted: 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, except getMe, acceptLegalDocuments, joinMyWaitlist and the wind-down operations (listRentals, stopRental, deleteRental, listHosts, updateListing with listed false, removeHost); the problem carries legal. An API key acts for the person who created it, so it is refused until that person accepts. Terminal operations also return session_required (called with an API key) and step_up_required (neither a sign-in nor a step-up challenge within the step-up window).

    • typestringRequired

      URI reference identifying the problem type: the code's entry in the public error reference, https://legion.ambient.xyz/docs/errors#<code>. Branch on code, never on type.

    • titlestringRequired

    • statusintegerRequired

    • codestringRequired

      Stable machine-readable error code.

    • detailstring

    • instancestring

      The request path that produced the problem.

    • resource_idstring (uuid)

      The resource a conflict refers to, when there is one (egress_request_exists: the request already waiting; export_in_progress: the pending workspace export).

    • accessMeAccess

      Whether 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) or not_requested (not on the waitlist). Carried by Me (always approved for a member) and by the problem of a 403 access_not_approved, and of getMe's 403 no_organization.

      Child fields · 2
      • statestringRequired

        one of: "approved", "waitlisted", "not_requested"

      • emailstring (email)Required

        The verified email the state was decided on.

    • legalMeLegal

      The caller's consent to Legion's legal documents. required lists every document the consent step shows and acceptLegalDocuments takes, at its current version. accepted is true when the caller accepted the current version of every agree document; while it is false, every operation except getMe, acceptLegalDocuments, joinMyWaitlist and the wind-down operations (listing, stopping and deleting rentals; listing hosts, stopping new rentals on them and removing them) answers 403 terms_not_accepted.

      Child fields · 2
      • requiredarray of LegalDocumentRequired

        Child fields · 6
        • keyLegalDocumentKeyRequired

          A legal document: terms (Terms of Use), acceptable_use (Acceptable Use Policy), privacy (Privacy Policy), data_handling (Data Handling).

          one of: "terms", "acceptable_use", "privacy", "data_handling"

        • versionstringRequired

          The current version. A new version of an agree document must be accepted again.

        • effectivestring (date)Required

          The date the current version took effect.

        • titlestringRequired

        • urlstring (uri)Required

          The document's public page.

        • acceptancestringRequired

          agree: 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 HostRemovalBlockingRental

      Sorted by ID.

      at most 1000 items

      Child fields · 6
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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"

      • endablebooleanRequired

        Removing the host anyway (removeHost with force true) would end it: it is host_offline 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.

      • heldboolean

        On a preservation hold.

      • rented_by_youboolean

        The caller's own organization rented it, so the caller can open it (getRental). Only from removeHost; absent means false.

    • stored_data_rentalsarray of HostStoredDataRental

      . Sorted by ID.

      at most 1000 items

      Child fields · 8
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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)Required

        The size of its files on the host; with estimate_basis disk_share an upper bound.

      • estimate_basisBackupEstimateBasisRequired

        . What a backup's quote was computed on. disk_used: the size the rental's host last reported its workspace uses (disk_used_gib). disk_share: 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 (resources.disk_gib): 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 stale disk_used_gib) is charged the quote, not more.

        one of: "disk_used", "disk_share"

      • delete_afterstring (date-time)

        When its files are deleted (its delete_after); absent while held.

      • backup_stateBackupState

        Its renter's newest backup, when it has one.

      • rented_by_youboolean

        The caller's own organization rented it. Only on the public listener; absent means false.

    • available_untilstring (date-time)

      . On 409 host_maintenance from 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_maintenance from startRental of the renter's own rental, the window that keeps it stopped.

      Child fields · 4
      • startstring (date-time)Required

        When the window starts: the host's rentals stop then (after a 5-minute notice).

      • endstring (date-time)Required

        The 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_switchAdminOrgTestSwitch

      Child fields · 5
      • test_orgbooleanRequired

      • allowedbooleanRequired

      • blocking_rentalsarray of AdminOrgTestBlockingRentalRequired

        at most 100 items

        Child fields · 7
        • idstring (uuid)Required

        • nameFriendlyName

          A 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]$

        • stateRentalStateRequired

          starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • provider_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • host_idstring (uuid)Required

        • host_nameFriendlyName

          A 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_countintegerRequired

        at least 0

      • unpaid_earningsMoneyRequired

        Child fields · 2
        • amount_minorinteger (int64)Required

          Amount in minor units (cents for USD).

          at least 0

        • currencyMoneyCurrencyRequired

          ISO 4217 currency code. Only USD is supported.

          one of: "USD"

    • current_price_per_gpu_hourMoney

      The host's price per GPU-hour now, on 409 price_changed from createRental, the price a bid would win now on 409 bid_too_low, or the floor on 409 bid_below_floor; all-in, as the renter sees prices.

      Child fields · 2
      • amount_minorinteger (int64)Required

        Amount in minor units (cents for USD).

        at least 0

      • currencyMoneyCurrencyRequired

        ISO 4217 currency code. Only USD is supported.

        one of: "USD"

    • next_available_atstring (date-time)

      When the action is allowed again, on 429 benchmark_request_limited from requestHostBenchmark.

    • reasonPromoIneligibleReason

      Why 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_private of an image on a registry Legion takes sign-ins for (offer to add one with putRegistrySignIn), and on 422 registry_sign_in_rejected (the sign-in the registry refused). Only ever one of these four; registry_host names any host.

    • registry_hoststring

      . The registry host a credential is or would be for: on 422 image_private (offer to add one with createRegistryCredential), registry_sign_in_rejected, registry_credential_rejected, and the refusals of a registry (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_credential_in_use from deleteRegistryCredential and deleteRegistrySignIn. Oldest first.

      at most 100 items

      Child fields · 3
      • idstring (uuid)Required

      • namestringRequired

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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.com), on 403 invitation_for_another_account from 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.

    • typestringRequired

      URI reference identifying the problem type: the code's entry in the public error reference, https://legion.ambient.xyz/docs/errors#<code>. Branch on code, never on type.

    • titlestringRequired

    • statusintegerRequired

    • codestringRequired

      Stable machine-readable error code.

    • detailstring

    • instancestring

      The request path that produced the problem.

    • resource_idstring (uuid)

      The resource a conflict refers to, when there is one (egress_request_exists: the request already waiting; export_in_progress: the pending workspace export).

    • accessMeAccess

      Whether 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) or not_requested (not on the waitlist). Carried by Me (always approved for a member) and by the problem of a 403 access_not_approved, and of getMe's 403 no_organization.

      Child fields · 2
      • statestringRequired

        one of: "approved", "waitlisted", "not_requested"

      • emailstring (email)Required

        The verified email the state was decided on.

    • legalMeLegal

      The caller's consent to Legion's legal documents. required lists every document the consent step shows and acceptLegalDocuments takes, at its current version. accepted is true when the caller accepted the current version of every agree document; while it is false, every operation except getMe, acceptLegalDocuments, joinMyWaitlist and the wind-down operations (listing, stopping and deleting rentals; listing hosts, stopping new rentals on them and removing them) answers 403 terms_not_accepted.

      Child fields · 2
      • requiredarray of LegalDocumentRequired

        Child fields · 6
        • keyLegalDocumentKeyRequired

          A legal document: terms (Terms of Use), acceptable_use (Acceptable Use Policy), privacy (Privacy Policy), data_handling (Data Handling).

          one of: "terms", "acceptable_use", "privacy", "data_handling"

        • versionstringRequired

          The current version. A new version of an agree document must be accepted again.

        • effectivestring (date)Required

          The date the current version took effect.

        • titlestringRequired

        • urlstring (uri)Required

          The document's public page.

        • acceptancestringRequired

          agree: 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 HostRemovalBlockingRental

      Sorted by ID.

      at most 1000 items

      Child fields · 6
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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"

      • endablebooleanRequired

        Removing the host anyway (removeHost with force true) would end it: it is host_offline 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.

      • heldboolean

        On a preservation hold.

      • rented_by_youboolean

        The caller's own organization rented it, so the caller can open it (getRental). Only from removeHost; absent means false.

    • stored_data_rentalsarray of HostStoredDataRental

      . Sorted by ID.

      at most 1000 items

      Child fields · 8
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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)Required

        The size of its files on the host; with estimate_basis disk_share an upper bound.

      • estimate_basisBackupEstimateBasisRequired

        . What a backup's quote was computed on. disk_used: the size the rental's host last reported its workspace uses (disk_used_gib). disk_share: 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 (resources.disk_gib): 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 stale disk_used_gib) is charged the quote, not more.

        one of: "disk_used", "disk_share"

      • delete_afterstring (date-time)

        When its files are deleted (its delete_after); absent while held.

      • backup_stateBackupState

        Its renter's newest backup, when it has one.

      • rented_by_youboolean

        The caller's own organization rented it. Only on the public listener; absent means false.

    • available_untilstring (date-time)

      . On 409 host_maintenance from 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_maintenance from startRental of the renter's own rental, the window that keeps it stopped.

      Child fields · 4
      • startstring (date-time)Required

        When the window starts: the host's rentals stop then (after a 5-minute notice).

      • endstring (date-time)Required

        The 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_switchAdminOrgTestSwitch

      Child fields · 5
      • test_orgbooleanRequired

      • allowedbooleanRequired

      • blocking_rentalsarray of AdminOrgTestBlockingRentalRequired

        at most 100 items

        Child fields · 7
        • idstring (uuid)Required

        • nameFriendlyName

          A 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]$

        • stateRentalStateRequired

          starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • provider_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • host_idstring (uuid)Required

        • host_nameFriendlyName

          A 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_countintegerRequired

        at least 0

      • unpaid_earningsMoneyRequired

        Child fields · 2
        • amount_minorinteger (int64)Required

          Amount in minor units (cents for USD).

          at least 0

        • currencyMoneyCurrencyRequired

          ISO 4217 currency code. Only USD is supported.

          one of: "USD"

    • current_price_per_gpu_hourMoney

      The host's price per GPU-hour now, on 409 price_changed from createRental, the price a bid would win now on 409 bid_too_low, or the floor on 409 bid_below_floor; all-in, as the renter sees prices.

      Child fields · 2
      • amount_minorinteger (int64)Required

        Amount in minor units (cents for USD).

        at least 0

      • currencyMoneyCurrencyRequired

        ISO 4217 currency code. Only USD is supported.

        one of: "USD"

    • next_available_atstring (date-time)

      When the action is allowed again, on 429 benchmark_request_limited from requestHostBenchmark.

    • reasonPromoIneligibleReason

      Why 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_private of an image on a registry Legion takes sign-ins for (offer to add one with putRegistrySignIn), and on 422 registry_sign_in_rejected (the sign-in the registry refused). Only ever one of these four; registry_host names any host.

    • registry_hoststring

      . The registry host a credential is or would be for: on 422 image_private (offer to add one with createRegistryCredential), registry_sign_in_rejected, registry_credential_rejected, and the refusals of a registry (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_credential_in_use from deleteRegistryCredential and deleteRegistrySignIn. Oldest first.

      at most 100 items

      Child fields · 3
      • idstring (uuid)Required

      • namestringRequired

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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.com), on 403 invitation_for_another_account from getMyInvitation.

      at most 320 characters

  • 409The resource's current state does not allow the operation. `legal_versions_stale`: a legal document version sent is not the current one; the problem's `legal` holds the current documents.

    The resource's current state does not allow the operation. legal_versions_stale: a legal document version sent is not the current one; the problem's legal holds the current documents.

    • typestringRequired

      URI reference identifying the problem type: the code's entry in the public error reference, https://legion.ambient.xyz/docs/errors#<code>. Branch on code, never on type.

    • titlestringRequired

    • statusintegerRequired

    • codestringRequired

      Stable machine-readable error code.

    • detailstring

    • instancestring

      The request path that produced the problem.

    • resource_idstring (uuid)

      The resource a conflict refers to, when there is one (egress_request_exists: the request already waiting; export_in_progress: the pending workspace export).

    • accessMeAccess

      Whether 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) or not_requested (not on the waitlist). Carried by Me (always approved for a member) and by the problem of a 403 access_not_approved, and of getMe's 403 no_organization.

      Child fields · 2
      • statestringRequired

        one of: "approved", "waitlisted", "not_requested"

      • emailstring (email)Required

        The verified email the state was decided on.

    • legalMeLegal

      The caller's consent to Legion's legal documents. required lists every document the consent step shows and acceptLegalDocuments takes, at its current version. accepted is true when the caller accepted the current version of every agree document; while it is false, every operation except getMe, acceptLegalDocuments, joinMyWaitlist and the wind-down operations (listing, stopping and deleting rentals; listing hosts, stopping new rentals on them and removing them) answers 403 terms_not_accepted.

      Child fields · 2
      • requiredarray of LegalDocumentRequired

        Child fields · 6
        • keyLegalDocumentKeyRequired

          A legal document: terms (Terms of Use), acceptable_use (Acceptable Use Policy), privacy (Privacy Policy), data_handling (Data Handling).

          one of: "terms", "acceptable_use", "privacy", "data_handling"

        • versionstringRequired

          The current version. A new version of an agree document must be accepted again.

        • effectivestring (date)Required

          The date the current version took effect.

        • titlestringRequired

        • urlstring (uri)Required

          The document's public page.

        • acceptancestringRequired

          agree: 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 HostRemovalBlockingRental

      Sorted by ID.

      at most 1000 items

      Child fields · 6
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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"

      • endablebooleanRequired

        Removing the host anyway (removeHost with force true) would end it: it is host_offline 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.

      • heldboolean

        On a preservation hold.

      • rented_by_youboolean

        The caller's own organization rented it, so the caller can open it (getRental). Only from removeHost; absent means false.

    • stored_data_rentalsarray of HostStoredDataRental

      . Sorted by ID.

      at most 1000 items

      Child fields · 8
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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)Required

        The size of its files on the host; with estimate_basis disk_share an upper bound.

      • estimate_basisBackupEstimateBasisRequired

        . What a backup's quote was computed on. disk_used: the size the rental's host last reported its workspace uses (disk_used_gib). disk_share: 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 (resources.disk_gib): 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 stale disk_used_gib) is charged the quote, not more.

        one of: "disk_used", "disk_share"

      • delete_afterstring (date-time)

        When its files are deleted (its delete_after); absent while held.

      • backup_stateBackupState

        Its renter's newest backup, when it has one.

      • rented_by_youboolean

        The caller's own organization rented it. Only on the public listener; absent means false.

    • available_untilstring (date-time)

      . On 409 host_maintenance from 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_maintenance from startRental of the renter's own rental, the window that keeps it stopped.

      Child fields · 4
      • startstring (date-time)Required

        When the window starts: the host's rentals stop then (after a 5-minute notice).

      • endstring (date-time)Required

        The 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_switchAdminOrgTestSwitch

      Child fields · 5
      • test_orgbooleanRequired

      • allowedbooleanRequired

      • blocking_rentalsarray of AdminOrgTestBlockingRentalRequired

        at most 100 items

        Child fields · 7
        • idstring (uuid)Required

        • nameFriendlyName

          A 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]$

        • stateRentalStateRequired

          starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • provider_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • host_idstring (uuid)Required

        • host_nameFriendlyName

          A 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_countintegerRequired

        at least 0

      • unpaid_earningsMoneyRequired

        Child fields · 2
        • amount_minorinteger (int64)Required

          Amount in minor units (cents for USD).

          at least 0

        • currencyMoneyCurrencyRequired

          ISO 4217 currency code. Only USD is supported.

          one of: "USD"

    • current_price_per_gpu_hourMoney

      The host's price per GPU-hour now, on 409 price_changed from createRental, the price a bid would win now on 409 bid_too_low, or the floor on 409 bid_below_floor; all-in, as the renter sees prices.

      Child fields · 2
      • amount_minorinteger (int64)Required

        Amount in minor units (cents for USD).

        at least 0

      • currencyMoneyCurrencyRequired

        ISO 4217 currency code. Only USD is supported.

        one of: "USD"

    • next_available_atstring (date-time)

      When the action is allowed again, on 429 benchmark_request_limited from requestHostBenchmark.

    • reasonPromoIneligibleReason

      Why 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_private of an image on a registry Legion takes sign-ins for (offer to add one with putRegistrySignIn), and on 422 registry_sign_in_rejected (the sign-in the registry refused). Only ever one of these four; registry_host names any host.

    • registry_hoststring

      . The registry host a credential is or would be for: on 422 image_private (offer to add one with createRegistryCredential), registry_sign_in_rejected, registry_credential_rejected, and the refusals of a registry (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_credential_in_use from deleteRegistryCredential and deleteRegistrySignIn. Oldest first.

      at most 100 items

      Child fields · 3
      • idstring (uuid)Required

      • namestringRequired

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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.com), on 403 invitation_for_another_account from getMyInvitation.

      at most 320 characters

  • 422Either the `Idempotency-Key` was already used with a different request body (`idempotency_key_reused`), or the image cannot be run, with the codes of `inspectImage`'s 422: `image_not_found`, `image_private`, `image_platform_unsupported`, `image_too_large`, `image_manifest_unsupported`, `image_registry_not_allowed`, `registry_not_supported`, `image_not_allowed` and `registry_sign_in_rejected`. Nothing was allocated.

    Either the Idempotency-Key was already used with a different request body (idempotency_key_reused), or the image cannot be run, with the codes of inspectImage's 422: image_not_found, image_private, image_platform_unsupported, image_too_large, image_manifest_unsupported, image_registry_not_allowed, registry_not_supported, image_not_allowed and registry_sign_in_rejected. Nothing was allocated.

    • typestringRequired

      URI reference identifying the problem type: the code's entry in the public error reference, https://legion.ambient.xyz/docs/errors#<code>. Branch on code, never on type.

    • titlestringRequired

    • statusintegerRequired

    • codestringRequired

      Stable machine-readable error code.

    • detailstring

    • instancestring

      The request path that produced the problem.

    • resource_idstring (uuid)

      The resource a conflict refers to, when there is one (egress_request_exists: the request already waiting; export_in_progress: the pending workspace export).

    • accessMeAccess

      Whether 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) or not_requested (not on the waitlist). Carried by Me (always approved for a member) and by the problem of a 403 access_not_approved, and of getMe's 403 no_organization.

      Child fields · 2
      • statestringRequired

        one of: "approved", "waitlisted", "not_requested"

      • emailstring (email)Required

        The verified email the state was decided on.

    • legalMeLegal

      The caller's consent to Legion's legal documents. required lists every document the consent step shows and acceptLegalDocuments takes, at its current version. accepted is true when the caller accepted the current version of every agree document; while it is false, every operation except getMe, acceptLegalDocuments, joinMyWaitlist and the wind-down operations (listing, stopping and deleting rentals; listing hosts, stopping new rentals on them and removing them) answers 403 terms_not_accepted.

      Child fields · 2
      • requiredarray of LegalDocumentRequired

        Child fields · 6
        • keyLegalDocumentKeyRequired

          A legal document: terms (Terms of Use), acceptable_use (Acceptable Use Policy), privacy (Privacy Policy), data_handling (Data Handling).

          one of: "terms", "acceptable_use", "privacy", "data_handling"

        • versionstringRequired

          The current version. A new version of an agree document must be accepted again.

        • effectivestring (date)Required

          The date the current version took effect.

        • titlestringRequired

        • urlstring (uri)Required

          The document's public page.

        • acceptancestringRequired

          agree: 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 HostRemovalBlockingRental

      Sorted by ID.

      at most 1000 items

      Child fields · 6
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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"

      • endablebooleanRequired

        Removing the host anyway (removeHost with force true) would end it: it is host_offline 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.

      • heldboolean

        On a preservation hold.

      • rented_by_youboolean

        The caller's own organization rented it, so the caller can open it (getRental). Only from removeHost; absent means false.

    • stored_data_rentalsarray of HostStoredDataRental

      . Sorted by ID.

      at most 1000 items

      Child fields · 8
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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)Required

        The size of its files on the host; with estimate_basis disk_share an upper bound.

      • estimate_basisBackupEstimateBasisRequired

        . What a backup's quote was computed on. disk_used: the size the rental's host last reported its workspace uses (disk_used_gib). disk_share: 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 (resources.disk_gib): 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 stale disk_used_gib) is charged the quote, not more.

        one of: "disk_used", "disk_share"

      • delete_afterstring (date-time)

        When its files are deleted (its delete_after); absent while held.

      • backup_stateBackupState

        Its renter's newest backup, when it has one.

      • rented_by_youboolean

        The caller's own organization rented it. Only on the public listener; absent means false.

    • available_untilstring (date-time)

      . On 409 host_maintenance from 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_maintenance from startRental of the renter's own rental, the window that keeps it stopped.

      Child fields · 4
      • startstring (date-time)Required

        When the window starts: the host's rentals stop then (after a 5-minute notice).

      • endstring (date-time)Required

        The 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_switchAdminOrgTestSwitch

      Child fields · 5
      • test_orgbooleanRequired

      • allowedbooleanRequired

      • blocking_rentalsarray of AdminOrgTestBlockingRentalRequired

        at most 100 items

        Child fields · 7
        • idstring (uuid)Required

        • nameFriendlyName

          A 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]$

        • stateRentalStateRequired

          starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • provider_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • host_idstring (uuid)Required

        • host_nameFriendlyName

          A 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_countintegerRequired

        at least 0

      • unpaid_earningsMoneyRequired

        Child fields · 2
        • amount_minorinteger (int64)Required

          Amount in minor units (cents for USD).

          at least 0

        • currencyMoneyCurrencyRequired

          ISO 4217 currency code. Only USD is supported.

          one of: "USD"

    • current_price_per_gpu_hourMoney

      The host's price per GPU-hour now, on 409 price_changed from createRental, the price a bid would win now on 409 bid_too_low, or the floor on 409 bid_below_floor; all-in, as the renter sees prices.

      Child fields · 2
      • amount_minorinteger (int64)Required

        Amount in minor units (cents for USD).

        at least 0

      • currencyMoneyCurrencyRequired

        ISO 4217 currency code. Only USD is supported.

        one of: "USD"

    • next_available_atstring (date-time)

      When the action is allowed again, on 429 benchmark_request_limited from requestHostBenchmark.

    • reasonPromoIneligibleReason

      Why 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_private of an image on a registry Legion takes sign-ins for (offer to add one with putRegistrySignIn), and on 422 registry_sign_in_rejected (the sign-in the registry refused). Only ever one of these four; registry_host names any host.

    • registry_hoststring

      . The registry host a credential is or would be for: on 422 image_private (offer to add one with createRegistryCredential), registry_sign_in_rejected, registry_credential_rejected, and the refusals of a registry (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_credential_in_use from deleteRegistryCredential and deleteRegistrySignIn. Oldest first.

      at most 100 items

      Child fields · 3
      • idstring (uuid)Required

      • namestringRequired

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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.com), on 403 invitation_for_another_account from getMyInvitation.

      at most 320 characters

  • 429Rate limited (`code` is `rate_limited`), or the organization asked the pull-through mirror to copy in too many different tags or digests of one repository today (`mirror_quota_exceeded`). Retry after the `Retry-After` seconds.

    Rate limited (code is rate_limited), or the organization asked the pull-through mirror to copy in too many different tags or digests of one repository today (mirror_quota_exceeded). Retry after the Retry-After seconds.

    Headers: Retry-After

    • typestringRequired

      URI reference identifying the problem type: the code's entry in the public error reference, https://legion.ambient.xyz/docs/errors#<code>. Branch on code, never on type.

    • titlestringRequired

    • statusintegerRequired

    • codestringRequired

      Stable machine-readable error code.

    • detailstring

    • instancestring

      The request path that produced the problem.

    • resource_idstring (uuid)

      The resource a conflict refers to, when there is one (egress_request_exists: the request already waiting; export_in_progress: the pending workspace export).

    • accessMeAccess

      Whether 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) or not_requested (not on the waitlist). Carried by Me (always approved for a member) and by the problem of a 403 access_not_approved, and of getMe's 403 no_organization.

      Child fields · 2
      • statestringRequired

        one of: "approved", "waitlisted", "not_requested"

      • emailstring (email)Required

        The verified email the state was decided on.

    • legalMeLegal

      The caller's consent to Legion's legal documents. required lists every document the consent step shows and acceptLegalDocuments takes, at its current version. accepted is true when the caller accepted the current version of every agree document; while it is false, every operation except getMe, acceptLegalDocuments, joinMyWaitlist and the wind-down operations (listing, stopping and deleting rentals; listing hosts, stopping new rentals on them and removing them) answers 403 terms_not_accepted.

      Child fields · 2
      • requiredarray of LegalDocumentRequired

        Child fields · 6
        • keyLegalDocumentKeyRequired

          A legal document: terms (Terms of Use), acceptable_use (Acceptable Use Policy), privacy (Privacy Policy), data_handling (Data Handling).

          one of: "terms", "acceptable_use", "privacy", "data_handling"

        • versionstringRequired

          The current version. A new version of an agree document must be accepted again.

        • effectivestring (date)Required

          The date the current version took effect.

        • titlestringRequired

        • urlstring (uri)Required

          The document's public page.

        • acceptancestringRequired

          agree: 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 HostRemovalBlockingRental

      Sorted by ID.

      at most 1000 items

      Child fields · 6
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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"

      • endablebooleanRequired

        Removing the host anyway (removeHost with force true) would end it: it is host_offline 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.

      • heldboolean

        On a preservation hold.

      • rented_by_youboolean

        The caller's own organization rented it, so the caller can open it (getRental). Only from removeHost; absent means false.

    • stored_data_rentalsarray of HostStoredDataRental

      . Sorted by ID.

      at most 1000 items

      Child fields · 8
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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)Required

        The size of its files on the host; with estimate_basis disk_share an upper bound.

      • estimate_basisBackupEstimateBasisRequired

        . What a backup's quote was computed on. disk_used: the size the rental's host last reported its workspace uses (disk_used_gib). disk_share: 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 (resources.disk_gib): 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 stale disk_used_gib) is charged the quote, not more.

        one of: "disk_used", "disk_share"

      • delete_afterstring (date-time)

        When its files are deleted (its delete_after); absent while held.

      • backup_stateBackupState

        Its renter's newest backup, when it has one.

      • rented_by_youboolean

        The caller's own organization rented it. Only on the public listener; absent means false.

    • available_untilstring (date-time)

      . On 409 host_maintenance from 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_maintenance from startRental of the renter's own rental, the window that keeps it stopped.

      Child fields · 4
      • startstring (date-time)Required

        When the window starts: the host's rentals stop then (after a 5-minute notice).

      • endstring (date-time)Required

        The 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_switchAdminOrgTestSwitch

      Child fields · 5
      • test_orgbooleanRequired

      • allowedbooleanRequired

      • blocking_rentalsarray of AdminOrgTestBlockingRentalRequired

        at most 100 items

        Child fields · 7
        • idstring (uuid)Required

        • nameFriendlyName

          A 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]$

        • stateRentalStateRequired

          starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • provider_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • host_idstring (uuid)Required

        • host_nameFriendlyName

          A 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_countintegerRequired

        at least 0

      • unpaid_earningsMoneyRequired

        Child fields · 2
        • amount_minorinteger (int64)Required

          Amount in minor units (cents for USD).

          at least 0

        • currencyMoneyCurrencyRequired

          ISO 4217 currency code. Only USD is supported.

          one of: "USD"

    • current_price_per_gpu_hourMoney

      The host's price per GPU-hour now, on 409 price_changed from createRental, the price a bid would win now on 409 bid_too_low, or the floor on 409 bid_below_floor; all-in, as the renter sees prices.

      Child fields · 2
      • amount_minorinteger (int64)Required

        Amount in minor units (cents for USD).

        at least 0

      • currencyMoneyCurrencyRequired

        ISO 4217 currency code. Only USD is supported.

        one of: "USD"

    • next_available_atstring (date-time)

      When the action is allowed again, on 429 benchmark_request_limited from requestHostBenchmark.

    • reasonPromoIneligibleReason

      Why 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_private of an image on a registry Legion takes sign-ins for (offer to add one with putRegistrySignIn), and on 422 registry_sign_in_rejected (the sign-in the registry refused). Only ever one of these four; registry_host names any host.

    • registry_hoststring

      . The registry host a credential is or would be for: on 422 image_private (offer to add one with createRegistryCredential), registry_sign_in_rejected, registry_credential_rejected, and the refusals of a registry (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_credential_in_use from deleteRegistryCredential and deleteRegistrySignIn. Oldest first.

      at most 100 items

      Child fields · 3
      • idstring (uuid)Required

      • namestringRequired

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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.com), on 403 invitation_for_another_account from getMyInvitation.

      at most 320 characters

  • 500An unexpected server error. Safe to retry.

    An unexpected server error. Safe to retry.

    • typestringRequired

      URI reference identifying the problem type.

    • titlestringRequired

    • statusintegerRequired

    • codestringRequired

      Stable machine-readable error code.

    • detailstring

    • instancestring

      The request path that produced the problem.

  • 503A dependency is unavailable (`terminal_signing_unavailable`; `image_registry_unavailable` when the image's registry did not answer in time or failed; `secrets_unavailable` when secret variables cannot be stored or read). Safe to retry.

    A dependency is unavailable (terminal_signing_unavailable; image_registry_unavailable when the image's registry did not answer in time or failed; secrets_unavailable when secret variables cannot be stored or read). Safe to retry.

    Headers: Retry-After

    • typestringRequired

      URI reference identifying the problem type: the code's entry in the public error reference, https://legion.ambient.xyz/docs/errors#<code>. Branch on code, never on type.

    • titlestringRequired

    • statusintegerRequired

    • codestringRequired

      Stable machine-readable error code.

    • detailstring

    • instancestring

      The request path that produced the problem.

    • resource_idstring (uuid)

      The resource a conflict refers to, when there is one (egress_request_exists: the request already waiting; export_in_progress: the pending workspace export).

    • accessMeAccess

      Whether 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) or not_requested (not on the waitlist). Carried by Me (always approved for a member) and by the problem of a 403 access_not_approved, and of getMe's 403 no_organization.

      Child fields · 2
      • statestringRequired

        one of: "approved", "waitlisted", "not_requested"

      • emailstring (email)Required

        The verified email the state was decided on.

    • legalMeLegal

      The caller's consent to Legion's legal documents. required lists every document the consent step shows and acceptLegalDocuments takes, at its current version. accepted is true when the caller accepted the current version of every agree document; while it is false, every operation except getMe, acceptLegalDocuments, joinMyWaitlist and the wind-down operations (listing, stopping and deleting rentals; listing hosts, stopping new rentals on them and removing them) answers 403 terms_not_accepted.

      Child fields · 2
      • requiredarray of LegalDocumentRequired

        Child fields · 6
        • keyLegalDocumentKeyRequired

          A legal document: terms (Terms of Use), acceptable_use (Acceptable Use Policy), privacy (Privacy Policy), data_handling (Data Handling).

          one of: "terms", "acceptable_use", "privacy", "data_handling"

        • versionstringRequired

          The current version. A new version of an agree document must be accepted again.

        • effectivestring (date)Required

          The date the current version took effect.

        • titlestringRequired

        • urlstring (uri)Required

          The document's public page.

        • acceptancestringRequired

          agree: 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 HostRemovalBlockingRental

      Sorted by ID.

      at most 1000 items

      Child fields · 6
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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"

      • endablebooleanRequired

        Removing the host anyway (removeHost with force true) would end it: it is host_offline 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.

      • heldboolean

        On a preservation hold.

      • rented_by_youboolean

        The caller's own organization rented it, so the caller can open it (getRental). Only from removeHost; absent means false.

    • stored_data_rentalsarray of HostStoredDataRental

      . Sorted by ID.

      at most 1000 items

      Child fields · 8
      • idstring (uuid)Required

      • nameFriendlyName

        A 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]$

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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)Required

        The size of its files on the host; with estimate_basis disk_share an upper bound.

      • estimate_basisBackupEstimateBasisRequired

        . What a backup's quote was computed on. disk_used: the size the rental's host last reported its workspace uses (disk_used_gib). disk_share: 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 (resources.disk_gib): 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 stale disk_used_gib) is charged the quote, not more.

        one of: "disk_used", "disk_share"

      • delete_afterstring (date-time)

        When its files are deleted (its delete_after); absent while held.

      • backup_stateBackupState

        Its renter's newest backup, when it has one.

      • rented_by_youboolean

        The caller's own organization rented it. Only on the public listener; absent means false.

    • available_untilstring (date-time)

      . On 409 host_maintenance from 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_maintenance from startRental of the renter's own rental, the window that keeps it stopped.

      Child fields · 4
      • startstring (date-time)Required

        When the window starts: the host's rentals stop then (after a 5-minute notice).

      • endstring (date-time)Required

        The 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_switchAdminOrgTestSwitch

      Child fields · 5
      • test_orgbooleanRequired

      • allowedbooleanRequired

      • blocking_rentalsarray of AdminOrgTestBlockingRentalRequired

        at most 100 items

        Child fields · 7
        • idstring (uuid)Required

        • nameFriendlyName

          A 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]$

        • stateRentalStateRequired

          starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • provider_orgOrgRequired

          Child fields · 2
          • idstring (uuid)Required

          • namestringRequired

        • host_idstring (uuid)Required

        • host_nameFriendlyName

          A 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_countintegerRequired

        at least 0

      • unpaid_earningsMoneyRequired

        Child fields · 2
        • amount_minorinteger (int64)Required

          Amount in minor units (cents for USD).

          at least 0

        • currencyMoneyCurrencyRequired

          ISO 4217 currency code. Only USD is supported.

          one of: "USD"

    • current_price_per_gpu_hourMoney

      The host's price per GPU-hour now, on 409 price_changed from createRental, the price a bid would win now on 409 bid_too_low, or the floor on 409 bid_below_floor; all-in, as the renter sees prices.

      Child fields · 2
      • amount_minorinteger (int64)Required

        Amount in minor units (cents for USD).

        at least 0

      • currencyMoneyCurrencyRequired

        ISO 4217 currency code. Only USD is supported.

        one of: "USD"

    • next_available_atstring (date-time)

      When the action is allowed again, on 429 benchmark_request_limited from requestHostBenchmark.

    • reasonPromoIneligibleReason

      Why 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_private of an image on a registry Legion takes sign-ins for (offer to add one with putRegistrySignIn), and on 422 registry_sign_in_rejected (the sign-in the registry refused). Only ever one of these four; registry_host names any host.

    • registry_hoststring

      . The registry host a credential is or would be for: on 422 image_private (offer to add one with createRegistryCredential), registry_sign_in_rejected, registry_credential_rejected, and the refusals of a registry (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_credential_in_use from deleteRegistryCredential and deleteRegistrySignIn. Oldest first.

      at most 100 items

      Child fields · 3
      • idstring (uuid)Required

      • namestringRequired

      • stateRentalStateRequired

        starting: GPUs allocated, waiting for the agent to start the container. Not billed. While the rental's image_phase is fetching the 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 to running when the host reports it running again. stopping: stop requested, waiting for the agent. Not billed. Becomes stopped without 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 an interruption_behavior: delete rental, which never stops with data. host_offline: the host stopped syncing. Not billed; returns to running when the host syncs again, and becomes failed once the host has not synced for HOST_STALE_AFTER (24 hours;). deleting: delete requested, waiting for the agent. Not billed. Becomes deleted without 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.com), on 403 invitation_for_another_account from getMyInvitation.

      at most 320 characters

Errors

Every operation can also answer the general codes on the errors page.