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

# Moving an existing app over.

> You already have code calling OpenAI, Anthropic, or an aggregator. Here is exactly what changes — usually two lines — and the handful of things worth checking before you cut traffic over.

## What actually changes

| From | Change the base URL to | Change the key to | Change the model to |
| - | - | - | - |
| OpenAI | `https://api.sideren.io/v1` | your `sdn_` key | a catalog id such as `@sdn/glm-5.3` (optional at first — see below) |
| Anthropic | `https://api.sideren.io` | your `sdn_` key | a catalog id (optional at first) |
| An OpenAI-compatible aggregator | `https://api.sideren.io/v1` | your `sdn_` key | a catalog id |

That is the whole migration for most codebases. Your SDK, your request shapes, your
streaming code, your retry logic and your tool definitions all stay exactly as they are.

<CodeGroup>
  ```python From OpenAI theme={null}
   from openai import OpenAI

   client = OpenAI(
  +    base_url="https://api.sideren.io/v1",
  +    api_key=os.environ["SIDEREN_API_KEY"],
   )
  ```

  ```python From Anthropic theme={null}
   from anthropic import Anthropic

   client = Anthropic(
  +    base_url="https://api.sideren.io",
  +    api_key=os.environ["SIDEREN_API_KEY"],
   )
  ```

  ```ts TypeScript theme={null}
   import OpenAI from "openai";

   const client = new OpenAI({
  +  baseURL: "https://api.sideren.io/v1",
  +  apiKey: process.env.SIDEREN_API_KEY,
   });
  ```
</CodeGroup>

## You can leave the model ids alone at first

A finite list of stock ids that SDKs commonly ship hard-coded — `gpt-4o`,
`claude-sonnet-4-5`, `o3`, `codex` and others — resolve to catalog models, so an app you
have not fully audited keeps working the moment you flip the base URL.

Treat that as a bridge, not a destination. Move to catalog ids before you depend on
specific behavior: the compatibility mapping points at whichever model is the right landing
spot today, and it can move. See [Model routing](/guides/model-routing).

```sh title="Find what you're actually sending" theme={null}
grep -rn 'gpt-4o\|claude-\|o3-\|gpt-5' src/ | grep -v node_modules
```

## Check these five things

<Steps>
  <Step title="Model capabilities">
    Vision, documents, tools and structured output are per-model. Read
    `capabilities` and `supported_parameters` off
    [`GET /v1/models`](/api/models-endpoint) for the ids you plan to use — a capability the
    model cannot guarantee is a `422`, not a silent downgrade.
  </Step>

  <Step title="Output ceilings on reasoning models">
    Hidden reasoning counts against `max_tokens`. A ceiling tuned for a non-reasoning model
    can be consumed entirely by thinking. See [Reasoning](/guides/reasoning).
  </Step>

  <Step title="Rate limits and concurrency">
    Published per plan on [Plans & limits](/plans). If you are moving a fleet, size against
    the **concurrency** figure, not just requests/min — that is the axis parallel agents
    hit first.
  </Step>

  <Step title="Your retry logic">
    `429` carries `retry-after`; `5xx` is transient and worth retrying with backoff; other
    `4xx` never are. If you hand-rolled an HTTP client, check it honors `retry-after` — the
    official SDKs already do. See [Errors](/errors).
  </Step>

  <Step title="Response headers">
    Usage and limit state ride on `x-sideren-*` and `x-ratelimit-*` headers. If you had dashboards
    reading a previous provider's headers, repoint them. See [Headers](/headers).
  </Step>
</Steps>

## Things that behave differently

* **Usage is in credits.** Every plan gives you credits. A request takes the credits for the
  model that served it, and higher plans add models. The dashboard shows what each request
  used. [Plans & limits](/plans)
* **Saturation waits instead of failing.** A request that would have been shed under load
  takes a place in line, so allow headroom in client timeouts. [Reliability](/reliability)
* **Model ids are not versioned in the URL.** Models are added and retired without an API
  version bump. Pin ids, and read the catalog at runtime if you need to know
  what exists.
* **Prompt caching depends on the model.** Where a model caches input, repeated context
  uses fewer credits; where it does not, it counts as ordinary input.
  [Prompt caching](/guides/prompt-caching)

## Cut over safely

<Steps>
  <Step title="Run both in parallel">
    Point a copy of your service at the gateway with a separate key, replay real traffic
    shapes through it, and diff the outputs you care about.
  </Step>

  <Step title="Start on a low-stakes path">
    Move background jobs, summarization, or an internal tool first. Keep the user-facing
    path on the old provider until the numbers agree.
  </Step>

  <Step title="Watch the monthly usage header">
    `x-sideren-monthly-used-percent` is how much of this month's credits you have used.
    Alert on it before it reaches 100: past that, new requests
    [stop with a `402`](/plans#past-your-limits) until the cycle renews, unless you
    upgrade or switch to purchased credit.
  </Step>

  <Step title="Then flip the base URL">
    One environment variable, no code change — which also makes the rollback one
    environment variable.
  </Step>
</Steps>

## Coding agents

If what you are migrating is a coding agent rather than an app, skip all of the above:

```sh theme={null}
npx sideren
```

The setup helper configures Claude Code, Codex, opencode, Aider, Continue, Cline and more in
one command, and `npx sideren unset` reverses it from timestamped backups. See the
[setup helper](/setup).


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