Your own AI key
How to add your Anthropic API key — in your browser only, or encrypted in your account.
Why your own key?
AI generation runs with your own API key. You choose the provider: Anthropic (Claude), OpenAI (GPT), Google Gemini or a custom, OpenAI-compatible endpoint — each with your own key. That keeps you in control of usage and costs, and TravelSwallow stays free — we don’t pay any AI bills for you, and you don’t hand your data to a shared key. The Builder, accounts, sharing and profiles all work completely without a key.
Getting a key
Create an API key with your chosen provider. The prefix differs by provider — for Anthropic it starts with sk-ant-, for OpenAI with sk-, for Gemini with AIza. On the AI page you’ll find a “Get key ↗” link next to each provider that takes you straight to the right console.
- Anthropic (Claude): console.anthropic.com → API Keys
- OpenAI (GPT): platform.openai.com/api-keys
- Google Gemini: aistudio.google.com/app/apikey
- Custom endpoint: any OpenAI-compatible service — here you additionally provide the base URL and a model name.
With the major providers you top up some credit in their console — generating a plan typically costs only fractions of a cent to a few cents.
Adding your key to TravelSwallow
Go to the AI page, section “Your AI key”. Choose your provider, paste your key and click Apply. Optionally specify a custom model (otherwise the provider’s default model is used); for a custom endpoint, the base URL and model name are required. You have two storage options:
| Option | Where it’s stored | Good for |
|---|---|---|
| Remember in browser (default) | Only in your browser (localStorage). Sent per request, never stored permanently on the server. | Maximum privacy, one device. |
| Encrypted in your account (opt-in) | AES-256-GCM-encrypted in the database, tied to your account. | Convenience across multiple devices. |
Model & costs
A sensible default model is preset per provider (e.g. Claude Sonnet, GPT-4o or Gemini 1.5 Pro). In the Model field you can specify a different model from your provider at any time. Your provider bills the costs directly to your account.
Key being rejected?
- Check that the key was copied in full and matches the chosen provider (e.g.
sk-ant-for Anthropic). - Make sure your provider account has credit or an active quota.
- For a custom endpoint: check the base URL and model name — the service must be OpenAI-compatible.
- On a “rate limit”, wait briefly — that’s your key’s limit, not TravelSwallow’s.