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

# Overview

> The most cost-efficient serverless inference and agent sandboxes.

Sail serves trillions of tokens at unbeatable prices, with support for the best open-source models and your own LoRA fine-tunes.

To achieve maximum efficiency for long-horizon agents, we allow you to express latency tolerance with [completion windows](/completion-windows).

<Tabs>
  <Tab title="Chat Completions (OpenAI)">
    <CodeGroup>
      ```python Python theme={null}
      from openai import OpenAI

      client = OpenAI(
          base_url="https://api.sailresearch.com/v1",
          api_key="YOUR_SAIL_API_KEY",
      )

      completion = client.chat.completions.create(
          model="zai-org/GLM-5.3",
          messages=[{"role": "user", "content": "What are the top 3 things to do in San Francisco?"}],
      )

      print(completion.choices[0].message.content)
      ```

      ```typescript TypeScript theme={null}
      import OpenAI from "openai";

      const client = new OpenAI({
        baseURL: "https://api.sailresearch.com/v1",
        apiKey: process.env.SAIL_API_KEY,
      });

      const completion = await client.chat.completions.create({
        model: "zai-org/GLM-5.3",
        messages: [
          {
            role: "user",
            content: "What are the top 3 things to do in San Francisco?",
          },
        ],
      });

      console.log(completion.choices[0].message.content);
      ```

      ```bash cURL theme={null}
      curl https://api.sailresearch.com/v1/chat/completions \
        -H "Authorization: Bearer $SAIL_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "model": "zai-org/GLM-5.3",
          "messages": [
            {
              "role": "user",
              "content": "What are the top 3 things to do in San Francisco?"
            }
          ]
        }'
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Responses (OpenAI)">
    <CodeGroup>
      ```python Python theme={null}
      from openai import OpenAI

      client = OpenAI(
          base_url="https://api.sailresearch.com/v1",
          api_key="YOUR_SAIL_API_KEY",
      )

      response = client.responses.create(
          model="zai-org/GLM-5.3",
          input="What are the top 3 things to do in San Francisco?",
      )

      print(response.output_text)
      ```

      ```typescript TypeScript theme={null}
      import OpenAI from "openai";

      const client = new OpenAI({
        baseURL: "https://api.sailresearch.com/v1",
        apiKey: process.env.SAIL_API_KEY,
      });

      const response = await client.responses.create({
        model: "zai-org/GLM-5.3",
        input: "What are the top 3 things to do in San Francisco?",
      });

      console.log(response.output_text);
      ```

      ```bash cURL theme={null}
      curl https://api.sailresearch.com/v1/responses \
        -H "Authorization: Bearer $SAIL_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "model": "zai-org/GLM-5.3",
          "input": "What are the top 3 things to do in San Francisco?"
        }'
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Messages (Anthropic)">
    <CodeGroup>
      ```python Python theme={null}
      from anthropic import Anthropic

      client = Anthropic(
          base_url="https://api.sailresearch.com",
          api_key="YOUR_SAIL_API_KEY",
      )

      message = client.messages.create(
          model="zai-org/GLM-5.3",
          max_tokens=1024,
          messages=[{"role": "user", "content": "What are the top 3 things to do in San Francisco?"}],
      )

      for block in message.content:
          if block.type == "text":
              print(block.text)
      ```

      ```typescript TypeScript theme={null}
      import Anthropic from "@anthropic-ai/sdk";

      const client = new Anthropic({
        baseURL: "https://api.sailresearch.com",
        apiKey: process.env.SAIL_API_KEY,
      });

      const message = await client.messages.create({
        model: "zai-org/GLM-5.3",
        max_tokens: 1024,
        messages: [
          {
            role: "user",
            content: "What are the top 3 things to do in San Francisco?",
          },
        ],
      });

      for (const block of message.content) {
        if (block.type === "text") console.log(block.text);
      }
      ```

      ```bash cURL theme={null}
      curl https://api.sailresearch.com/v1/messages \
        -H "x-api-key: $SAIL_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{
          "model": "zai-org/GLM-5.3",
          "max_tokens": 1024,
          "messages": [
            {
              "role": "user",
              "content": "What are the top 3 things to do in San Francisco?"
            }
          ]
        }'
      ```
    </CodeGroup>
  </Tab>
</Tabs>

<div className="sail-home">
  <div className="sail-simple-cards">
    <a className="sail-simple-card" href="/models">
      <span className="sail-simple-card-art sail-simple-card-art--model" aria-hidden="true" />

      <span className="sail-simple-card-title">Run an AI model</span>

      <span className="sail-simple-card-desc">
        Run leading open-source AI models with our OpenAI and Anthropic-compatible inference API.
      </span>
    </a>

    <a className="sail-simple-card" href="/sailboxes">
      <span className="sail-simple-card-art sail-simple-card-art--sailbox" aria-hidden="true" />

      <span className="sail-simple-card-title">Create a Sailbox</span>

      <span className="sail-simple-card-desc">
        Give long-horizon agents persistent compute that can run indefinitely.
      </span>
    </a>

    <a className="sail-simple-card" href="/requests_at_scale">
      <span className="sail-simple-card-art sail-simple-card-art--scale" aria-hidden="true" />

      <span className="sail-simple-card-title">Send requests at scale</span>

      <span className="sail-simple-card-desc">
        Use completion windows and background requests for large workloads.
      </span>
    </a>
  </div>
</div>

## Intelligence at scale

More agents thinking longer and harder, with space to act and explore, can do incredible things:

<ul className="sail-uses">
  <li>
    <a className="link" href="https://detail.dev/" target="_blank" rel="noopener noreferrer">
      Detail
    </a>

    {" "}

    uses Sail inference to deeply scan codebases for their most consequential
    yet hard-to-catch bugs
  </li>

  <li>
    <a className="link" href="https://www.jackandjill.ai/" target="_blank" rel="noopener noreferrer">
      Jack & Jill
    </a>

    {" "}

    runs large-scale deep research with Sail inference, matching job seekers'
    resumes with job descriptions from thousands of employers
  </li>

  <li>
    We{" "}

    <a className="link" href="https://www.sailresearch.com/news/browsecomp-plus" target="_blank" rel="noopener noreferrer">
      won Browsecomp-Plus
    </a>

    , the AI deep research benchmark, using open models running on Sail
    inference
  </li>

  <li>
    We{" "}

    <a className="link" href="https://www.sailresearch.com/news/introducing-sailboxes-persistent-sandboxes" target="_blank" rel="noopener noreferrer">
      built Redis in Rust
    </a>

    {" "}

    with a swarm of 4 long-horizon coding agents running on Sailboxes with Sail
    inference over 27 hours
  </li>
</ul>

## Security & privacy

Sail has Zero Data Retention (ZDR) by default, is HIPAA and SOC 2-compliant, and does not train on any customer data without consent.

Read more about our security and privacy commitments [here](/security), or visit our Trust Center <a className="link" href="https://trust.sailresearch.com/" target="_blank" rel="noopener noreferrer">here</a>.
