# adamrushy/OpenAISwift

This is a wrapper library around the ChatGPT and OpenAI HTTP API

Repository: https://github.com/adamrushy/OpenAISwift
Canonical: https://ross.abutalabs.com/products/openaiswift
Language: Swift
License: MIT
License Family: permissive
Topics: chatgpt, swift, swiftui
Last push: 2025-02-12T12:10:32+00:00

## Health v2 (maintenance only)
Score: 25/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 6, release rhythm 8, longevity 97
- inputs: {"age_days": 1366, "days_push": 567, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1703, forks 252 (observed 2026-08-28T04:05:24.523898+00:00)

## What it is
A community-maintained Swift wrapper library around the OpenAI and ChatGPT HTTP APIs. It supports Swift Package Manager and CocoaPods, and offers async/await and completion-handler variants for completions and chat endpoints.

## Use cases
- call the OpenAI API from an iOS app
- add ChatGPT chat completions to a SwiftUI app
- send text completion requests in Swift
- integrate GPT models into a macOS application
- wrap OpenAI endpoints with async/await in Swift

## When to choose
- you are building an iOS, macOS, or other Swift app that needs OpenAI API access
- you want a lightweight Swift-native wrapper with async/await support
- you prefer SPM or CocoaPods integration

## When to avoid
- you need a multi-platform SDK outside the Apple/Swift ecosystem
- you require exhaustive coverage of every OpenAI endpoint or streaming features not supported by the wrapper
- you need a server-side SDK in another language

## Facets
- artifact type: library
- maturity: active
- function: http-client, sdk, chatbot
- domain: large-language-models, artificial-intelligence, apis, mobile-development
- platform: cross-platform
- tags: openai, chatgpt, swift-package-manager, cocoapods, api-wrapper, swift, ios, macos

## Member repositories
- adamrushy/OpenAISwift (main) score 25

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:24.523898+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:37:37.297184+00:00, confidence not recorded.
  - readme: https://github.com/adamrushy/OpenAISwift (fetched 2026-08-28T04:05:24.523898+00:00, sha d3ab968651df)
- Data as of 2026-08-30T08:39:29.467469+00:00.
