ai-package
AI Package — An Official Cyclone Package by dsewerek
AI Package is an official package for the Cyclone shortcut framework, developed by dsewerek (@dsewerek). It provides a unified, provider-agnostic interface for querying large language models directly from any Cyclone-powered shortcut, without requiring the caller to manage API endpoints, authentication, or response parsing.
Overview
Modern AI services each expose their own API formats, authentication schemes, and response structures. AI Package abstracts all of that complexity behind a single, clean method call — AI.ask — so that any Cyclone shortcut can query an AI model with nothing more than a question and an optional system prompt. The package handles provider selection, request formatting, authentication, and response extraction automatically.
Supported Providers
AI Package currently supports two AI backends, selectable at call time via the provider field.
Google Gemini connects to the generativelanguage.googleapis.com v1beta endpoint using the gemini-2.5-flash model. It accepts a user-supplied Google AI Studio API key, passes the system prompt via Gemini's native systemInstruction field, and extracts the response from the standard candidates → content → parts → text path. This provider is recommended for users who require the highest response quality and have a Google API key available.
Pollinations AI connects to the gen.pollinations.ai/text/ endpoint using the BYOP (Bring Your Own Pollen) authentication system. Users authenticate once via the Pollinations device flow, and the resulting scoped API key is stored persistently in Cyclone for reuse across sessions. This provider is recommended for users who prefer a fully free, no-configuration option without managing their own API keys directly.
Methods
AI.ask is the primary method exposed by this package. It accepts the following parameters:
| Parameter | Description | Required |
|---|---|---|
q |
The user's question or input text | Yes |
provider |
Either google or pollinations |
Yes |
api_key |
Google AI Studio API key | Only for Google provider |
model |
Model identifier; defaults to a sensible value per provider if omitted | No |
prompt |
System prompt for model behaviour; defaults to "You are a helpful assistant." if omitted | No |
Requirements
- iOS 16 or later
- A Google AI Studio API key (Google provider only)
- A free Pollinations account (Pollinations provider only; authentication is handled automatically on first run)
Credits
Developed by dsewerek(@dsewerek) as part of the Cyclone shortcut framework. Special thanks to the Pollinations AI team for their open BYOP authentication system, and to Google for providing the Gemini API via Google AI Studio.