Minimal-diff guides to switch from OpenAI direct, Anthropic direct, or another platform. Start with a minimal request, then move production traffic gradually.
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.
# BeforeOPENAI_API_KEY=sk-proj-...# AfterOPENAI_API_KEY=sk-sealink-...OPENAI_BASE_URL=https://api.sealink.io/v1
The same SeaLink API Key can access the enabled model catalog; confirm capability, pricing, and context window before switching models.
Two differences: change base_url, drop any provider prefix in the model id (for example, 'provider/claude-opus-5-5' → just 'claude-opus-5-5'). If your previous platform already used bare model ids, only the base_url changes.
# Before — another platformclient = OpenAI(base_url="https://your-previous-provider.example.com/api/v1",api_key="<old-key>",)client.chat.completions.create(model="provider/claude-opus-5-5", # some platforms require a provider prefixmessages=[...],)# After — SeaLinkclient = OpenAI(base_url="https://api.sealink.io/v1",api_key="sk-sealink-...",)client.chat.completions.create(model="claude-opus-5-5", # No prefix; SeaLink canonical idmessages=[...],)
After migration, model access, usage records, balance, and billing are managed from one workspace.
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.
# Before — Anthropic SDKclient = anthropic.Anthropic(api_key="sk-ant-...")client.messages.create(model="claude-opus-5-5",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.io/anthropicANTHROPIC_API_KEY=sk-sealink-...# Option B — Switch to OpenAI SDK against SeaLink (recommended for new code)client = OpenAI(base_url="https://api.sealink.io/v1",api_key="sk-sealink-...",)client.chat.completions.create(model="claude-opus-5-5",messages=[{"role": "user", "content": "Hi"}],max_tokens=512,)
Before you migrate