AI providers and API keys
Short answer: Open Settings, then AI. Pick a Chat provider (Google Gemini, Anthropic Claude, OpenAI or DeepSeek), paste its API key and click Save key. Pick a Model from the list. Keys stay in this browser and requests go straight to the provider.
The AI assistant needs your own API key from one of four providers. This page covers the provider settings, the model picker and the errors you may see.
Add a key in Settings#
- Click Settings (the gear) in the top bar. Or press Ctrl+K and type Settings: AI.
- Click AI.
- Under AI provider, find the key box for your provider, for example Anthropic API key.
- Click Get a key to open the provider's key page. Create a key and copy it.
- Paste the key and click Save key. You see Saved.
- Pick a Model. The list refreshes with the models your key can use.
Saving a key for a provider also makes it the active Chat provider. Providers with a saved key show a check mark in the list.
Add a key from the chat#
Open the chat with AI in the tools row. With no key, the panel shows Connect an AI model. Click a provider tab (Gemini, Claude, OpenAI or DeepSeek), paste the key and click Save. The link under the box opens the provider's key page.
The panel warns if a key does not look right for that provider. For example, a Claude key starts with sk-ant-. The warning never blocks the save.
Providers#
| Provider | Key looks like | Default model | Reads images | Billing |
|---|---|---|---|---|
| Google Gemini | AIza... |
Flash (latest) | Yes | Free keys from Google AI Studio work with Flash models |
| Anthropic Claude | sk-ant-... |
Claude Opus 5.5 | Yes | Your Anthropic API credit |
| OpenAI | sk-... |
GPT-5 mini | Yes | Your OpenAI API credit |
| DeepSeek | sk-... |
DeepSeek Chat | No, text only | Your DeepSeek balance |
Pick a model#
You can switch models in two places:
- Settings, AI, Model.
- The model button at the top of the chat panel. It shows the provider and model. Its menu lists Provider (with Key saved or Add key) and Model. Manage API keys opens Settings.
Before your key is checked you see a short built in list:
| Provider | Models |
|---|---|
| Gemini | Flash (latest), Pro (latest) |
| Claude | Claude Opus 5.5, Claude Sonnet 5.5, Claude Haiku 5.5, Claude Fable 5.1 |
| OpenAI | GPT-5 mini, GPT-5 |
| DeepSeek | DeepSeek Chat, DeepSeek Reasoner |
After you save a key, MolDraw asks the provider which models that key can use and shows that list.
Tip
Use a Pro class model (Gemini Pro, GPT-5, Claude Opus) for reaction schemes and mechanisms. It gives more accurate SMILES. Flash and mini models are faster for simple drawings.
Where your keys are stored#
Keys are saved in this browser's local storage on this device. They are not part of a settings export and are not sent to MolDraw. Chat requests go from your browser straight to the provider. A key saved on your laptop is not on your phone; add it there too.
To remove a key, click Clear next to it in Settings, AI. Clearing browser data also removes it. See privacy and where your drawings are stored.
Error messages#
| Message (short form) | What to do |
|---|---|
| The provider did not accept the API key | Click Update key and paste the key again. Check that you copied all of it. |
| The model is not available for this API key | Click Change model and pick another model from the list. |
| The model is not included in this key's free tier | Pick a Flash model, or add billing to your Gemini account. |
| The account has no credit left | Add credit with that provider, or switch provider. |
| Rate limit or quota reached | Wait a minute and click Retry. |
| The provider is busy | Try again in a moment. |
| Could not reach the provider | Check your internet connection. |
| Chat tools could not be sent | Pick another model. Some models do not accept the drawing tools. |
Open Details under the error to see the technical text from the provider.
Common problems#
| Symptom | Fix |
|---|---|
| The send button stays grey | No key is saved for the active provider. Add one, or switch to a provider that shows Key saved. |
| An image you attached is ignored | DeepSeek reads text only. Switch to Gemini, Claude or OpenAI. |
| The model list is short | The full list loads after the key is saved and checked. Reopen the list after a few seconds. |
Questions and answers
Which AI providers does MolDraw support?
Google Gemini, Anthropic Claude, OpenAI and DeepSeek. Pick one in Settings, AI, Chat provider.
Where is my AI API key stored?
In your browser on this device only. MolDraw does not receive it, and requests go straight to the provider.
Can I use Claude instead of Gemini in MolDraw?
Yes. Paste an Anthropic API key in Settings, AI and click Save key. Chat switches to Claude.
What does "model is not available for this API key" mean?
Your key cannot use the selected model. Click Change model in the chat and pick one from the list.
Which model is best for reaction schemes?
A Pro class model such as Gemini Pro, GPT-5 or Claude Opus. They give more accurate SMILES than Flash or mini models.
Last updated: