Connecting an AI Provider to texspark

texspark’s AI panel talks to Claude, ChatGPT, or Gemini — with your own API key, on your own terms. Setup is one paste per provider. This guide covers getting a key, entering it, and what it actually costs (less than you’d guess).

1. Get an API key

An API key is a pay-as-you-go credential — different from a ChatGPT Plus or Claude Pro subscription. You create one in the provider’s console, and you’re billed only for what you use:

You only need one provider to start — pick whichever you already have an account with. The key is a long string starting with something like sk-; copy it right away, some consoles show it only once.

2. Enter it in texspark

Open Preferences → AI, and paste the key into the field for that provider. That’s it — the key is stored in the macOS Keychain automatically, never in a plain file, and it’s sent nowhere except to the provider you chose.

Each provider has its own field, so you can set up one, two, or all three and switch freely later.

3. Start a conversation

Hit ⌘T — the PDF panel flips to the chat. In the panel header, pick the provider and then a model from the dropdown (each provider lists its available models; the default is a sensible middle ground).

  • Attach your document — one toggle sends your source as context, so the assistant answers about your file, not a pasted fragment.
  • Send a selection — highlight a paragraph and press ⌘⇧A to ask about exactly that part.
  • Paste the answer straight back into the editor, and ⌘B.

What does it cost?

Far less than people expect. API pricing is per-token (roughly, per word), and LaTeX questions are small: asking about an error, rewording a paragraph, or generating a table costs a fraction of a cent to a few cents, depending on the model and how much of your document you attach. Regular use while writing a thesis typically lands in the range of a coffee or two per month — and every provider’s console shows a live usage page, so nothing surprises you.

If you’re cost-conscious, pick a smaller model from the dropdown for everyday questions and switch to a bigger one when a derivation actually needs it.

Questions, or a provider behaving oddly? Email support@texspark.io — it goes straight to the developer.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *