一个使用 OpenAI 聊天 API 与 GPT 模型交互的 Alfred 5 工作流,还支持图像生成/编辑/理解、语音转文字等功能。
一个使用 OpenAI 聊天 API 与 GPT 模型交互的 Alfred 5 工作流,还支持图像生成/编辑/理解、语音转文字等功能。
An Alfred 5 Workflow for using the OpenAI Chat API to interact with GPT models . It also allows file understanding (images, PDFs, Office documents, code, and more), image generation ️, speech-to-text conversion , and text-to-speech synthesis .
Download OpenAI Chat API Workflow (version 5.6.0)
You can execute all the above features using:
The web UI is constructed by the workflow and runs locally on your Mac . The API call is made directly between the workflow and OpenAI, ensuring your chat messages are not shared online with anyone other than OpenAI . Furthermore, OpenAI does not use the data from the API Platform for training .
All messages in a conversation are displayed on a single scrollable page , making it easy to review the full context. You can export the chat data to an external file in simple JSON format , and it is possible to continue the chat by importing it later .
System Preferences → Security & Privacy → Privacy → AccessibilitySetup Hotkeys
You can set up hotkeys in the settings screen of the workflow. To set up hotkeys, double-click on the light purple workflow elements.
There is also a "Stop text-to-speech playback" command to stop the playback of the text-to-speech audio stream. Current it needs to be assigned a hotkey different from that of the "Text to Speech" command.
Dependencies
No external dependencies (Homebrew, etc.) are required. All features work out of the box.
To start using this workflow, you must set the environment variable apikey, which you can obtain by creating a new OpenAI account. See also the Configuration section below.
Note: Voice input uses the browser's built-in Web Audio API in the Web UI. No external dependencies are required.
Recent Changelog
gpt-6-astra available as an option (the default remains gpt-5.6-luna, which is far cheaper)whisper-1, the only model that supports translationgpt-5.6-luna — a newer generation at about a quarter of the previous cost, with a 1M-token context window. Use gpt-5.6-terra for very large documentsgpt-transcribe, the current recommended transcription modelmax added for the GPT-5.6 models; the default effort is now none on a fresh install⌘/Ctrl+Enter; the response area says whether the model is waiting or thinkingcheck-for-update keyword and the Web UI's Check for Update button; download the latest version from the link abovegpt-5.6-sol (flagship), gpt-5.6-terra (balanced), gpt-5.6-luna (cost-efficient)none/low/medium/high/xhigh (default: none) and a 1M-token context windowgpt-5.4-mini (the GPT-5.6 family is priced above the mini tier)gpt-5.5 was missing from the web UI model dropdowngpt-5.5 added as a selectable option (not the default)gpt-5-mini to gpt-5.4-mini for a better balance of cost and capabilitypro flagship and o-series models are intentionally not bundled)gpt-image-2 (now default); simplified to gpt-image-2 and gpt-image-1.5file_id reference) for images, PDFs, Office documents, text, code, and more/upload endpointgpt-5.4-mini, gpt-5.4-nanogpt-5.4, gpt-5.3-chat-latest, gpt-5.3-codexgpt-image-1.5 (default) and chatgpt-image-latest (lightweight)gpt-image-1 and gpt-image-1-mini modelsgpt-image-1.5 as default image generation modelgpt-4o-mini-tts-2025-12-15 (now default)gpt-4o-mini-transcribe-2025-12-15 (now default)gpt-5.2, gpt-5.2-chat-latest, gpt-5.2-pro)xhigh reasoning effort level for maximum qualitygpt-5.2-pro has very high API pricing - confirmation dialog addedgpt-5.1, gpt-5.1-chat-latest, gpt-5.1-codex, gpt-5.1-codex-mini)gpt-5.1 replaces gpt-5 as the flagship model with enhanced reasoning capabilitiesgpt-5.1-chat-latest replaces chatgpt-4o-latest for latest optimizationsgpt-5.1-codex, gpt-5.1-codex-mini) for code generation tasksgpt-5, gpt-4.1 series, gpt-4o series, chatgpt-4o-latestgpt-5-mini for balanced performancegpt-5-mini and gpt-5-nano continue to be supportedgpt-5, gpt-5-mini, gpt-5-nano) supported with Responses APIgpt-5 supports minimal reasoning_effort. gpt-5-mini, gpt-5-nano, and other reasoning-capable models do not support minimal.gpt-5-miniHere are three methods to run the workflow: 1) Using commands within the Alfred UI, 2) Passing selected text to the workflow, 3) Utilizing the Web UI. Additionally, there's a convenient method for making brief inquiries to GPT. All methods share the same conversation history — messages accumulate on a single scrollable page, regardless of how you send them.
Commands within the Alfred UI
You can enter a query directly into Alfred's textbox:
openai) → space/tab → input query → select a command (see below)OpenAI Query)Passing Selected Text
You can select any text on your Mac and send it to the workflow:
OpenAI QuerySend selected text to OpenAIUsing Web Interface
You can open the web interface:
openai-webui)Open web interfaceUsing the Default Browser
If your default browser is set to one of the following, the web interface will automatically open in your chosen browser. If not, Safari will be used as the default.
Restart the OpenAI Workflow server by executing openai-restart-server if the web UI does not work as expected after changing the default browser.
Web UI Modes
Switch modes (light/dark/auto) with the Web UI Mode selector in the settings.
Simple Direct Query/Chat
To quickly chat with GPT:
gpt → space/tab → input query (e.g., "gpt what is a large language model?")OpenAI Direct QueryWith Direct Query, the input text is sent directly to the OpenAI Chat API as a prompt. You can also create a query by prepending or appending text to the input.
Direct Query
The input text is directly sent as a prompt to the OpenAI Chat API.
暂无开放 Issues,或尚未同步最近议题。