A Claude subscription can't be used by the app, so let it use any cheap
vision model on OpenRouter instead (default google/gemini-3.1-flash-lite,
OPENROUTER_MODEL to change). The Anthropic API stays available as the
second choice. Both providers share the prompt and live behind one
{ name, model, transcribe } interface in server/providers.mjs; OpenRouter
retries 408/429/5xx and network errors and turns 401/402/404 into
messages the editor can show.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gVRDXpoukzgMFumoJt
27 lines
1.1 KiB
Text
27 lines
1.1 KiB
Text
# Copy to .env (chmod 600) and fill in. Never commit .env.
|
|
|
|
# Transcription of page photos. Set ONE of the two keys; OpenRouter wins if both are set.
|
|
# Without either the app still works; uploaded photos just have to be typed up by hand.
|
|
|
|
# OpenRouter key from https://openrouter.ai/settings/keys (prepaid credit).
|
|
OPENROUTER_API_KEY=
|
|
# Any OpenRouter model that accepts images. Default ~$0.0015 a page; google/gemini-2.5-flash-lite
|
|
# is cheaper (~$0.0005), anthropic/claude-haiku-5.5 or google/gemini-3.5-flash read hard pages better.
|
|
OPENROUTER_MODEL=google/gemini-3.1-flash-lite
|
|
|
|
# Or: Anthropic API key from https://platform.claude.com (billed separately from a Claude subscription).
|
|
ANTHROPIC_API_KEY=
|
|
|
|
# Password people need to add and edit plays. Without it uploading is switched off.
|
|
UPLOAD_PASSWORD=
|
|
|
|
# Claude model when using ANTHROPIC_API_KEY. claude-sonnet-5-5 reads hard pages better at ~20x the price.
|
|
CLAUDE_MODEL=claude-haiku-5-5
|
|
|
|
# Safety cap on pages transcribed per day (all users together), and pages per play.
|
|
DAILY_PAGE_LIMIT=300
|
|
MAX_PAGES=80
|
|
|
|
# Host port, and the address it is published on.
|
|
PORT=3010
|
|
BIND_ADDRESS=127.0.0.1
|