SAI Marine AI GATEWAY
G
Khách
Đăng nhập để chat
Đăng nhập / Đăng ký
AI giá rẻ đang hoạt động Bắt đầu
OpenAI Compatible

Tài Liệu & Hướng Dẫn Cài Đặt

Mười hai hướng dẫn ngắn: một base URL, một API key, cùng một mẫu cài đặt cho mọi công cụ. Tài liệu API đầy đủ xem tại trang Tài Liệu API.

12 hướng dẫn
Quick Start
General

Call the gateway in under a minute: one base URL, one API key, any model.

  1. Create an API key at API Keys — keys start with sk-sm- and are shown in full only once.
  2. Send a chat request to the chat completions endpoint with the Authorization: Bearer header.
  3. List available models at the models endpoint and pick a model id from the Models page.
  4. Streaming works with server-sent events (SSE): add "stream": true to the request body.
  5. Token usage is tracked in real time on the Usage page; costs are billed per token.
curl https://sai-marine.com/v1/chat/completions \
  -H "Authorization: Bearer sk-sm-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"model": "deepseek-v4.1-flash:free", "messages": [{"role": "user", "content": "Hello!"}]}'
9Router
Routers

Send 9Router traffic through the gateway instead of configuring each provider separately.

  1. Open 9Router provider settings and add a new OpenAI-compatible provider.
  2. Set the base URL to the gateway base URL and paste your sk-sm- API key.
  3. Choose a model id from the Models page as the default model.
  4. Save and send a test prompt — usage shows up on the Usage page like any API call.
Base URL: https://sai-marine.com/v1
API Key: sk-sm-your-api-key
Model: deepseek-v4.1-flash:free
Zcode
AI IDEs

Use gateway models inside the Zcode editor.

  1. Open Zcode settings and find the AI provider / model section.
  2. Add a custom OpenAI-compatible provider with the gateway base URL.
  3. Paste your sk-sm- API key and pick a model id from the Models page.
  4. Restart the editor if the new provider does not appear, then chat from the AI panel.
Base URL: https://sai-marine.com/v1
API Key: sk-sm-your-api-key
Model: deepseek-v4.1-flash:free
Cursor
AI IDEs

Point Cursor at the gateway to chat and edit code with any model.

  1. Open Cursor Settings, go to Models, and enable the OpenAI API key option.
  2. Paste your sk-sm- API key and set the OpenAI base URL to the gateway base URL.
  3. Add the model id from the Models page in the model list and verify it.
  4. Use Ctrl+K for inline edits or Ctrl+L to chat with the whole codebase.
{
  "openai.baseURL": "https://sai-marine.com/v1",
  "openai.apiKey": "sk-sm-your-api-key",
  "cursor.model": "deepseek-v4.1-flash:free"
}
Void
AI IDEs

Connect the Void editor to the gateway as a custom provider.

  1. Open Void settings and add a custom OpenAI-compatible provider.
  2. Enter the gateway base URL and your sk-sm- API key.
  3. Select a model id from the Models page as the chat model.
  4. Open the agent panel and ask it to read or edit files in your project.
Base URL: https://sai-marine.com/v1
API Key: sk-sm-your-api-key
Model: deepseek-v4.1-flash:free
Claude Code
CLI

Run the Claude Code terminal agent against the gateway.

  1. Install Claude Code, then set the base URL and API key as environment variables.
  2. Start the agent in your project folder with the claude command.
  3. Pick a model id from the Models page when the agent asks which model to use.
  4. Every prompt is billed like a normal API call and appears on the Usage page.
export ANTHROPIC_BASE_URL="https://sai-marine.com/v1"
export ANTHROPIC_API_KEY="sk-sm-your-api-key"
claude
Codex
CLI

Use the Codex CLI coding agent with gateway models.

  1. Install the Codex CLI and open its config file.
  2. Add a custom provider with the gateway base URL and your sk-sm- API key.
  3. Set the default model to a model id from the Models page.
  4. Run codex in a project folder and describe the change you want.
Base URL: https://sai-marine.com/v1
API Key: sk-sm-your-api-key
Model: deepseek-v4.1-flash:free
OpenCode
CLI

Configure the OpenCode terminal agent with the gateway provider.

  1. Install OpenCode and create its config file if you do not have one yet.
  2. Add a provider entry pointing at the gateway base URL with your API key.
  3. Choose a model id from the Models page as the default model.
  4. Launch opencode and chat — files, shell commands and edits run in your terminal.
{
  "provider": {
 "sai-marine": {
 "npm": "@ai-sdk/openai-compatible",
 "baseURL": "https://sai-marine.com/v1",
 "apiKey": "sk-sm-your-api-key",
 "models": { "deepseek-v4.1-flash:free": {} }
 }
  }
}
Cline
AI Agents

Let the Cline agent in VS Code edit files and run commands via the gateway.

  1. Install the Cline extension in VS Code and open its settings.
  2. Choose the OpenAI-compatible provider and enter the gateway base URL.
  3. Paste your sk-sm- API key and a model id from the Models page.
  4. Describe a task in plain language; approve each file edit and terminal command.
{
  "apiProvider": "openai-compatible",
  "openAiBaseUrl": "https://sai-marine.com/v1",
  "openAiApiKey": "sk-sm-your-api-key",
  "openAiModelId": "deepseek-v4.1-flash:free"
}
Cherry Studio
AI Agents

Chat with gateway models from the Cherry Studio desktop app.

  1. Open Cherry Studio settings and add a new provider.
  2. Select the OpenAI-compatible provider type.
  3. Enter the gateway base URL, your sk-sm- API key, and a model id.
  4. Start a new chat thread — attachments and web search work as usual.
Provider: OpenAI Compatible
Base URL: https://sai-marine.com/v1
API Key: sk-sm-your-api-key
Model: deepseek-v4.1-flash:free
DeepSeek Harness
AI Agents

Run agent workflows through the harness with the gateway as the backend.

  1. Open the harness provider or model configuration.
  2. Add an OpenAI-compatible endpoint with the gateway base URL.
  3. Paste your sk-sm- API key and choose a model id from the Models page.
  4. Run a workflow and check token usage on the Usage page afterwards.
Base URL: https://sai-marine.com/v1
API Key: sk-sm-your-api-key
Model: deepseek-v4.1-flash:free
Hermes Agent
AI Agents

Connect the Hermes agent framework to the gateway API.

  1. Open the agent configuration and select a custom OpenAI-compatible provider.
  2. Enter the gateway base URL and your sk-sm- API key.
  3. Set the default model to a model id from the Models page.
  4. Start the agent and give it a task; all calls are billed per token as usual.
Base URL: https://sai-marine.com/v1
API Key: sk-sm-your-api-key
Model: deepseek-v4.1-flash:free