Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/cloudwaddie/lmarenabridge/llms.txt

Use this file to discover all available pages before exploring further.

LMArena Bridge is a self-hosted server that exposes an OpenAI-compatible API on top of LMArena. This guide walks you through cloning the project, getting your LMArena auth token, and making your first request.

Prerequisites

  • Python 3.10 or higher
  • pip (comes with Python)
  • A browser logged in to lmarena.ai or arena.ai

Install

1

Clone the repository

git clone https://github.com/CloudWaddie/LMArenaBridge.git
cd LMArenaBridge
2

Install dependencies

pip install -r requirements.txt
3

Start the server

python -m src.main
The server starts on http://localhost:8000. You should see startup output as the bridge initialises its browser session and scrapes model data from LMArena.

Get your auth token

LMArena Bridge authenticates to LMArena using the arena-auth-prod-v1 cookie from your browser session. Here is how to find it.
1

Open LMArena and send a message

Go to arena.ai (or lmarena.ai) and send any message in the chat. This ensures the auth cookie is set in your browser.
2

Open browser developer tools

Press F12 to open DevTools, or right-click the page and choose Inspect.
3

Navigate to the Cookies section

  • In Chrome or Edge: go to the Application tab, then expand Cookies in the left sidebar and select the LMArena domain.
  • In Firefox: go to the Storage tab, then expand Cookies.
4

Copy the arena-auth-prod-v1 value

Find the cookie named arena-auth-prod-v1. Its value starts with base64-. Copy the entire value — this is your auth token.
If you see cookies named arena-auth-prod-v1.0 and arena-auth-prod-v1.1 instead, copy both values and concatenate them end-to-end. The bridge handles split cookies automatically when you add tokens via the dashboard.

Add the token in the dashboard

1

Open the dashboard

Go to http://localhost:8000/dashboard in your browser.
2

Log in

Enter the default password: admin
Change this password immediately after first login. You can update it in the dashboard settings or by editing the password field in config.json.
3

Add your auth token

In the Auth Tokens section, paste the arena-auth-prod-v1 value you copied and click Add Token. The dashboard shows the token’s expiry date and whether it is currently active.

Make your first API call

The bridge is now ready to accept requests. Use the same format as the OpenAI API:
curl http://localhost:8000/api/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello!"}],
    "stream": false
  }'
Replace YOUR_API_KEY with an API key from the dashboard. If you have not created one yet, you can leave the Authorization header out — or create a key in the API Keys section of the dashboard first. A successful response looks like this:
{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "created": 1700000000,
  "model": "gpt-4o",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 10,
    "completion_tokens": 9,
    "total_tokens": 19
  }
}
To see all available models, call GET /api/v1/models. The bridge fetches the model list from LMArena on startup and refreshes it every 30 minutes.

Next steps

  • Authentication — Manage multiple auth tokens, API keys, and the cf_clearance cookie.
  • Configuration — Tune rate limits, timeouts, and browser window modes via config.json.
  • Integrations — Connect LMArena Bridge to OpenWebUI as a backend.

Build docs developers (and LLMs) love