Setting your key
Route: Settings → AI key (BYOK)
Tostada's AI features are bring-your-own-key. You paste an Anthropic API key once; it lives in your browser's localStorage and is used directly when Tostada talks to Anthropic. There's no Tostada server in the middle.
Getting a key
- Go to console.anthropic.com
- Sign in (or sign up) for an Anthropic account
- Open Settings → API Keys
- Create Key; copy the value (starts with
sk-ant-…)
Pasting it into Tostada
- Open Settings (top nav, gear icon)
- In the AI key (BYOK) section, paste the key into the Anthropic API key field (placeholder:
sk-ant-…) - Click Save
The button briefly shows Saved. The key is now in localStorage under the key tostada-ai-key.
Masked re-display
After saving, the input shows a masked version (first 6 + last 4 characters) so you can confirm a key is present without exposing it on screen.
To replace it, paste a new key over the masked value and click Save again.
Clearing the key
Clear the input and click Save with an empty value. The key is removed and the AI surfaces stop offering to generate anything — every manual path stays exactly where it was.
What unlocks once a key is present
Today: Ask AI: generate tokens on the Primitives editor — see ask-ai-tokens.
Roadmap:
- Spread — apply your design system to a fetched page (the engine works; the UI is next)
- Suggest layout principles from a description
- Drop a screenshot, get a token patch (multimodal)
- Component scaffold from a prompt
See REBUILD_PLAN.md.
Why BYOK
Tostada is local-first. We don't want to know what you're building, and we don't want to be liable for your API spend. BYOK keeps the trust model simple: you pay Anthropic directly, you control the key, you can rotate it any time.
Where the call goes
Settings tells you, for the build you're actually running — either straight to api.anthropic.com from your browser, or through a Tostada relay that forwards it and stores nothing. Which one it is was decided when the app was built and cannot change at runtime, which is why the answer can be stated plainly on screen rather than hedged.
See privacy for what each mode means.