---
title: "AnythingLLM + rawroute: Cheap RAG & Cached LLM API"
canonical: "https://rawroute.dev/integrations/anythingllm"
lang: "en"
last_verified: "2026-11-28"
description: "Connect AnythingLLM Generic OpenAI provider to https://api.rawroute.dev/v1 for 50–70% lower RAG token costs on Claude 5.5, GPT-6.2, and Gemini 4."
---

# Use rawroute with AnythingLLM.

RAG workspaces in AnythingLLM send large document chunks on every query, making input token pricing the dominant bill driver. Routing AnythingLLM's Generic OpenAI provider through https://api.rawroute.dev/v1 cuts input costs 50–70% below list and passes vendor prompt-caching discounts straight through.

## Setup Steps

1. Open Settings → AI Providers → LLM → Generic OpenAI.
2. Set Base URL to https://api.rawroute.dev/v1 and paste your rawroute API key.
3. Set Chat Model Name to gpt-6.2-sol, gemini-4-argon, or claude-sonnet-5-5.

### AnythingLLM · .env / Settings

```bash
LLM_PROVIDER=generic-openai
GENERIC_OPEN_AI_BASE_PATH=https://api.rawroute.dev/v1
GENERIC_OPEN_AI_API_KEY=rr_live_your_key_here
GENERIC_OPEN_AI_MODEL_PREF=claude-sonnet-5-5
GENERIC_OPEN_AI_MAX_TOKENS=4096
```

## When NOT to use rawroute

- Keep local AnythingLLM embedder (built-in ONNX/Ollama) active for document indexing while routing generation to rawroute.
