# Legion docs

> Rent NVIDIA GPUs by the second, or earn from your own GPUs. Start here.

Source: https://legion.ambient.xyz/docs

Legion is a GPU marketplace run by Ambient. Renters rent NVIDIA GPUs on machines that independent providers run, pay by the second, and connect over SSH. Providers list their own machines and earn a share of what renters pay. Ambient takes payment from renters and pays providers.

## I want to rent

You pick an offer in the market, choose an image and an SSH key, and connect as root over SSH. You pay from your organization's prepaid credit, by the second while the rental is Running, and for storage while it's stopped.

- [Rent a GPU and SSH in](https://legion.ambient.xyz/docs/get-started/rent-a-gpu): your first rental, step by step.
- [The market](https://legion.ambient.xyz/docs/renting/market): read and filter offers.
- [Connecting](https://legion.ambient.xyz/docs/renting/connecting): SSH commands, SSH config, file transfer and the web terminal.
- [Credit and billing](https://legion.ambient.xyz/docs/renting/credit-and-billing): how charges add up.

## I want to earn

You install the Legion agent on a Linux machine with NVIDIA GPUs, a person at Ambient reviews it, and you set a price. Renters see your host in the market, and you earn your share of what they pay.

- [Add your first host](https://legion.ambient.xyz/docs/get-started/add-a-host): from install command to listed.
- [Host requirements](https://legion.ambient.xyz/docs/providing/host-requirements): check these before you install.
- [Earnings and payouts](https://legion.ambient.xyz/docs/providing/earnings-and-payouts): your share, and getting paid.

## I want to automate

Everything you do in the app works through the Legion API with an API key.

- [API overview](https://legion.ambient.xyz/docs/api/overview): base URL, conventions, and your first call.
- [Authentication](https://legion.ambient.xyz/docs/api/authentication): create and use an API key.
- [Public market API](https://legion.ambient.xyz/docs/api/public-market): what can be rented now, with no key.

## How the app is organized

The app has two workspaces. **Rent** holds Market, Rentals, Services and Spend. **Provide** holds Overview, Hosts and Earnings. **Network** and **Settings** serve both. You can switch workspaces at any time.

## Get help

Open **Help** in the app for short answers, or send a request from the [Support page](https://legion.ambient.xyz/support). You can also email [support@ambient.xyz](mailto:support@ambient.xyz). See [Support](https://legion.ambient.xyz/docs/account/support).
