# Migrating from the Anthropic API > Move an existing Anthropic-SDK codebase over by changing two values. _Source: https://aiprimetech.io/docs/guides/migration-from-anthropic/ · Home > Docs > Working with the API_ Because the gateway speaks the Messages format, migration is a configuration change. Request bodies, response parsing, streaming handlers and tool definitions all stay as they are. ## Python ```python from anthropic import Anthropic client = Anthropic( api_key="sk-your-gateway-key", # was your Anthropic key base_url="https://aiprimetech.io", # new line ) # everything below is unchanged ``` ## TypeScript ```typescript import Anthropic from "@anthropic-ai/sdk"; const client = new Anthropic({ apiKey: process.env.CLAUDEAPIKEY, baseURL: "https://aiprimetech.io", }); ``` ## Environment-only migration ```bash export ANTHROPIC_BASE_URL="https://aiprimetech.io" export ANTHROPIC_API_KEY="sk-your-gateway-key" ``` ## Migration checklist 1. Change the base URL and the key. No `/v1` suffix for Anthropic clients. 2. Map model ids — see [Models](/docs/getting-started/models/). Ids are pinned, so `claude-3-5-sonnet-20241022` style names from an older integration need updating to a current id. 3. Re-run your test suite. Response shapes are identical, so anything that breaks is a model-id or base-URL issue. 4. Check streaming if you use it: the event shape is unchanged, but any hardcoded hostname in a proxy or allowlist needs updating. 5. Move one service first and compare outputs before switching everything. ## What does not carry over - Anthropic Console features — workbench, org billing, per-workspace limits — are Anthropic products and have no equivalent here. - Batch API and any beta feature not exposed by this gateway. Check [Overview](/docs/api-reference/overview/) for the current endpoint list. - Contractual terms. If you need a DPA or SLA signed by Anthropic, stay on the official API. - [Base URLs](https://aiprimetech.io/docs/getting-started/base-urls/) — The suffix rule - [Models](https://aiprimetech.io/docs/getting-started/models/) — Id mapping - [Python SDK](https://aiprimetech.io/docs/sdks/python/) — Full example --- _ClaudeAPIKey.dev is an independently operated, Anthropic-compatible API gateway. Not affiliated with Anthropic._