> ## Documentation Index
> Fetch the complete documentation index at: https://docs.salad.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Using the API

> Start integrating directly with SaladCloud's robust API

*Last Updated: October 10, 2024*

The SaladCloud API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded
request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

You can find OpenAPI specifications for all of our public APIs
[here](https://github.com/SaladTechnologies/salad-cloud-docs/tree/main/api-specs).

## Authentication

Each API request is authenticated with an API access token that can be accessed via the Web Portal. Each user has a
unique API token that grants API access to any Organization, Project, or Container group that the user has access to. If
you need to get a new API Token, you are able to refresh API tokens directly from the Web Portal.

This API token should be included in the `Salad-Api-Key` header of each request.

```http theme={null}
Salad-Api-Key: YOUR_API_KEY
```

This authentication scheme is also used to access container groups (when authentication is enabled) and inference
endpoints.

## Get your SaladCloud API Key

Navigate to the `API Access` section under the account drop down

<img src="https://mintcdn.com/salad/B_utM-6XUMV1Xhv8/reference/images/account-dropdown.png?fit=max&auto=format&n=B_utM-6XUMV1Xhv8&q=85&s=31d157e700518548281f5bf653efbfe6" alt="Account Drop Down Menu" width="254" height="219" data-path="reference/images/account-dropdown.png" />

Copy your API key from the `API Access` page. Be sure to store this key securely, as it is the only way to access the
SaladCloud APIs.

<img src="https://mintcdn.com/salad/MF5npb_t8nHGysAi/reference/images/api-access-key.png?fit=max&auto=format&n=MF5npb_t8nHGysAi&q=85&s=aed48b93a401ce11c1ac70acbdecd18e" alt="API Key Retrieval Screen" width="1056" height="370" data-path="reference/images/api-access-key.png" />

## Refreshing API Keys

If you need to update your API key for any reason, you can refresh the API key from the `API Access` page.

<Note>
  When you refresh an API token, the previous token is immediately invalidated and will not longer grant API access.
</Note>

## Rate Limits

SaladCloud's servers enforce rate limits to ensure our APIs are responsive as we grow. The rate limit is tied to an
individual API key and set to 240 requests per minute. If your team would like a higher rate limit, please
[reach out to our team](/support/contact).

## Errors

<Note>Errors from the SaladCloud API may come as HTML documents. Be sure to handle this case in your application.</Note>

SaladCloud uses conventional HTTP response codes to indicate the success or failure of an API request. In general:

* Codes in the 2xx range indicate success.
* Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was
  omitted, a change failed, etc.).
* Codes in the 5xx range indicate an error with SaladCloud's servers (these are rare).
