> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openserv.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate an existing integration

> Point an existing OpenAI or Anthropic integration at SERV Reasoning.

<Frame>
  <img src="https://mintcdn.com/openserv/wCXyJJTiOX6drWSJ/images/tutorials/migrate-existing-integration.webp?fit=max&auto=format&n=wCXyJJTiOX6drWSJ&q=85&s=2534295b1d0f21f8b07b7624c30b28a8" alt="An existing application request crossing from a provider gateway into the SERV gateway" width="1536" height="1024" data-path="images/tutorials/migrate-existing-integration.webp" />
</Frame>

For an OpenAI-compatible integration, update the key and base URL:

```diff theme={null}
 const client = new OpenAI({
-  apiKey: process.env.OPENAI_API_KEY,
+  apiKey: process.env.SERV_API_KEY,
+  baseURL: "https://inference-api.openserv.ai/v1",
 });
```

Then verify that every request has a system prompt, the model ID exists in the [catalog](../models), and token limits are high enough to avoid truncation.

For the official Anthropic SDK, use `baseURL: "https://inference-api.openserv.ai"` without `/v1` and keep the top-level `system` field.

See [SDK Integration](../sdk-integration) and [SDK Migration](../sdk-migration) for Python, Vercel AI SDK, LangChain, and raw HTTP examples.
