API Key Setup, AI Providers, Models (DEPRECATED) - samwega/obsidian-wordsmith GitHub Wiki
API Key Setup
You'll need at least one API key to use WordSmith. To get your API key(s):
-
OpenAI: (Optional)
- Create an OpenAI account if you don't have one.
- Go to your API keys page.
- Click
Create new secret key
, name it (e.g., "Obsidian WordSmith"), and copy the key.
-
Google Gemini: (Optional)
- Ensure you have a Google account and visit Google AI Studio.
- Navigate to the API key page (you might need to create a project first).
- Click
Create API key in new project
orCreate API key
in an existing project. Copy the key.
-
OpenRouter: (Optional)
- Register an OpenRouter account.
- Go to the API Keys Page
- Click
Create API key
. Copy the key.
-
In Obsidian, go to
Settings → WordSmith
and paste your copied API key(s) into the respective "OpenAI API Key", "Gemini API Key" and/or "OpenRouter Key" fields.
[!TIP] It's wise to monitor your API usage to avoid unexpected costs. Links to usage dashboards are provided in the AI Providers & Models section.
AI Providers & Models
WordSmith supports models from both OpenAI, Google and OpenRouter, giving you a choice based on your preferences for performance and cost.
[!IMPORTANT] This plugin requires an "OpenAI API Key", "Gemini API Key" and/or "OpenRouter Key". Usage will incur costs with the respective provider (OpenAI or Google) based on the amount of text processed.
Model Options & Estimated Pricing:
(Prices are estimates per 1 million tokens, roughly equivalent to 750,000 words. Please refer to official OpenAI, Google Gemini and OpenRouter pricing pages for the most up-to-date information. The plugin developer is not responsible for discrepancies.) A very incomplete list:
- OpenAI: (Track Usage)
- GPT-4.1: High intelligence, best for complex literary tasks. (Approx. $2 input / $8 output per 1M tokens)
- GPT-4.1-mini: Good balance of intelligence and speed. (Approx. $0.40 input / $1.60 output per 1M tokens)
- GPT-4.1-nano: Fastest, most cost-effective for basic proofreading. (Approx. $0.10 input / $0.40 output per 1M tokens)
- Google Gemini: (Track Usage)
- Gemini 2.5 Pro: High intelligence, thorough (can be slower). (Approx. $3.50 input / $10.50 output per 1M tokens)
- Gemini 2.5 Flash: Very fast and powerful, great all-rounder. (Approx. $0.50 input / $1.50 output per 1M tokens)
General Guidance:
- Intelligence: Higher intelligence models are generally better for creative tasks, nuanced understanding, and complex instructions, but may be slower and more expensive.
- Speed: Faster models offer quicker turnaround, ideal for iterative editing and proofreading.
- The "dumber models" may not be able to correctly perform the more demanding prompts, but may still be useful for both Ad-Hoc generation from user prompt or general proofreading.
All supported models (as of version 2.0.1):
- OpenAI models—GPT 4o, GPT 4.1, GPT 4.1 mini, GPT 4.1 nano, OpenAI 03 & GPT 4.5
- Google models—Gemini 2.5 Flash, Gemini 2.5 Pro, Gemini 2.0 Flash-Lite & Gemma 3 27B
- Anthropic models—Claude 3.5 Sonnet, Claude 3.7 Sonnet, Claude Sonnet 4 & Claude Opus 4
- xAI—Grok 3 beta
- DeepSeek models—v3 & R1
- Alibaba's Qwen models—3 235B A22B & Qwen 3 32B
- Meta's Llama models—3.1 405B Instruct, 3.3 70B Instruct, Nvidia 3.1 Nemotron Ultra 253B v1
- Nous models—Hermes 3 70B & Hermes 3 405B
- TheDrummer's models—Skyfall 36B V2, Valkyrie 49B v1 and Anubis Pro 105b v1
- Cohere's—Command A (111B)
- Magnum 72B
- Luminad v0.2 70B
- Mistral Large 2411 (123B)
- Goliath 120B
Choose the model that best fits your task and budget in the plugin settings.
OpenRouter?
WhyRead more on their page. Here's a few reasons I decided to add their API rather than keep adding providers one by one:
- One unified interface for all models, 60 providers and over 400 models, including all of the main ones
- In many cases they offer higher availability and higher speeds than the original providers
- They have custom and very sane data policies (your intellectual property is safe).
- It's a lot simpler and maintainable for me not to juggle too many providers and increase the code complexity further
I will continue supporting the Google AI Studio and OpenAI API models, but I won't be adding Anthropic or other providers unless given a real reason to.
If you already have an (e.g.) Anthropic API key, you can route it through OpenRouter, so you can use your Anthropic credits. Bear in mind that OpenRouter does markup the cost by 5% so you would still need some OpenRouter credits.
Updated models list below. Please don't take the cost estimates at face value, they are very rough.