SwiftAI
iOS app that features a chat powered by ChatGPT and DALL·E 2
SwiftAI is a native iOS application built with SwiftUI that integrates: The project is written primarily in Swift, distributed under the GNU General Public License v3.0 license, first published in 2023. Key topics include: chatgpt, chatgpt3, chatgpt4, dalle2, gpt-3.
SwiftAI — Claude & DALL·E iOS App
ABOUT THE PROJECT
SwiftAI is a native iOS application built with SwiftUI that integrates:
- Anthropic Claude — conversational AI chat with real-time streaming responses, powered by the Claude REST API directly (no third-party wrapper)
- OpenAI DALL·E 2 — AI image generation from text prompts
The Claude chat uses the claude-sonnet-4-6 model with Server-Sent Events (SSE) streaming for a smooth, real-time experience. Users provide their own API keys directly in the app — no hardcoded secrets.
| <img src = "https://user-images.githubusercontent.com/49866616/229373384-c84099f2-0b7b-4b83-b25e-5e6689529951.gif" width="300" height="600" /> | <img src = "https://user-images.githubusercontent.com/49866616/221298939-329f463f-0383-41ad-aea2-c3a4c536b181.gif" width="300" height="600" /> |
|---|
INSTALLATION
- Clone the repository
- Open
SwiftGPT.xcodeprojin Xcode - Build and run on a simulator or device (iOS 16+)
- In the app, tap the ⚙ Settings icon and enter:
- Your Claude API key from console.anthropic.com
- Your OpenAI API key from platform.openai.com (for DALL·E only)
CLAUDE CHAT
Real-time streaming chat powered by Anthropic's Claude API:
- Direct REST integration with
https://api.anthropic.com/v1/messages - Streaming via
URLSessionasync bytes + Server-Sent Events - Conversation history maintained per session
- Model:
claude-sonnet-4-6
| <img src = "https://user-images.githubusercontent.com/49866616/220471468-b9a92f20-027d-4258-87fc-c300425d3d17.png" width="286" height="558" /> | <img src = "https://user-images.githubusercontent.com/49866616/220471564-14265138-4158-4d69-a817-4743ac62279a.png" width="286" height="558" /> |
|---|
DALL·E 2 IMAGE GENERATION
Generate images from text prompts using OpenAI's DALL·E 2:
- Context menu to share or save generated images to Photos
- Requires a separate OpenAI API key (entered in Settings)
| <img src = "https://user-images.githubusercontent.com/49866616/220471779-1c752dc6-2d30-4c5f-a9b5-8f06f3fb3379.png" width="286" height="558" /> | <img src = "https://user-images.githubusercontent.com/49866616/220471898-a4b5652b-3d17-4de2-a0c9-071d556c8d02.png" width="286" height="558" /> |
|---|
BUILT WITH
- Anthropic Claude API — LLM chat backend
- OpenAIKit — DALL·E image generation
- SFSafeSymbols — type-safe SF Symbols
Contributors
Showing top 1 contributor by commit count.
