# API reference

> Every operation of the Legion API you can call with an API key, and the public market API, by area.

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

- [Offers](https://legion.ambient.xyz/docs/api/offers): Search the market's GPU offers, read one host's offer, and the score formula.
- [Rentals](https://legion.ambient.xyz/docs/api/rentals): Rent GPUs, then list, stop, start and delete rentals, back them up and read their network.
- [Services](https://legion.ambient.xyz/docs/api/services): Public URLs for what you run on Legion, on a port of a rental or autoscaled on rented GPUs: create, change, pause and delete them, manage their keys, and read their replicas, usage and activity.
- [Images](https://legion.ambient.xyz/docs/api/images): Check a container image in its registry before you rent with it.
- [Billing](https://legion.ambient.xyz/docs/api/billing): Your organization's balance, ledger, charges, top-ups, auto top-up and promo codes, and a provider's earnings and payouts.
- [Network](https://legion.ambient.xyz/docs/api/network): Your organization's outbound allow-list, and requests to add a site to it.
- [Hosts](https://legion.ambient.xyz/docs/api/hosts): The hosts you provide: enrollment tokens, listings, names, benchmarks, network and removal.
- [Identity and keys](https://legion.ambient.xyz/docs/api/identity): Who a key acts as, API keys, saved SSH public keys and your organization's invitations.
- [Notifications](https://legion.ambient.xyz/docs/api/notifications): What the bell shows, marking it read, and which events your organization is emailed about and to whom.
- [Legal](https://legion.ambient.xyz/docs/api/legal): The current versions of Legion's legal documents.
- [Public market](https://legion.ambient.xyz/docs/api/public): An anonymous, cached summary of what can be rented now. No key needed.

The whole API as OpenAPI: https://legion.ambient.xyz/docs/openapi.json and https://legion.ambient.xyz/docs/openapi.yaml.
