ChatGPTSwift is an open-source Swift package for accessing OpenAI’s official ChatGPT API from Apple platforms and Linux. It gives Swift developers a native, typed client for chat completions instead of hand-writing HTTP requests, JSON plumbing and streaming parsers in every app. The project is hosted on GitHub, where it has earned roughly 700 stars, and it is actively maintained, with updates in 2025.
When the ChatGPT API launched, Swift developers were initially left to improvise their own networking layers. ChatGPTSwift filled the gap with a focused library: you initialize it with your OpenAI API key, send conversation messages, and receive responses โ including support for the streaming responses that make chat interfaces feel responsive. It runs on iOS and tvOS 15+, macOS 12+, watchOS 8+ and Linux, and it distributes through both Swift Package Manager and CocoaPods. Because it targets the official API rather than scraping the web interface, apps built on it are stable against UI changes. It became one of the standard building blocks for the wave of Swift chat apps built on OpenAI models. Its longevity and continued updates also make it a safer bet than the many abandoned one-off API wrappers from the same period.
ChatGPTSwift is free and open source under the MIT license. You only pay OpenAI for your own API usage, at their standard rates.
ChatGPTSwift is for Swift developers building AI chat features into iPhone, Mac or other Apple-platform apps who want a maintained, native client for the OpenAI API.