Skip to content
Saymail is currently in  closed beta — available by invitation only.
Просмотр документации

Bring your own LLM key

Connect OpenAI, Anthropic, Google Gemini, OpenRouter, or any OpenAI-compatible API.

Bringing your own key (often abbreviated BYOLLM) means Saymail uses an API key you got directly from a model provider. You pay the provider — usually per token — and Saymail makes the requests on your behalf.

Supported providers

The LLM Connections panel offers these provider types:

  • OpenAI — GPT-4o, GPT-4-class, and any other model on your account.
  • Anthropic — Claude (Opus, Sonnet, Haiku).
  • Google — Gemini.
  • OpenRouter — a single key that exposes models from many providers.
  • Local / OpenAI-compatible — see Local LLM. Anything that speaks the OpenAI Chat Completions API fits here, including LM Studio, Together.ai, Groq, vLLM, and many others.

Adding a connection

  1. Get your API key from the provider’s dashboard.
  2. In Saymail, open the LLM Connections panel and click New.
  3. Pick the provider from the dropdown. The form prefills the base URL for that provider.
  4. Paste the API key.
  5. Type the exact model name as the provider expects it (e.g., gpt-4o, claude-sonnet-4-6, gemini-2.5-pro).
  6. Set a Priority (lower number wins) — see below.
  7. Save.

Priority and fallback

Every connection has a numeric Priority. Lower means tried first. When Saymail needs the LLM:

  1. It picks the lowest-numbered active connection.
  2. If that connection is healthy, the request goes through.
  3. If the connection fails, Saymail moves to the next priority and retries.
  4. After three consecutive failures a connection is marked as disconnected; see LLM connection health.

Use priority to build a chain: your cheapest or fastest model as #1, a fallback as #2, and so on.

Tips

  • Separate keys per use case. Some providers let you scope keys (rate limit, billing tag). Make a dedicated key for Saymail so usage is easy to review.
  • Check pricing first. Email classification runs every 15 minutes. Heavy users send the LLM hundreds of small classifications a day, which is cheap on most providers but adds up over months — check the per-token cost before you pick a model.
  • Pin the model. Provider model lineups change. Saymail uses whatever you type in the model name field, so your runs are stable until you change it.

Security

API keys are stored encrypted in the local SQLite database next to your email data. Saymail never sends keys to its own servers. If you ever want to wipe a key, delete the connection in the LLM Connections panel — the key is removed immediately.