Docs / API key setup

API key setup

Connect a cloud AI provider in under two minutes. All keys are stored in macOS Keychain and never transmitted to ReWryte's servers.

Groq is the recommended first provider. It is free, requires no credit card, and gives you 14,400 rewrites per day — more than enough for heavy daily use.

How to add any key

The process is identical for all four providers:

  1. Open Main Window → Cloud AI.
  2. Find the provider card.
  3. Paste your key into the key input field.
  4. Type the model ID into the model field (see per-provider recommendations below).
  5. Click Save →.

After saving, the full key is never displayed again — only a masked form. Keys are stored in macOS Keychain, separate from the app's storage.

Groq — Maximum free tier

Groq runs open-source models on custom LPU (Language Processing Unit) hardware. The result: extremely fast inference and the most generous free tier of any major provider — no credit card required.

Groq gsk_... Recommended model: llama-3.1-8b-instant
  1. Go to console.groq.com and sign in or create a free account — no credit card required.
  2. Click API Keys in the left sidebar.
  3. Click "Create API Key", name it "ReWryte", and click Submit.
  4. Copy the key — it starts with gsk_.
  5. In ReWryte: open Main Window → Cloud AI, find the Groq card, paste the key, type llama-3.1-8b-instant in the model field, and click Save →.

Groq free tier — full model comparison

Model ID Free RPD Free RPM Speed Quality Best use
gemma2-9b-it
14,400 30 Fast Better Quality + high volume
mixtral-8x7b-32768
14,400 30 Fast Better Longer text, nuanced tone (32K context)
llama-3.2-3b-preview
7,000 30 Fastest Fair Ultra-short snippets
llama-3.2-1b-preview
7,000 30 Fastest Lowest Absolute minimum latency
llama-3.3-70b-versatile
1,000 30 Medium Excellent Important long documents

RPD = Requests Per Day · RPM = Requests Per Minute

How to maximize your Groq free tier:
  • Day-to-day volume: llama-3.1-8b-instant — 14,400 RPD and 6,000 RPM. You will not hit this limit in normal use.
  • Better quality at high volume: gemma2-9b-it or mixtral-8x7b-32768 — same 14,400 RPD, stronger output for longer or more nuanced rewrites.
  • Long documents: mixtral-8x7b-32768 has a 32K context window — handles far more text per request.
  • Occasional high-stakes rewrites: llama-3.3-70b-versatile (1,000 RPD) — significantly more capable, save it for when quality truly matters.
  • Watch RPM, not just RPD: gemma2-9b-it and mixtral have a 30 RPM cap. If doing rapid sequential rewrites, only llama-3.1-8b-instant's 6,000 RPM will not slow you down.
Getting a 400 "model not supported" error from Groq?

Groq hosts two separate categories of models. ReWryte calls /v1/chat/completions (the text generation endpoint). Sending that request to a prompt guard or classifier model — such as meta-llama/llama-prompt-guard-2-86m — causes an immediate 400 because those models do not support the message format and have no text generation capability.

Use one of these chat completion models instead:

Model ID Notes
llama-3.3-70b-versatile Best quality
llama-3.1-8b-instant Fastest — highest free-tier rate limits
meta-llama/llama-4-scout-17b-16e-instruct Good balance of speed and quality
meta-llama/llama-4-maverick-17b-128e-instruct Long context window

Never use models whose names contain guard, classifier, or safety — these are not chat completion models and will always return a 400.

OpenAI

OpenAI sk-proj-... Free tier: ~$5 credit on signup
  1. Go to platform.openai.com and sign in or create a free account.
  2. Click your profile icon (top-right) → API keys.
  3. Click "+ Create new secret key", name it "ReWryte", and click Create secret key.
  4. Copy the key immediately — it will not be shown again after you close the dialog.
  5. In ReWryte: open Main Window → Cloud AI, find the OpenAI card, paste the key, type gpt-4o-mini in the model field, and click Save →.

Model options

Model Speed Quality Cost Notes
gpt-4o-mini Default
Fast Good Low Best everyday choice
gpt-4o
Medium Excellent Higher For long or complex rewrites
gpt-3.5-turbo
Fast Fair Lowest Budget option
New accounts receive $5 credit — approximately 5,000+ rewrites with gpt-4o-mini. A paid plan is required once the credit runs out.

Anthropic

Anthropic sk-ant-... Free tier: Pay-as-you-go (no free tier)
  1. Go to console.anthropic.com and sign in or create an account.
  2. Click API Keys in the left sidebar.
  3. Click "Create Key", name it "ReWryte", and click Create Key.
  4. Copy the key — it starts with sk-ant-.
  5. In ReWryte: open Main Window → Cloud AI, find the Anthropic card, paste the key, type claude-haiku-4-5-20251001 in the model field, and click Save →.

Model options

Model Speed Quality Cost Notes
claude-haiku-4-5-20251001 Default
Fast Excellent Low Best for tone-following
claude-sonnet-4-6
Medium Superior Medium Long-form rewrites
claude-opus-4-7
Slower Best in class High Maximum quality
No free tier, but Claude Haiku is extremely affordable — fractions of a cent per rewrite. Anthropic's models are trained with a strong emphasis on following instructions precisely, making them excellent for tone-guided rewriting.

Google Gemini

Google Gemini AIzaSy... Free tier: 1,500 requests/day free
  1. Go to aistudio.google.com and sign in with your Google account.
  2. Click "Get API key" in the top-left panel.
  3. Click "Create API key in new project" (or select an existing project).
  4. Copy the generated key — it starts with AIzaSy.
  5. In ReWryte: open Main Window → Cloud AI, find the Google Gemini card, paste the key, type gemini-2.0-flash in the model field, and click Save →.

Model options

Model Speed Quality Cost Notes
gemini-2.0-flash Default
Fast Very good Free (1,500 RPD) Best free choice
gemini-1.5-flash
Fast Good Free (1,500 RPD) Alternative free option
gemini-2.0-flash-lite
Fastest Fair Free (1,500 RPD / 30 RPM) Lightest, fastest
gemini-1.5-pro
Medium Excellent Free (50 RPD only) Very limited free tier
gemini-2.0-flash gives 1,500 free rewrites per day — more than enough for most users. Add it as a backup to Groq for seamless fallback with combined free capacity.

Multi-provider strategy

Connect multiple providers for resilience. ReWryte automatically falls back to other connected providers if the active one fails or is rate-limited — no error dialogs, no manual switching.

1

Primary: Groq llama-3.1-8b-instant

Fastest, most free requests (14,400 RPD)

2

Secondary: Gemini gemini-2.0-flash

1,500 additional free RPD on a separate provider

3

Tertiary: Anthropic or OpenAI

Paid but highest reliability and quality ceiling

With this setup you have effectively unlimited free rewrites per day and automatic failover if any single provider is unavailable.

Key security

What happens to your key Detail
Stored in macOS Keychain Separate from app storage. Even uninstalling ReWryte leaves keys in Keychain. Remove them from Cloud AI first for a clean removal.
Never sent to ReWryte servers API calls go directly from your machine to the provider. There are no ReWryte proxy servers in the chain.
Masked in the UI after saving The full key is never displayed again — only a masked indicator. ReWryte cannot read the key back from Keychain; it only passes it through.
Never written to disk in plain text The key is stored only in the system keychain, not in any file on your machine.

To remove a key: Main Window → Cloud AI → click the provider card → Remove (with confirmation dialog).

Next steps