Migrating from LiteLLM

Switch from LiteLLM to Shim

LiteLLM routes your calls. Shim does a different job: it masks personal data before a request leaves and keeps a record you can prove to an auditor.

What is different

Three things Shim does that LiteLLM does not

  1. 01

    Native requests, no translation

    LiteLLM maps every provider into one OpenAI-style format. Shim keeps each request in its own provider format, so new models and fields work the day they ship.

  2. 02

    Privacy in the request path

    Emails, cards, IBANs, Turkish IDs and secrets are masked before the request leaves and restored in the reply. In LiteLLM, PII masking is a guardrail integration you set up and run.

  3. 03

    Evidence, not just logs

    Every request lands in a hash-chained audit trail, with reports for KVKK, GDPR and the EU AI Act. LiteLLM sends logs to the observability tools you connect.

Side by side

How the two differ

LiteLLM compared with Shim, dimension by dimension
DimensionLiteLLMShim
Main jobRoute one API format to many providersProtect and prove traffic to OpenAI, Anthropic and Gemini
Request formatOpenAI-style, translated for each providerEach provider's native API, unchanged
PII maskingGuardrail integrations you configureBuilt into the request path and reversible
Turkish identifiersNot built inTCKN, VKN and IBAN with checksum validation
Audit trailLogs sent to your observability toolsHash-chained and verifiable, with compliance reports
Keys, budgets, limitsVirtual keys, budgets and rate limitsGateway keys, budgets and rate limits
Open sourceOpen source core, commercial enterprise tierApache-2.0 gateway on GitHub, source-available enterprise layer

How to switch

From LiteLLM to Shim in 6 steps

  1. 1

    Create a workspace

    Sign up for the hosted gateway, or talk to us about running Shim Enterprise on your own servers.

  2. 2

    Add your provider keys

    Add OpenAI, Anthropic or Google keys under Gateway, Provider credentials. Shim uses your own provider accounts.

  3. 3

    Create gateway keys

    Issue one Shim key per app or team. It takes the place of your LiteLLM virtual keys.

  4. 4

    Point your code at Shim

    Change the base URL and the key. Calls to OpenAI models need nothing else.

  5. 5

    Move other models to their own SDK

    If you reached Claude or Gemini through LiteLLM's OpenAI format, switch that call to the Anthropic or Google SDK.

  6. 6

    Turn on masking and check the trail

    Choose which data types to mask, send a request, and find it under Requests and Governance in the console.

The code change

The diff, in full

OpenAI models

Same SDK, same request, same response. Only the base URL and the key change.

Before· today

from openai import OpenAI

client = OpenAI(
    api_key="sk-litellm-...",
    base_url="http://localhost:4000"
)

After· through Shim

from openai import OpenAI

client = OpenAI(
    api_key="sk-shim-...",
    base_url="https://api.getshim.tech/v1"
)

Claude through LiteLLM

Shim does not translate formats, so a Claude call moves to the Anthropic SDK and its native request shape.

Before· today

from openai import OpenAI

client = OpenAI(
    api_key="sk-litellm-...",
    base_url="http://localhost:4000"
)
client.chat.completions.create(
    model="claude-haiku-4-5",
    messages=[{"role": "user", "content": "Hi"}],
)

After· through Shim

from anthropic import Anthropic

client = Anthropic(
    api_key="sk-shim-...",
    base_url="https://api.getshim.tech"
)
client.messages.create(
    model="claude-haiku-4-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hi"}],
)

What it takes

Minutes for OpenAI calls. A little longer for the rest.

Calls that already use OpenAI models only change the base URL and the key. Calls that reach Claude or Gemini through LiteLLM's OpenAI format move to that provider's SDK, which changes the request and response shape. Plan most of your time there, and for recreating per-team keys and budgets.

Ready to move your first service?

Start free on the hosted gateway, or tell us about your setup and we will plan the switch with you, on our cloud or on your own servers.