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 stores all persistent configuration in a config.json file in the working directory. The file is created automatically on first run with sensible defaults. Every time the server starts it reads this file, applies any missing defaults, and then watches for changes made through the dashboard.

Full example

{
    "password": "changeme",
    "auth_token": "",
    "auth_tokens": [
        "base64-eyJ...<arena-auth-prod-v1 token>"
    ],
    "cf_clearance": "",
    "api_keys": [
        {
            "name": "My App",
            "key": "sk-abc123def456",
            "rpm": 60,
            "created": 1704236400
        }
    ],
    "usage_stats": {},
    "prune_invalid_tokens": false,
    "persist_arena_auth_cookie": true,
    "camoufox_proxy_window_mode": "hide",
    "camoufox_fetch_window_mode": "hide",
    "chrome_fetch_window_mode": "hide"
}

Authentication

password
string
default:"admin"
Password for the admin dashboard at /dashboard. Change this before exposing the server to a network.
auth_token
string
default:"\"\""
Legacy. A single arena-auth-prod-v1 cookie value copied from your browser. Superseded by auth_tokens. If both are present, auth_tokens is used for round-robin cycling and auth_token is kept for backward compatibility only.
auth_tokens
string[]
default:"[]"
List of arena-auth-prod-v1 JWT cookie values. The bridge cycles through them in round-robin order, skipping any that are expired. Obtain a token from the LMArena site cookies after sending a chat message (the cookie name is literally arena-auth-prod-v1 and the value starts with base64-).
"auth_tokens": [
    "base64-eyJ...",
    "base64-eyJ..."
]
When true, any arena-auth-prod-v1 cookie captured from a browser session during startup or token refresh is written back to config.json automatically. Set to false if you manage tokens manually and do not want the file modified at runtime.
prune_invalid_tokens
boolean
default:"false"
When true, tokens that are found to be expired or invalid during a request are removed from auth_tokens and the config file is re-saved. Useful for long-running deployments where tokens naturally expire over time.
Enabling this will permanently delete tokens from config.json. Ensure you have a way to replenish them before turning this on.

Cloudflare

cf_clearance
string
default:"\"\""
Optional Cloudflare clearance cookie value (cf_clearance). When supplied, the bridge includes it in requests to LMArena to bypass Cloudflare challenges. This cookie expires within minutes to hours; if requests begin failing with 403 errors, refresh this value from your browser.Leave empty to let the bridge handle Cloudflare automatically via the Camoufox or Chrome browser transports.

API keys

api_keys
object[]
default:"[]"
List of API key objects used to authenticate client requests to the bridge. Each object has the following shape:
FieldTypeDefaultDescription
namestring"Unnamed Key"Human-readable label shown in the dashboard.
keystringThe secret key value. Auto-generated by the dashboard; must be present or the entry is skipped.
rpminteger60Maximum requests per minute allowed for this key.
createdinteger1704236400Unix timestamp (seconds) when the key was created. Displayed in the dashboard.
"api_keys": [
    {
        "name": "Production App",
        "key": "sk-abc123def456",
        "rpm": 120,
        "created": 1717200000
    },
    {
        "name": "Dev / Testing",
        "key": "sk-xyz789",
        "rpm": 10,
        "created": 1717200001
    }
]

Usage statistics

usage_stats
object
default:"{}"
Internal map of per-model and per-key request counts. This field is written by the server at runtime — do not edit it manually. The dashboard reads from this object to render usage charts and totals.
If you want to reset usage counters, set "usage_stats": {} in the file while the server is stopped, then restart.

Browser window modes

camoufox_proxy_window_mode
string
default:"\"hide\""
Window mode for the Camoufox browser instance used during anonymous signup and Turnstile challenge handling. See Browser window mode configuration for valid values.
camoufox_fetch_window_mode
string
default:"\"hide\""
Window mode for the Camoufox browser instance used as a fetch transport. See Browser window mode configuration for valid values.
chrome_fetch_window_mode
string
default:"\"hide\""
Window mode for the Chrome/Edge browser instance used as a fetch transport. See Browser window mode configuration for valid values.

Runtime-discovered fields

The following fields are set automatically at startup and are not normally present in a hand-edited config file.
next_action_upload
string
The Next.js server action ID for uploading images to LMArena’s R2 storage. Discovered by scraping the LMArena frontend on startup. Do not set this manually; it will be overwritten each time the server starts.
next_action_signed_url
string
The Next.js server action ID for obtaining a pre-signed URL for uploaded images. Discovered alongside next_action_upload at startup. Do not set this manually.

Build docs developers (and LLMs) love