# Get rental transfer

> GET /v1/rentals/{rental_id}/transfer. The bytes sent toward the renter by this rental through the SSH gateway (ssh), exposed ports (ports) and the web terminal (terminal), this UTC month and…

Source: https://legion.ambient.xyz/docs/api/rentals/get-rental-transfer

`GET https://api.legion.ambient.xyz/v1/rentals/{rental_id}/transfer`

Authenticate with an API key: `Authorization: Bearer $LEGION_API_KEY`.

The bytes sent toward the renter by this rental through the SSH gateway (`ssh`), exposed ports (`ports`)
and the web terminal (`terminal`), this UTC month and over the last 30 days. Relay traffic is free up to
`org_free_allowance_bytes` per organization per UTC month, counted over all of the organization's rentals;
above it every GiB costs `price_cents_per_gib` (rounded down to whole cents over the month's total, charged
as the traffic arrives). Bytes appear within a minute or two of being sent. A price change applies to
traffic that arrives after it. The figures come from Legion, never hard-coded in a client. Needs
`rentals.manage`. A rental that is not the caller's organization's is 404 `not_found`.

## Path parameters

- `rental_id`, string (uuid), required

## Responses

### 200

The rental's transfer.

- `rental_id`, string (uuid), required
- `month`, string, required
- `channels`, array of TransferChannelBytes, required: This rental's bytes out this month, one entry for each channel, in the order `ssh`, `ports`, `terminal`.
  - `channel`, TransferChannel, required: Where relayed bytes crossed: `ssh` (the SSH gateway), `ports` (an exposed port on ambi.run), `terminal` (the web terminal).
  - `bytes_out`, integer (int64), required: Bytes sent toward the renter on this channel.
- `bytes_out_total`, integer (int64), required: This rental's bytes out this month, all channels.
- `this_rental_charged_cents`, integer (int64), required: What this rental's traffic has been charged this month, in US cents.
- `bytes_out_last_30_days`, integer (int64), required: This rental's bytes out over the last 30 days (or since it started), all channels.
- `org_bytes_out_month`, integer (int64), required: The organization's bytes out this month, all rentals.
- `org_free_allowance_bytes`, integer (int64), required: The free relay allowance per organization per month.
- `org_free_remaining_bytes`, integer (int64), required: What is left of the allowance this month.
- `price_cents_per_gib`, integer (int64), required: Cents per GiB above the allowance.
- `org_charged_cents_month`, integer (int64), required: What the organization has been charged for relay traffic this month, in US cents.

Example:

```json
{
  "rental_id": "0192f1a2-7c3d-7e4f-8a9b-0c1d2e3f4a5b",
  "month": "2026-11",
  "channels": [
    {
      "channel": "ssh",
      "bytes_out": 0
    }
  ],
  "bytes_out_total": 0,
  "this_rental_charged_cents": 0,
  "bytes_out_last_30_days": 0,
  "org_bytes_out_month": 0,
  "org_free_allowance_bytes": 0,
  "org_free_remaining_bytes": 0,
  "price_cents_per_gib": 0,
  "org_charged_cents_month": 0
}
```

### 400

The request is malformed or fails validation. An image reference that
is not a container image reference answers `invalid_image_reference`.

### 401

Missing, unknown, expired or revoked credentials.

### 403

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

### 404

The resource does not exist or belongs to another organization.

### 500

An unexpected server error. Safe to retry.

## Errors

- 403 [`no_organization`](https://legion.ambient.xyz/docs/errors#no_organization)

## Example request

```sh
curl -s "https://api.legion.ambient.xyz/v1/rentals/$RENTAL_ID/transfer" \
  -H "Authorization: Bearer $LEGION_API_KEY"
```
