SeaLink
Sign up
← Docs

Migrating to SeaLink

Minimal-diff guides to switch from OpenAI direct, Anthropic direct, or another platform. Should take <10 minutes.

From OpenAI direct

Change two env vars. All existing code stays. Use SeaLink's model ids (gpt-4o, gpt-4o-mini, o3-mini, etc.).

.env
# Before
OPENAI_API_KEY=sk-proj-...
# After
OPENAI_API_KEY=sk-sealink-...
OPENAI_BASE_URL=https://api.sealink.asia/v1

Bonus: this migration also unlocks Claude / Qwen / Doubao / Kimi from the same key — just change the model id.

From another platform

Two differences: change base_url, drop any provider prefix in the model id ('anthropic/' → just 'claude-sonnet-4-6'). If your previous platform already used bare model ids, only the base_url changes.

Python
# Before — another platform
client = OpenAI(
base_url="https://your-previous-provider.example.com/api/v1",
api_key="<old-key>",
)
client.chat.completions.create(
model="anthropic/claude-sonnet-4-6", # some platforms require a provider prefix
messages=[...],
)
# After — SeaLink
client = OpenAI(
base_url="https://api.sealink.asia/v1",
api_key="sk-sealink-...",
)
client.chat.completions.create(
model="claude-sonnet-4-6", # No prefix; SeaLink canonical id
messages=[...],
)

What you also get: Singapore billing, local SEA wallet payments, scenario-based model catalog, EN/中/泰 console.

From Anthropic direct

Two options — A keeps the Anthropic SDK and just changes env vars; B switches to the OpenAI SDK (recommended for new code; one client to call any model).

Python
# Before — Anthropic SDK
client = anthropic.Anthropic(api_key="sk-ant-...")
client.messages.create(
model="claude-sonnet-4-20251022",
max_tokens=512,
messages=[{"role": "user", "content": "Hi"}],
)
# Option A — Use SeaLink's Anthropic-compatible endpoint (zero code changes
# beyond the env vars)
ANTHROPIC_BASE_URL=https://api.sealink.asia/anthropic
ANTHROPIC_API_KEY=sk-sealink-...
# Option B — Switch to OpenAI SDK against SeaLink (recommended for new code)
client = OpenAI(
base_url="https://api.sealink.asia/v1",
api_key="sk-sealink-...",
)
client.chat.completions.create(
model="claude-sonnet-4-6",
messages=[{"role": "user", "content": "Hi"}],
max_tokens=512,
)

Before you migrate

  • SeaLink bills separately; keep old vendor balance until you've fully cut over.
  • If you rely on prompt caching / fine-tuning / batch API, see /docs/caching; fine-tuning isn't in v0.
  • Rate tier resets. New SeaLink accounts default to 60 RPM; email hello@sealink.asia for higher tiers.
  • Webhooks / event subscriptions arrive in v1 (see /docs/webhooks).