SeaLinkSeaLink
/
← Docs

Migrating to SeaLink

Minimal-diff guides to switch from OpenAI direct, Anthropic direct, or another platform. Start with a minimal request, then move production traffic gradually.

From OpenAI direct

Usually you only replace the API key and base URL. Use model IDs from SeaLink's model catalog and verify with real requests before launch.

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

The same SeaLink API Key can access the enabled model catalog; confirm capability, pricing, and context window before switching models.

From another platform

Two differences: change base_url, drop any provider prefix in the model id ('anthropic/' → just 'qwen3-max'). 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/qwen3-max", # some platforms require a provider prefix
messages=[...],
)
# After — SeaLink
client = OpenAI(
base_url="https://test.sealink.io/v1",
api_key="sk-sealink-...",
)
client.chat.completions.create(
model="qwen3-max", # No prefix; SeaLink canonical id
messages=[...],
)

After migration, model access, usage records, balance, and billing are managed from one workspace.

From Anthropic direct

Two options: A keeps the Anthropic SDK and changes environment variables; B switches to the OpenAI SDK. For new projects that use multiple chat model families, B is usually easier to maintain.

Python
# Before — Anthropic SDK
client = anthropic.Anthropic(api_key="sk-ant-...")
client.messages.create(
model="claude-sonnet-4-6",
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://test.sealink.io/anthropic
ANTHROPIC_API_KEY=sk-sealink-...
# Option B — Switch to OpenAI SDK against SeaLink (recommended for new code)
client = OpenAI(
base_url="https://test.sealink.io/v1",
api_key="sk-sealink-...",
)
client.chat.completions.create(
model="qwen3-max",
messages=[{"role": "user", "content": "Hi"}],
max_tokens=512,
)

Before you migrate

  • SeaLink usage is billed separately; keep the old vendor account active until production traffic has fully cut over and been verified.
  • If you rely on prompt caching / fine-tuning / batch API, see /docs/caching; fine-tuning isn't yet supported.
  • Rate tier resets. New SeaLink accounts default to 100 RPM; email sales@sealink.io for higher tiers.