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

# Migrate from Another Provider

> Move an app from OpenAI or another gateway to Gloo AI in four steps, then verify it before you switch over.

Gloo AI is OpenAI-compatible, so most apps move by changing a base URL, a key and a model ID. Start on a [direct endpoint](/api-guides/endpoint-types): there is no platform fee, and you pay the model's published rate. Coming from another gateway? Direct endpoints cost what you would pay going straight to the model providers.

## Before you start

You need a funded Gloo AI Studio account and an API key. If you don't have them yet, follow steps 1 to 4 of the [Developer Quickstart](/getting-started/quickstart-developers).

## Move in four steps

**1. Point your client at Gloo**

Set the base URL to `https://platform.ai.gloo.com/ai/v2/direct` and use your Gloo API key as the key. The rest of the client call stays the same, with one exception for stateful Responses in step 3.

```python Python theme={null}
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.getenv("GLOO_API_KEY"),
    base_url="https://platform.ai.gloo.com/ai/v2/direct",
)
```

```javascript Node.js theme={null}
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.GLOO_API_KEY,
  baseURL: "https://platform.ai.gloo.com/ai/v2/direct",
});
```

**2. Use a Gloo model ID**

Gloo model IDs look like `gloo-<provider>-<model>`, for example `gloo-anthropic-claude-opus-5.5`. Find the ID for the model you use today on [Supported Models](/api-guides/supported-models) or with `GET /platform/v2/models`, which also returns each model's context window, capabilities and rates.

**3. Keep your call shape**

Both OpenAI formats work on direct endpoints, so you can keep the one you already use.

* **Chat Completions** (`client.chat.completions.create`) goes to `/ai/v2/direct/chat/completions`. See [Direct Completions](/api-guides/direct-completions).
* **Responses** (`client.responses.create`) goes to `/ai/v2/direct/responses`. See [Direct Responses](/api-guides/direct-responses). Direct Responses does not support `previous_response_id`. If your app chains a conversation that way, send the full history in `input` on each request instead.
* **Embeddings** (`client.embeddings.create`) uses the same base URL. See [Embeddings](/api-guides/embeddings).

If you use another provider's own SDK, switch that call to one of the OpenAI formats above.

**4. Test, then switch over**

Run a few real requests through Gloo before you move traffic. Read the model and `usage` in each response, and watch spend in [API Usage](/studio/api-usage). Keep your old base URL and key behind a setting so you can switch back in a deploy.

## Using a framework?

LangChain and CrewAI work by setting the `openai_api_base` parameter to the Gloo base URL and passing your API key. AutoGen's `OpenAIChatCompletionClient` takes `base_url` instead, and for models it does not recognize it also needs `model_info`; see AutoGen's migration guide. Editors and agents that accept a custom OpenAI-compatible provider work the same way. See [Libraries & SDKs](/api-guides/sdks-and-libraries).

## What you get on top

You can stay on direct, or add more when you need it.

* **Provider failover.** If the provider serving a model is failing, Gloo can send your request to another provider that serves the same model. See [Provider Failover](/api-guides/provider-failover).
* **Retired models keep working.** When a provider retires a model, requests are routed to its replacement. See [Model Lifecycle](/api-guides/model-lifecycle).
* **Guardrails and values alignment.** Switch to a [guarded endpoint](/api-guides/responses) for output moderation and `tradition` settings. Guarded endpoints add a 6.5% platform fee.
* **Your own content.** [Grounded Responses](/api-guides/grounded-responses) answer from your library. This needs Data Engine access.

## Parameters a model can't use

On [Direct Completions](/api-guides/direct-completions) and [Direct Responses](/api-guides/direct-responses), a sampling parameter the model can't take (such as `temperature` on some reasoning models) is dropped. The request still succeeds, and the parameter is listed in `ignored_params` in the response body, or by name in the `X-Ignored-Params` header on a stream. The guarded and grounded Completions and Responses endpoints report it the same way; [Embeddings](/api-guides/embeddings) does not. A value the provider rejects still returns `400` with `1001 / INVALID_REQUEST`. Check for both while you test. See [Errors](/api-reference/general/errors) for error handling.

## Need help?

Use **Support** at the bottom of the Studio sidebar. It is the fastest way to reach us. See [Get help](/getting-started/support).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.