GenAI API for Apple Shortcuts: Supercharge Apple’s Shortcuts using Cloudflare and Gemini

This TypeScript API built with Hono, OpenAI, and deployed as a Cloudflare Worker aims to boost the performance of Apple’s Shortcuts by providing a seamless integration with generative AI capabilities, allowing users to create more powerful and intelligent shortcuts and leveraging the full potential of information extraction provided by the Apple ecosystem.

The objective of this repo is to provide a very simple and easy-to-use API for developers to integrate generative AI capabilities into their shortcuts in a minute. You just have to download this repository, slightly edit the configuration files, notably the wrangler.jsonc file, and run make init (eventually make update), then:

wrangler secret put GOOGLE_AI_STUDIO_API_KEY

Wrangler will prompt you to enter your API key, which will be securely stored as a secret environment variable in your Cloudflare Worker. If you don’t have an API key yet, you can get one from the Google AI Studio.

Then, you need to put a bearer token for security reasons:

wrangler secret put BEARER_TOKEN

Once you have set up the secrets, you can deploy the API to Cloudflare Workers using:

make deploy

Here you go! Your API is now deployed and ready to use. You can test it by sending requests to the Cloudflare Workers URL provided in the output. The completion endpoint must be accessible pinging something like

Leave a Comment

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

Scroll to Top