Skip to main content

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.

OpenCode is an open-source coding agent. Sail is OpenAI-compatible, so plugging it in is just a config change.

Install

Follow the install instructions at opencode.ai. The most common path is:
curl -fsSL https://opencode.ai/install | bash

Get your API key

Sign up for Sail and create an API key.

Configure

Create your OpenCode config with Sail as the default provider:
mkdir -p ~/.config/opencode
Then put this in ~/.config/opencode/opencode.jsonc:
{
  "$schema": "https://opencode.ai/config.json",
  "model": "sail/moonshotai/Kimi-K2.5", // model for heavy lifting
  "small_model": "sail/openai/gpt-oss-20b", // model for lightweight tasks
  "provider": {
    "sail": {
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "https://api.sailresearch.com/v1",
        "apiKey": "YOUR_SAIL_API_KEY",
      },
      "models": {
        "moonshotai/Kimi-K2.5": { "name": "Kimi-K2.5" },
        "zai-org/GLM-5.1-FP8": { "name": "GLM-5.1" },
        "deepseek-ai/DeepSeek-V3.2": { "name": "DeepSeek-V3.2" },
        "openai/gpt-oss-20b": { "name": "gpt-oss-20b" },
        "openai/gpt-oss-120b": { "name": "gpt-oss-120b" },
        "MiniMaxAI/MiniMax-M2.7": { "name": "MiniMax-M2.7" },
        "google/gemma-4-31B-it": { "name": "Gemma 4 31B IT" },
      },
    },
  },
}
Replace YOUR_SAIL_API_KEY with the key you created above.

Run

opencode
Once OpenCode is up, run /models and search “Sail” to switch between any of the models you listed in your config.

Tips

  • What’s next — see OpenCode’s Usage guide.
  • New models — when Sail launches a new model, add it under provider.sail.models.