---
title: "LibreChat + rawroute: Team AI Gateway Setup"
canonical: "https://rawroute.dev/integrations/librechat"
lang: "en"
last_verified: "2026-11-28"
description: "Add rawroute to librechat.yaml (https://api.rawroute.dev/v1) for team-wide Claude 5.5, GPT-6.2, Gemini 4, and Grok 4.7 access at 50–70% below official rates."
---

# Use rawroute with LibreChat.

Replacing 4 separate vendor keys in LibreChat with one custom endpoint block in librechat.yaml cuts team AI spend by 50–70%, removes OpenRouter's 5.5% top-up fee, auto-fetches every new model from /v1/models, and protects teams from upstream 429/529 outages via multi-provider failover.

## Setup Steps

1. Add RAWROUTE_API_KEY to your LibreChat .env file.
2. Paste the custom endpoint block below into librechat.yaml.
3. Restart LibreChat — all models appear under the rawroute provider dropdown.

### librechat.yaml

```yaml
endpoints:
  custom:
    - name: "rawroute"
      apiKey: "${RAWROUTE_API_KEY}"
      baseURL: "https://api.rawroute.dev/v1"
      models:
        default:
          - "claude-sonnet-5-5"
          - "gpt-6.2-sol"
          - "gemini-4-neon"
          - "grok-4.7"
        fetch: true
      titleConvo: true
      titleModel: "claude-haiku-5-5"
```

## When NOT to use rawroute

- If you need LibreChat Assistants API file-search threads hosted exclusively inside an OpenAI enterprise org, keep the built-in OpenAI endpoint enabled alongside rawroute.
