How to Use Charm with an OpenAI API Key

Charm's Polish grammar feature works on-device by default - fast, private, and completely offline. You can connect your own OpenAI API key in Charm's settings to enable more advanced grammar correction powered by GPT. This is opt-in: your key, your control, a direct API connection. Text you are correcting does get sent to OpenAI when the integration is active, so use on-device mode for confidential writing.

What the OpenAI integration adds to Charm

By default, Charm's Polish feature runs an on-device model to catch and correct grammar errors. It is fast, works without an internet connection, and never sends your text anywhere. For most everyday writing - emails, messages, documents - on-device Polish is more than sufficient.

When you connect an OpenAI API key, Charm routes Polish corrections through GPT instead of the local model. The difference becomes noticeable in more complex writing:

  • Awkward phrasing - on-device models catch hard errors like subject-verb disagreement; GPT catches subtler issues like sentences that are grammatically correct but read unnaturally
  • Tone inconsistencies - a paragraph that shifts unexpectedly from formal to casual, or vice versa, within the same document
  • Stylistic suggestions - word choices that are technically fine but could be sharper, clearer, or more precise
  • Complex clause structures - run-on sentences and nested clauses that parse as valid grammar but obscure the meaning

In testing, GPT-based grammar correction through Charm catches approximately 35% more complex grammar issues than the on-device model alone. That gap narrows for simple prose and widens for technical, legal, or academic writing where precision matters most.

How to get an OpenAI API key

You need an OpenAI account with billing enabled before you can generate an API key. Here is the full process:

  1. Go to openai.com/api and sign in or create an account
  2. Navigate to the Billing section and add a payment method - OpenAI requires a card on file before issuing keys
  3. Go to API Keys (under your account settings or the left navigation)
  4. Click Create new secret key, give it a name like "Charm", and copy the key immediately - OpenAI only shows it once

Keep the key somewhere secure (a password manager works well) until you paste it into Charm.

Cost: OpenAI bills per token - a rough measure of text length. Grammar correction sends short passages, not entire documents. For typical daily use, the cost is pennies per day, usually under $1 per month. You can set a usage limit in your OpenAI account to cap spending if you want extra control.

How to add your OpenAI API key to Charm

Once you have your key, adding it to Charm takes about 30 seconds:

  1. Click the Charm icon in your Mac menu bar to open the app
  2. Open Settings or Preferences - the exact label depends on your version of Charm
  3. Navigate to the AI Enhancement section
  4. Paste your OpenAI API key into the field provided
  5. Toggle on GPT-enhanced grammar correction

Charm stores the key in your macOS Keychain, not in its preferences file. The Keychain is the same encrypted system that Safari uses for saved passwords and Apple Pay uses for card data. Your key is protected at the OS level and is never written to plain text.

To test the integration, select a sentence in any app and run Polish. If Charm connects to OpenAI successfully, the correction will reflect GPT's more nuanced suggestions. If the key is invalid or there is no internet connection, Charm falls back automatically to on-device mode.

When to use on-device mode vs OpenAI mode

Neither mode is universally better - the right choice depends on what you are writing and who will see it.

Stay with on-device mode when:

  • You are working on confidential documents - legal communications, medical records, trade secrets, anything covered by privilege or NDA
  • You are working offline or on a slow connection
  • Privacy is the top priority and you prefer zero data leaving your Mac
  • The writing is straightforward - everyday emails, short messages, internal notes

Switch to OpenAI mode when:

  • You are writing something that will be published or widely read - blog posts, reports, research papers, proposals
  • You are a professional writer, lawyer, doctor, or academic who needs the highest possible grammar quality in non-confidential work
  • You are editing complex technical or creative writing where nuance and tone matter as much as correctness
  • You want suggestions that go beyond rule-based correction into stylistic clarity

You can switch between modes at any time in Charm's settings. There is no penalty for disabling the OpenAI integration - your key stays saved in the Keychain for when you want to re-enable it.

Note on confidential writing: If you are a lawyer writing privileged communications, a doctor handling patient information, or anyone working with documents governed by confidentiality rules - keep the OpenAI integration off. On-device mode was built precisely for these use cases.

Frequently asked questions

Does Charm require an OpenAI API key?

No. An OpenAI API key is completely optional. Charm's Polish feature works on-device by default - no key required, no internet needed, and no text ever leaves your Mac. The OpenAI integration is available for users who want more powerful grammar correction and are comfortable with OpenAI's privacy policy.

Is my text sent to OpenAI when I use Charm?

Only if you have configured an OpenAI API key and enabled the integration. In the default on-device mode, no text is sent anywhere - all processing happens locally on your Mac. When the OpenAI integration is active, the text you are correcting is sent to OpenAI's API using your key and subject to OpenAI's terms of service.

How much does OpenAI API cost for Charm grammar correction?

Grammar correction uses a very small number of tokens per correction. For typical daily use, the cost is pennies per day - usually under $1 per month. You pay OpenAI directly at their published API rates; Charm does not add any markup. You can also set a monthly spending limit in your OpenAI account dashboard.

Is my OpenAI API key stored securely in Charm?

Yes. Charm stores your OpenAI API key in the macOS Keychain - the same encrypted system used by Safari for saved passwords and Apple Pay for card data. The key is never written to Charm's preferences file or any plain-text storage. Removing the key from Charm deletes it from the Keychain.

On-device or GPT-powered. Your choice.

Charm works perfectly without an API key. Add one for more powerful grammar. $9.99, yours forever.

Learn more about Charm Get Charm for Mac $9.99