New — Sohay now answers WooCommerce product, policy & cart questions. See how →

Getting an API key and saving it

Where to create a key, how Sohay stores it, and why the field looks empty afterwards.

Sohay is a front end for somebody else’s models. Without an API key it has nothing to call, and the chat cannot answer questions. The provider bills you directly per token — Sohay does not resell access and takes no cut.

Creating a key

  • OpenAI — create one at platform.openai.com, under API keys. You will need billing set up on the account; a key on an account with no balance authenticates fine and then fails on every request.
  • Google (Gemini) — create one at aistudio.google.com/apikey.

Copy it immediately. Both providers show a key once and never again.

Saving it

Paste it into the matching field under Sohay → AI Settings and click Save.

You can save keys for both providers. Only the one belonging to your selected provider is used for chat, and the other sits there costing nothing — that is what makes switching providers instant later.

If you use the Knowledge Base, an OpenAI key is required regardless of which provider answers the chat. See Choosing between OpenAI and Google Gemini for why.

Why the field looks empty afterwards

Once saved, the field shows a masked placeholder rather than your key. This is deliberate and it is not recoverable by design:

  • Keys are encrypted at rest with AES-256-GCM in your WordPress database.
  • The admin never renders the real value back, so there is nothing to read in the page source.
  • Keys are excluded from the WordPress REST API entirely.
  • Each key is only ever sent to the service it belongs to.

The practical consequence: Sohay is not a place to look a key up. Keep your own copy in a password manager. If you lose it, revoke it at the provider and issue a new one.

To replace a key, paste the new one over the placeholder and save. To stop using a provider entirely, clear the field, save, and then revoke the key at the provider — clearing it here stops Sohay using it, but only the provider can actually invalidate it.

If saving seems not to work

Check for whitespace. Copying from a terminal or an email often brings a trailing newline or a leading space, and a key with either will authenticate as invalid without any obvious clue why. Re-copy it and paste it cleanly.

Errors from the provider — including rejected keys — show up under Sohay → Diagnostics.

Where to go next

What Sohay costs to run, and Daily token caps and rate limits for keeping that cost bounded.

Mithun B.
Mithun B.

More articles by Mithun B..

View all posts

Give your website an assistant that answers from your content

Grounded answers, a team inbox, and store-aware tools — free on WordPress.org.

Add Sohay — Free

Free plugin · You bring your OpenAI key · Works with any theme