Skip to content

List the organization's ledger entries

API keyPaginated

Every change to the organization's balance and provider earnings, newest first. Entries are never changed or removed; a correction is a new entry. Paging never skips or repeats an entry, and entries newer than the first page's newest never appear on later pages; start again from the first page to see them. A cursor is valid only for the organization it was returned for, and not under the other account filter (400 invalid_cursor). Requires billing.read.

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

Paginated: pass the answer's next_cursor as cursor for the next page. Pagination

GETEndpointhttps://api.legion.ambient.xyz/v1/billing/ledger
curl
curl -s "https://api.legion.ambient.xyz/v1/billing/ledger" \
  -H "Authorization: Bearer $LEGION_API_KEY"
Response 200
{
  "items": [
    {
      "id": "string",
      "account": "balance",
      "amount": {
        "amount_minor": -250,
        "currency": "USD"
      },
      "cause": "usage",
      "rental_id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
      "label": "string",
      "reason": "string",
      "occurred_at": "2026-10-15T12:00:00Z",
      "recorded_at": "2026-10-15T12:00:00Z",
      "promo": {
        "amount_minor": -250,
        "currency": "USD"
      }
    }
  ],
  "next_cursor": "string"
}

Example values.

Query parameters

  • cursorstring

    Opaque cursor from a previous page's next_cursor.

  • limitinteger

    1–100 · default 50

  • accountLedgerAccount

    Only entries of this account. Both accounts when absent.

Responses

  • 200A page of entries.

    A page of entries.

    • itemsarray of LedgerEntryRequired

      Child fields · 10
      • idstringRequired

        Opaque, stable identifier of the entry.

      • accountLedgerAccountRequired

        balance: the prepaid balance renting spends from. earnings: what the organization's hosts earned, less payouts.

        one of: "balance", "earnings"

      • amountSignedMoneyRequired

        An amount of money in minor units (cents for USD) that may be negative: a debit, a balance below zero, or an overpaid provider.

        Child fields · 2
        • amount_minorinteger (int64)Required

        • currencyMoneyCurrencyRequired

          ISO 4217 currency code. Only USD is supported.

          one of: "USD"

      • causeLedgerCauseRequired

        usage: a billed interval of a running rental (a debit on balance for the renter, a credit on earnings for the provider). top_up, adjustment: changes to the balance made by Ambient. payout: money Ambient paid to the provider. earnings_recovery: earnings Ambient took back from a provider implicated in payment fraud. refund, chargeback: money returned to the organization's payment method outside a Legion top-up, debited from balance. storage: the disk a stopped rental kept on its host while the organization had credit, debited and credited as usage is. backup: a backup's charge (negative) or refund (positive) on balance, and a further download link's charge; all of it Ambient's, never on earnings. Promo codes, all on balance: promo_credit (+) promo credit granted, promo_discount (+) a usage discount's rebate of a compute charge, promo_expiry (-) promo credit that expired unused, promo_clawback (-) promo credit taken back (a revoke, or the refund or dispute of the top-up that earned a bonus). transfer: a charge (negative) for data Legion sent out, on balance: a workspace export's download link or relay traffic (SSH gateway, exposed ports, web terminal) above the month's free allowance; all of it Ambient's, never on earnings. dispute_clawback (on earnings): earnings taken back from a provider because the renter's bank reversed the payment that funded the rentals (a chargeback); positive when the dispute was won and the earnings were given back.

        one of: "usage", "top_up", "adjustment", "payout", "earnings_recovery", "refund", "chargeback", "storage", "backup", "promo_credit", "promo_discount", "promo_expiry", "promo_clawback", "transfer", "dispute_clawback"

      • rental_idstring (uuid)

        The rental billed, on usage entries, and the rental a backup or transfer charge was for.

      • labelstring

        : plain words for what the entry was for, set on transfer entries: Data transfer (exports) (a workspace export's download link), Data transfer (relay) (SSH, exposed-port and web terminal traffic above the free allowance). Absent on other causes.

      • reasonstring

        Ambient's note on top_up, adjustment, payout, refund and chargeback entries.

      • occurred_atstring (date-time)Required

        End of the billed interval for usage; when Ambient recorded the credit otherwise.

      • recorded_atstring (date-time)Required

      • promoSignedMoney

        : the part of amount that was promo credit, same sign (a $10.00 charge paid $6.00 from promo credit has amount -1000 and promo -600). Absent when none.

        Child fields · 2
        • amount_minorinteger (int64)Required

        • currencyMoneyCurrencyRequired

          ISO 4217 currency code. Only USD is supported.

          one of: "USD"

    • next_cursorstring

  • 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

  • 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

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

  • 503The billing service failed or did not answer within 3 seconds (`billing_unavailable`). Nothing changed; retry with backoff.

    The billing service failed or did not answer within 3 seconds (billing_unavailable). Nothing changed; retry with backoff.

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