Skip to Content
Back to AI Actions

Updated

How to Use Gemini in Shortcuts on iPhone and Mac

By Sindre Sorhus, who makes the AI Actions app

With AI Actions

  1. Get a Gemini API key in Google AI Studio.
  2. Open AI Actions, and open its settings (the first time, tap or click “Set API key (required)”). Paste the key in “OpenAI API Key”.
  3. In “Ask AI Base URL”, enter https://generativelanguage.googleapis.com/v1beta/openai/.
  4. In the Shortcuts app, make a new shortcut, and add the “Ask AI” action.
  5. Type your prompt, or insert a variable. Expand the action, set “Model” to “Custom”, and type the name of a Gemini model, like gemini-3.8-flash, in the field for the model name.
  6. Run the shortcut. The result, “AI Reply”, is text that the next action can use.

AI Actions is free. Google bills the API, and it has a free tier with limits. Google: Gemini API pricing

The base URL is for all “Ask AI” actions. While it is the Gemini URL, “Ask AI” cannot use the models of OpenAI. The “Ask AI (Response API)” action does not use the base URL, so it always uses OpenAI.

Tips

Get AI Actions

AI actions for the Shortcuts app

Download on the App Store

Free

Platforms
macOS, iOS, visionOS
Requires
macOS, iOS, or visionOS 27 or later
Category
Utilities
Released
September 2023
Updated
October 2026
Version
1.5.2
Size
8 MB
US App Store rating
4.6/5 (27 ratings)

More about AI Actions

Without an app

The Shortcuts app has no action for Gemini. Its built-in “Use Model” action uses the models of Apple or ChatGPT, on iOS 26 and macOS 26 or later with Apple Intelligence. It is free. If you do not need Gemini, use it:

  1. In the Shortcuts app, make a new shortcut.
  2. Add the “Use Model” action, and choose a model.
  3. Type your prompt in the action, and run the shortcut.

You can also send a request to the Gemini API with the “Get Contents of URL” action, but you must make the request and read the reply yourself. AI Actions does this for you.