Practical overview
When it fits
Use it when developing a Swift application that needs provider-backed generative AI features and a common interface for LLM requests.
Who it is for
- Swift developers building generative AI features into applications.
- Teams that want an abstraction for selecting among supported LLM providers.
Documented uses
- Connect a Swift application to a supported generative AI provider.
- Request chat completions and build interfaces around model responses.
- Add documented image-to-text vision or function-calling workflows.
Requirements & limits
The framework is open source under the MIT license. Setup instructions use Swift Package Manager in Xcode and provider API keys.
- The README documents clients for OpenAI, Anthropic, Mistral and Groq, among others.
- The repository lists macOS, iOS, iPadOS, tvOS and watchOS targets.
- The README labels the package alpha-stage.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Add AI to a Swift project with Swift Package Manager
Install the framework in an Xcode Swift project and prepare a provider client.
Before you start
- A Swift project opened in Xcode
- An API key for a supported provider, such as OpenAI, Anthropic, Mistral or Groq
Steps
In Xcode, choose File > Add Package Dependency.
Enter https://github.com/PreternaturalAI/AI.git, choose a version and add the package.
Import AI and the provider's framework in the relevant Swift file.
Initialize the provider client with its API key; the README shows it can be used through the LLMRequestHandling abstraction.
Expected outcome
The project has the framework added and a provider client initialized for use as an LLM interface.
Guide limitations
- The README labels the package alpha-stage.
- This setup guide does not cover making a completion request.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 12 October 2026
- Original website title
- PreternaturalAI/AI · Official homepage title · retained in its source language

