# Sail Research ## Docs - [Overview](https://docs.sailresearch.com/index.md): Run long-horizon agents on Sail. - [Quickstart](https://docs.sailresearch.com/quickstart.md): Start using Sail with OpenAI clients - [AI Quickstart](https://docs.sailresearch.com/ai-quickstart.md): Set up your coding agent with Sail's docs MCP and workflow skills for migration and agent building. - [Models](https://docs.sailresearch.com/models.md): All models currently served by Sail - [Pricing](https://docs.sailresearch.com/pricing.md): Per-token pricing for Sail inference - [Completion windows](https://docs.sailresearch.com/completion-windows.md): Understanding completion windows and average agent trajectory time - [Supercache](https://docs.sailresearch.com/supercache.md): Store reusable prompt prefixes for ultra low-cost reads - [Images](https://docs.sailresearch.com/images.md): Send images to multimodal models - [LoRAs](https://docs.sailresearch.com/loras.md): Bring your own PEFT-trained LoRA adapters and run them on supported models - [Tinker](https://docs.sailresearch.com/tinker.md): Sample from Tinker-trained LoRA checkpoints on Sail with SailTokenCompleter - [Webhooks](https://docs.sailresearch.com/webhooks.md): Receive completion notifications via completion_webhook and webhook_token - [API support matrix](https://docs.sailresearch.com/support.md): What each Sail inference API supports today, and what's coming soon - [Data processing agreement](https://docs.sailresearch.com/dpa.md): How Sail securely handles customer data - [Building a tool-calling agent](https://docs.sailresearch.com/agents.md): Multi-turn tool-use conversations with the Sail API - [Connect the Docs MCP server](https://docs.sailresearch.com/mcp-server.md): Connect your agents to Sail's documentation over MCP. - [Using OpenCode with Sail](https://docs.sailresearch.com/opencode.md): Use OpenCode with Sail as your LLM provider. - [Sending requests at scale](https://docs.sailresearch.com/requests_at_scale.md): Best practices for submitting thousands of concurrent requests to the Sail API - [RL fine-tuning with Tinker](https://docs.sailresearch.com/tinker-rl.md): Train a LoRA with Tinker while running every rollout on Sail - [Migrate to Sail](https://docs.sailresearch.com/migrate.md): Drop-in migration from OpenAI-compatible providers to Sail. - [Sailboxes](https://docs.sailresearch.com/sailboxes.md): Efficient cloud environments for long-horizon agents - [Quickstart](https://docs.sailresearch.com/sailboxes-quickstart.md): Start your first Sailbox and run code inside it - [Sailbox Pricing](https://docs.sailresearch.com/sailboxes-pricing.md): Observed usage billing dimensions and rates for Sailboxes - [Images](https://docs.sailresearch.com/sailboxes-images.md): Build Sailbox images with packages, filesystems, local files, commands, and environment variables - [Networking](https://docs.sailresearch.com/sailboxes-networking.md): Expose HTTP services, raw TCP ports, and SSH from a Sailbox - [Custom Domains](https://docs.sailresearch.com/sailboxes-custom-domains.md): Serve a Sailbox HTTP listener on your own domain - [Filesystem](https://docs.sailresearch.com/sailboxes-filesystem.md): Read, write, and stream files in a running Sailbox - [Lifecycle](https://docs.sailresearch.com/sailboxes-lifecycle.md): Checkpoint, start from checkpoint, pause, sleep, resume, schedule wakes, upgrade, and terminate Sailboxes - [HTTP API](https://docs.sailresearch.com/sailboxes-http-api.md): Create and operate Sailboxes over plain HTTP - [Introduction](https://docs.sailresearch.com/voyages.md): Observability and timeline for long-running background agents on Sail - [Quickstart](https://docs.sailresearch.com/voyages-quickstart.md): Ship a Voyage-instrumented agent in 60 seconds - [Patterns & Best Practices](https://docs.sailresearch.com/voyages-patterns.md): Production patterns for multi-agent Sailbox work and subprocess attach - [List supported models](https://docs.sailresearch.com/api-reference/models-api/list-supported-models.md) - [Create a response](https://docs.sailresearch.com/api-reference/responses-api/create-a-response.md): Creates an OpenAI Responses API task. Returns 202 when background=true, otherwise returns 200 after completion. Foreground stream=true requests return OpenAI Responses Server-Sent Events. - [Retrieve a response](https://docs.sailresearch.com/api-reference/responses-api/retrieve-a-response.md) - [Create a chat completion](https://docs.sailresearch.com/api-reference/chat-completions-api/create-a-chat-completion.md): OpenAI-compatible Chat Completions endpoint. Supports streaming via stream: true, which returns a Server-Sent Events stream of chat.completion.chunk objects. - [Create an Anthropic message](https://docs.sailresearch.com/api-reference/messages-api/create-an-anthropic-message.md): Anthropic-compatible Messages endpoint supporting system prompts, tool calling, and Anthropic SSE framing after generation completes. - [Retrieve a message](https://docs.sailresearch.com/api-reference/messages-api/retrieve-a-message.md): Returns the current status of a queued message. Completed responses include the Anthropic message fields. Use this operation with the X-Sail-Message-Id returned after a non-streaming timeout. - [Count tokens for an Anthropic message](https://docs.sailresearch.com/api-reference/messages-api/count-tokens-for-an-anthropic-message.md): Counts the input tokens a create-message request would consume, without running the model. - [List batches](https://docs.sailresearch.com/api-reference/batches-api/list-batches.md): List batches with optional pagination. - [Create a batch](https://docs.sailresearch.com/api-reference/batches-api/create-a-batch.md): Submit a batch of requests for asynchronous processing. - [Get batch status](https://docs.sailresearch.com/api-reference/batches-api/get-batch-status.md): Retrieve the current status of a batch. - [Get batch request result](https://docs.sailresearch.com/api-reference/batches-api/get-batch-request-result.md): Retrieve the result of a specific request within a batch by its custom_id. - [Overview](https://docs.sailresearch.com/usage.md): Programmatic access to spend, usage, tokens, and latency - [Usage API endpoints](https://docs.sailresearch.com/usage-endpoints.md): Reference for every usage route, including spend, tokens, activity, and latency - [Sailboxes](https://docs.sailresearch.com/sailbox-sdk.md): The Sailbox class: create, operate, and tear down Sailboxes - [Images & Functions](https://docs.sailresearch.com/sailbox-sdk-images.md): Base images, the custom-image builder, and running Python functions in a Sailbox - [Apps](https://docs.sailresearch.com/sailbox-sdk-apps.md): The org-owned application a Sailbox belongs to - [Errors](https://docs.sailresearch.com/sailbox-sdk-errors.md): Sailbox and image error taxonomy - [whoami](https://docs.sailresearch.com/api-reference/identity/whoami.md): Returns the organization behind the API key, and the user when the key is user-scoped. Use it to tell your own Sailboxes apart from a teammate's by comparing `user_id` against `created_by_user_id`. - [Find or create an app](https://docs.sailresearch.com/api-reference/apps/find-or-create-an-app.md): Looks up an app by name and returns its id, which every Sailbox create needs. An app groups Sailboxes that belong to the same workload, and a listener allowlist that names an app lets every Sailbox in it through. - [List apps](https://docs.sailresearch.com/api-reference/apps/list-apps.md): Returns every app in your organization, including apps with no Sailboxes yet. - [List Sailboxes](https://docs.sailresearch.com/api-reference/lifecycle/list-sailboxes.md): Returns Sailboxes in your organization, most recently active first. Terminated Sailboxes stay in the list, so filter by `status` if you only want live ones. - [Create a Sailbox](https://docs.sailresearch.com/api-reference/lifecycle/create-a-sailbox.md): Creates a Sailbox and waits for startup to finish, which can take a few minutes. `image` has to describe an image that is ready to boot: a base image on its own, or one already built from that same spec through an SDK. - [Retrieve a Sailbox](https://docs.sailresearch.com/api-reference/lifecycle/retrieve-a-sailbox.md): Returns one Sailbox, including its latest observed resource usage. - [Pause a Sailbox](https://docs.sailresearch.com/api-reference/lifecycle/pause-a-sailbox.md): Saves the Sailbox's memory and filesystem and stops charging for compute. Published listeners stop answering. Call resume to bring it back with its processes intact. A Sailbox that mounts a volume, or that has an upgrade waiting, comes back cold instead, with the disk intact and nothing running. Any… - [Sleep a Sailbox](https://docs.sailresearch.com/api-reference/lifecycle/sleep-a-sailbox.md): Saves the Sailbox's memory and filesystem, stops charging for compute, and lets the Sailbox wake by itself when traffic arrives on a published listener. That first connection waits while the Sailbox comes back. - [Resume a Sailbox](https://docs.sailresearch.com/api-reference/lifecycle/resume-a-sailbox.md): Brings a paused or sleeping Sailbox back with its memory and running processes intact. - [Schedule a wake](https://docs.sailresearch.com/api-reference/lifecycle/schedule-a-wake.md): Sets the time a sleeping Sailbox comes back on its own. Give a time in the future. - [Set the automatic-sleep preference](https://docs.sailresearch.com/api-reference/lifecycle/set-the-automatic-sleep-preference.md): Replaces the Sailbox's automatic-sleep preference: whether Sail may sleep it automatically, and how long Sail waits first. The whole preference is replaced in one call, so send the complete shape you want. - [Upgrade a Sailbox](https://docs.sailresearch.com/api-reference/lifecycle/upgrade-a-sailbox.md): Moves the Sailbox onto the current Sail runtime. A running Sailbox restarts to pick it up, which stops running processes and clears memory, so pick the moment yourself. A paused or sleeping Sailbox records the upgrade and applies it on its next wake, and the response has `applied: false`. That wake… - [Terminate a Sailbox](https://docs.sailresearch.com/api-reference/lifecycle/terminate-a-sailbox.md): Shuts the Sailbox down for good and releases its resources. Billing stops. The Sailbox cannot be restarted, and anything not written to a volume or a checkpoint is gone. Terminating an already terminated Sailbox succeeds. - [Checkpoint a Sailbox](https://docs.sailresearch.com/api-reference/checkpoints/checkpoint-a-sailbox.md): Saves the Sailbox's filesystem and memory as a checkpoint you can start new Sailboxes from. The Sailbox is left as it was, so a running Sailbox keeps running and a sleeping or paused one stays down. - [Start a Sailbox from a checkpoint](https://docs.sailresearch.com/api-reference/checkpoints/start-a-sailbox-from-a-checkpoint.md): Creates a new Sailbox from a checkpoint you took earlier. It comes up with the memory and filesystem saved in the checkpoint, so processes the original was running carry on there. - [List published ports](https://docs.sailresearch.com/api-reference/networking/list-published-ports.md): Returns every port the Sailbox publishes, with the address to reach each one. This works on a paused or sleeping Sailbox and does not wake it. - [Publish a port](https://docs.sailresearch.com/api-reference/networking/publish-a-port.md): Publishes a port from inside the Sailbox so it can be reached from outside. This works on a running Sailbox without restarting it, and on a paused or sleeping one. - [Retrieve a published port](https://docs.sailresearch.com/api-reference/networking/retrieve-a-published-port.md): Returns one published port and the address to reach it. - [Unpublish a port](https://docs.sailresearch.com/api-reference/networking/unpublish-a-port.md): Stops serving traffic on a published port. This works whether the Sailbox is running, paused, or sleeping, and does not wake it. - [Get custom-domain DNS targets](https://docs.sailresearch.com/api-reference/networking/get-custom-domain-dns-targets.md): Returns the two hostnames to use in custom-domain DNS. Point an attached hostname or wildcard CNAME at `cname_target`. Point the `_acme-challenge` CNAME at `acme_challenge_target` to use one wildcard certificate for direct subdomains. Both targets are the same for every domain in your organization. - [List custom domains](https://docs.sailresearch.com/api-reference/networking/list-custom-domains.md): Returns every hostname of your own that serves this Sailbox, and the target to point DNS at. The target is the same across your organization, so a caller registering its first hostname can read it here first. - [Add a custom domain](https://docs.sailresearch.com/api-reference/networking/add-a-custom-domain.md): Serves a published `http` port under a hostname you own. - [Remove a custom domain](https://docs.sailresearch.com/api-reference/networking/remove-a-custom-domain.md): Stops serving the hostname and releases its certificate. The published port keeps serving its own address, and the body echoes the registration that was removed. - [Get headers that identify a Sailbox](https://docs.sailresearch.com/api-reference/networking/get-headers-that-identify-a-sailbox.md): Returns headers you attach to a request so it is recognized as coming from this Sailbox. Use them to reach a listener whose allowlist names an app when your code runs outside a Sailbox. - [List volumes](https://docs.sailresearch.com/api-reference/volumes/list-volumes.md): Returns the volumes in your organization, newest first. - [Create a volume](https://docs.sailresearch.com/api-reference/volumes/create-a-volume.md): Creates a volume you can mount into Sailboxes. Volume names are unique within an organization, so creating a name that already exists returns the existing volume rather than failing. That makes this safe to call on every start. - [Delete a volume](https://docs.sailresearch.com/api-reference/volumes/delete-a-volume.md): Deletes a volume. Nothing can mount it again and its contents are permanently unreachable. Terminate every Sailbox that still mounts it first, because a paused or sleeping Sailbox expects the volume when it wakes. A Sailbox that is already shutting down, or that failed and cannot be restored, no lon… - [Get your SSH certificate authority](https://docs.sailresearch.com/api-reference/ssh-access/get-your-ssh-certificate-authority.md): Returns the public key your organization's Sailboxes trust for SSH. It is created the first time you ask for it. - [Issue an SSH certificate](https://docs.sailresearch.com/api-reference/ssh-access/issue-an-ssh-certificate.md): Signs your SSH public key so you can connect to a Sailbox that has SSH turned on. Save the returned certificate next to your private key as `-cert.pub` and `ssh` presents it automatically. Certificates are short-lived, so ask for a fresh one rather than storing it long term. - [Get resource usage over time](https://docs.sailresearch.com/api-reference/usage/get-resource-usage-over-time.md): Returns CPU, memory, and disk usage for one Sailbox as a time series. - [Get Sailbox spend](https://docs.sailresearch.com/api-reference/usage/get-sailbox-spend.md): Returns Sailbox usage and estimated cost for your organization over a time window, with a per-Sailbox breakdown. Defaults to the current UTC calendar month up to now. Costs are reported in billionths of a US dollar, and the active portion is an estimate that settles when the Sailbox stops. - [Voyages](https://docs.sailresearch.com/voyages-sdk.md): The sail.voyage API: record agent and task trajectories - [Inference](https://docs.sailresearch.com/voyages-sdk-inference.md): Voyage-correlated wrappers over Sail's inference endpoints - [Errors](https://docs.sailresearch.com/voyages-sdk-errors.md): Voyage and inference exception taxonomy - [Tinker](https://docs.sailresearch.com/sdk-tinker.md): Use Sail inference inside Tinker RL/training loops: sail.SailTokenCompleter and Tinker checkpoint signed URL helpers - [CLI](https://docs.sailresearch.com/reference/cli.md): Install the sail command-line tool, plus every command grouped by area - [Python SDK](https://docs.sailresearch.com/reference/python-sdk.md): Python SDK installation and full reference - [TypeScript SDK](https://docs.sailresearch.com/reference/typescript-sdk.md): TypeScript SDK installation and full reference - [Rust SDK](https://docs.sailresearch.com/reference/rust-sdk.md): Rust SDK installation and API reference on docs.rs - [Configuration](https://docs.sailresearch.com/reference/sdk-configuration.md): How the SDK resolves endpoints and retries: sail.Config and sail.RetryPolicy ## OpenAPI Specs - [sailbox-openapi](https://docs.sailresearch.com/sailbox-openapi.json) - [openapi](https://docs.sailresearch.com/openapi.json)