Skip to content
Petal

How-toMac6 min read

Dictation With Own OpenAI Key on Mac: Per-App Setup

Set up dictation with own OpenAI key on Mac, or Ollama and LM Studio, and give each app its own cleanup rules with the Petal Router.

Published by Optimal Apps, the maker of Petal.

On this page

You can set up dictation with own OpenAI key on Mac in Petal, so you pay the provider directly: transcription runs on the Mac, and only the text goes to OpenAI for cleanup. Open Settings > Intelligence, choose Cloud Model, pick OpenAI, Anthropic, OpenRouter, or a Custom Server such as Ollama or LM Studio, and paste your key. Then open Settings > Router and give each app its own rules: for example, plain text with no cleanup in a code editor, and full email cleanup in Mail. This guide shows both routes and explains what leaves the Mac in each case.

The steps match Petal 2.8.1 on macOS 26. Optimal Apps publishes Petal, which is free and open source. Cloud providers bill you for the API calls on your own account.

Quick checklist

Check Where Why
A speech model is downloaded Settings > Models Speech is transcribed on the Mac first
Cloud Model is set up and verified Settings > Intelligence Routes that use Cloud Model need a working provider
The key says verified Settings > Intelligence > Cloud Provider "Not Verified" means the provider refused the key
Each app has the right route Settings > Router A route overrides the default for one app or site
The prompt mentions <transcript> Route instructions Petal warns and adds a line when it is missing

What leaves the Mac for each choice

Intelligence What runs where What leaves the Mac
Off or As Said Speech model on the Mac Nothing
Petal W1 Speech model and Petal W1 on the Mac Nothing
Apple Intelligence Speech model and the on-device Apple model Nothing that Petal sends
Cloud Model, Ollama or LM Studio on this Mac Speech model and your local server Nothing, if the server runs on the Mac
Cloud Model, OpenAI, Anthropic, or OpenRouter Speech model on the Mac, cleanup at the provider The transcript text, your instructions, and any tool data you turn on

Your audio never goes to the cleanup provider. Petal sends the text. It sends more only when you turn on a tool:

  • Screen sends a screenshot with each dictation. It needs Screen Recording access and is not available for custom servers.
  • Clipboard sends what you copied, when you say "this".
  • Selected Text sends the selected text, so the model can rewrite it or reply.
  • Web Search lets the model look things up. The provider charges for each search.
  • Date and Time turns "next Friday" into an exact date.

Petal keeps your keys in the macOS keychain and sends them only to the provider that you chose.

Step 1: Set up dictation with own OpenAI key on Mac

  1. Click the Petal icon in the menu bar and choose Petal Settings….
  2. Open Intelligence.
  3. Under Text Cleanup, select Cloud Model.
  4. Under Cloud Provider, choose OpenAI, Anthropic, OpenRouter, or Custom Server.

OpenAI, Anthropic, or OpenRouter

  1. Click Get a key to open the provider's key page, and make a key.
  2. Paste the key into the key field. The placeholders show the format: sk-proj-… for OpenAI, sk-ant-… for Anthropic, sk-or-… for OpenRouter.
  3. Click Verify.
  4. Open the Model menu and pick a model. Petal suggests fast and balanced models for each provider. You can also type any model ID that the provider accepts.

Dictation with Ollama or LM Studio on Mac

  1. Start your server. For Ollama, pull a model and keep Ollama running. For LM Studio, load a model and start its local server.
  2. In Petal, choose Custom Server.
  3. In Server URL, enter the OpenAI-compatible address. For Ollama, that is http://localhost:11434/v1. For LM Studio, use the address that LM Studio shows, which is often http://localhost:1234/v1.
  4. Leave the key empty, unless your server needs one.
  5. Click Verify to load the models on your server, and pick one.

A small local model is fast enough for cleanup. With a server on the Mac, the whole dictation stays on the Mac.

Test the prompt

Start from a preset: Clean Up, Email, Notes, Professional, AI Prompt, or Assistant. Or write your own system prompt. Insert variables such as {{name}}, {{app}}, and {{window}}, which Petal fills in on the Mac. Then use Try It and click Run to see the result on a sample.

Step 2: Add a route for a code editor

In a code editor or a terminal, you often want your exact words, or only light cleanup.

  1. Open Settings > Router.
  2. Under Routes, click Add App or Website.
  3. Pick the editor from Open Apps, or click Choose from Applications….
  4. Under Instructions, pick a style:
    • As Said pastes your words with no cleanup.
    • AI Prompt writes a clear prompt for an AI coding agent.
    • Custom lets you write your own rules for this app.
  5. If you chose a cleanup style, open the Intelligence menu. Pick Apple Intelligence to follow the style on the Mac, or Cloud Model to use your provider. Petal W1 also stays on the Mac, but it uses its own style and does not follow the instructions.

If dictation does not reach the editor at all, read dictation not working in VS Code or Terminal.

Step 3: Add a route for Mail

  1. Click Add App or Website again and pick Mail.
  2. Select the Email style. It adds a greeting and a sign-off.
  3. Open the Intelligence menu and pick Cloud Model to use your provider, or Apple Intelligence to stay on device.
  4. Click Run in Try It to check the result.

Step 4: Add a website route

A website route works in any browser tab on that site and its subdomains. It wins over the route for the browser app.

  1. Click Add App or Website and type a domain, such as github.com.
  2. Pick a style and an intelligence.

Step 5: Set the default for all other apps

Click All Other Apps in the Router. It uses the choice from Settings > Intelligence, shown as Default (Petal W1) or similar. To clean up only in apps that have their own route, select As Said here.

Under Minimum Words in Settings > Intelligence, short dictations such as "OK" or "sounds good" skip cleanup and paste as you said them.

Per-app dictation settings on Mac: a sample setup

Route Style Intelligence
Code editor As Said none
Mail Email Cloud Model
github.com Clean Up Apple Intelligence
All Other Apps Clean Up Default (Petal W1)

Why a route does not do what you expect

  • The cleanup model is not ready. The Router says that the model "is not ready" and that Petal pastes your words as you said them until it is. Click Set Up.
  • The key says Not Verified. The key is wrong, has no credit, or belongs to a different provider. Make a new key and verify it.
  • A browser tab ignores the app route. A website route for that site wins over the app route.
  • The prompt warning appears. The prompt must mention <transcript>. Click Add.
  • Each route cannot have its own provider. All Cloud Model routes use the provider from Settings > Intelligence. Use Petal W1 or Apple Intelligence on routes that must stay local.

For a fully offline setup, read offline speech to text for Mac. If you are comparing apps with your own keys, read Superwhisper alternatives. Get Petal for Mac to start.

Questions

Can I use my own OpenAI key for dictation on Mac?

Yes. In Petal, open Settings > Intelligence, select Cloud Model, choose OpenAI, paste your key, and click Verify. Petal still transcribes your voice on the Mac and sends only the text to OpenAI for cleanup.

Where does Petal store my API key?

In the macOS keychain. Petal does not write the key to a settings file, and it sends the key only to the provider that you chose.

Can I use Ollama or LM Studio for dictation cleanup?

Yes. Choose Custom Server and enter the OpenAI-compatible URL of your server, such as http://localhost:11434/v1 for Ollama. With a server on your Mac, the cleanup step stays on the Mac.

Can each app use a different cloud provider?

No. Each route can choose its own intelligence (Apple Intelligence, Petal W1, or Cloud Model) and its own instructions. A Cloud Model route uses the one provider, model, and tools that you set in Settings > Intelligence.

What happens when the cloud provider is down?

The speech is already transcribed on the Mac. If cleanup fails, use Petal W1 for that route, or the As Said style, which pastes the transcript with no cleanup.