-
Notifications
You must be signed in to change notification settings - Fork 1k
Providers
diegosouzapw edited this page May 23, 2026
·
2 revisions
Web-cookie-based provider for Claude AI (claude.ai) using session cookie authentication.
- User pastes their
claude.aisession cookies into the OmniRoute dashboard -
ClaudeWebExecutortransforms OpenAI-format requests to Claude Web API format - Requests are sent via
tls-client-nodewith Chrome 124 TLS fingerprint to bypass Cloudflare Turnstile - Responses are streamed back via SSE (
text/event-stream)
| Cookie | Purpose | Source |
|---|---|---|
sessionKey |
Main authentication |
claude.ai browser session |
routingHint |
Anthropic routing |
claude.ai browser session |
cf_clearance |
Cloudflare Turnstile clearance | Auto-set by Cloudflare after challenge |
__cf_bm |
Cloudflare bot management | Auto-set by Cloudflare |
_cfuvid |
Cloudflare visitor ID | Auto-set by Cloudflare |
Note:
cf_clearanceis bound to the TLS fingerprint of the browser that solved Cloudflare's Turnstile challenge. Thetls-client-nodelibrary (viaclaudeTlsClient.ts) spoofs a Chrome 124 TLS handshake so the clearance token works from the OmniRoute server.
Endpoint: POST /api/organizations/{orgId}/chat_conversations/{convId}/completion
Required Headers:
accept: text/event-stream
anthropic-client-platform: web_claude_ai
anthropic-device-id: <uuid>
content-type: application/json
Referer: https://claude.ai/chat/{convId}
Request Body:
{
"prompt": "user message",
"model": "claude-sonnet-4-6",
"timezone": "Asia/Jakarta",
"locale": "en-US",
"personalized_styles": [...],
"tools": [...],
"rendering_mode": "messages",
"create_conversation_params": {
"name": "",
"model": "claude-sonnet-4-6",
"is_temporary": false
}
}User Cookies (claude.ai)
↓
OmniRoute Dashboard
↓
ClaudeWebExecutor (open-sse/executors/claude-web.ts)
↓ Request transformation (OpenAI → Claude Web format)
↓
tlsFetchClaude() (open-sse/services/claudeTlsClient.ts)
↓ Chrome 124 TLS fingerprint spoofing
↓
tls-client-node (Go native binding, koffi)
↓
claude.ai API
↓ SSE stream
| File | Purpose |
|---|---|
src/shared/constants/providers.ts |
Provider registration (WEB_COOKIE_PROVIDERS) |
src/lib/providers/wrappers/claudeWeb.ts |
Type definitions + cookie utilities |
open-sse/executors/claude-web.ts |
Executor implementation |
open-sse/executors/index.ts |
Executor registration |
open-sse/services/claudeTlsClient.ts |
TLS fingerprint spoofing via tls-client-node |
open-sse/services/__tests__/claudeTlsClient.test.ts |
TLS client tests |
tests/unit/claude-web.test.ts |
Executor tests |
# Unit tests
node --import tsx/esm --test tests/unit/claude-web.test.ts
# TLS client tests
npx vitest run open-sse/services/__tests__/claudeTlsClient.test.ts- Start OmniRoute:
omniroute - Go to Dashboard → Providers → Add Provider
- Select "Web Cookie" category
- Choose "Claude Web"
- Paste your full cookie header from
claude.aibrowser DevTools (Network tab → Copy as fetch → Cookie header)
OmniRoute · Website · npm · Docker Hub
- Setup Guide
- User Guide
- Features
- Quick Start (Docker)
- Electron Desktop App
- Termux (Android)
- PWA Guide
- MCP Server
- A2A Server
- Agent Protocols
- OpenCode Plugin
- Webhooks
- Cloud Agents
- Skills
- Memory
- Evals
- Gamification
- Guardrails
- Compliance
- Error Sanitization
- Public Credentials
- Route Guard Tiers
- Stealth Guide
- CLI Token Auth