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

> ## Agent Instructions
> For autonomous tasks, use live SaladCloud API responses for current state, availability, quotas, models, and other dynamic values. Use current OpenAPI specifications where provided for paths, schemas, required fields, and enums. Never invent endpoints, fields, prices, availability, quotas, models, or state. Prefer API workflows over Portal steps. Read before changing and never expose credentials, signed media URLs, prompts, or sensitive outputs. Retry only safe or idempotent operations with bounded backoff, honoring Retry-After. Verify every write with a read. Stop rather than repeat an uncertain non-idempotent or billable request. AI Gateway uses an organization-specific Bearer key and live /v1/models discovery. Do not delete, cancel, stop, or reduce capacity without explicit user intent. Bind shared operation IDs to the selected product path. Treat Container Engine instances as interruptible and local state as ephemeral. Install the SaladCloud skills (npx skills add https://docs.salad.com), start from the salad skill and /agents/overview; docs MCP: https://docs.salad.com/mcp.

# Quickstart

> Connect to SGS using HTTP CONNECT over TLS and begin using it in production

*Last Updated: October 10, 2024*

## Connecting

1. After you request SGS service in a region, SaladCloud will provision and test a new, dedicated SGS server before
   sending you its connection details, which will include a unique SGS hostname, port number, password, and other basic
   information.
   > [!NOTE]
   >
   > Note that this documentation assumes you are using HTTP CONNECT requests. SGS also supports HAProxy's PROXY v2
   > protocol. Learn how to use it [here.](https://docs.salad.com/gateway-service/explanation/proxy-v2.md)

2. All requests should be made through the SGS server using this connection information. The SGS server will then route
   them to the appropriate SaladCloud node. For example, `https://SESSION_ID:PASSWORD@HOSTNAME:PORT/`
   * Let's break down each component: `SESSION_ID`, `PASSWORD`, `HOSTNAME`, and `PORT`.
     * `SESSION_ID` can be anything you like, as a string encoded in ASCII or UTF8. There are no character length limits
       enforced. Each session ID will be associated with one SaladCloud node. Because all requests sent through a single
       session ID will be proxied through the same node, we recommend using separate session IDs for each of your end
       users. If a SaladCloud node goes offline for any reason, all connections that it was servicing will be
       automatically distributed to one or more nodes using a modified least connections algorithm.
     * `PASSWORD` is the password for connecting to SGS. It will be shared with you using a 1Password link before
       beginning the trial period.
     * `HOSTNAME` is the hostname of the SGS server. It is typically in the format `sgs-{unique_string}.salad.com`, and
       will be shared with you before beginning the trial period.
     * `PORT` is the port of the SGS server you should connect to. It will be shared with you before beginning the trial
       period.
       \[!NOTE] Proxy authentication with the SGS server MUST be made using TLS (https endpoint).

3. Using curl, you can check the IP address and region of a node connected to one of your SGS servers:

```shell sgs_connection.sh theme={null}
curl -x 'https://session123:PASSWORD@sgs-NAME.salad.com:PORT' https://www.ipinfo.io
```

> [!NOTE]
>
> Changing the session ID and resending this request will often - but not always - return a different IP address.
> Because of the nature of the least-loaded routing algorithm used by SGS, and the fact that SGS nodes can support
> multiple streaming connections simultaneously, multiple connections (session IDs) may be loaded on a single node.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.