# Chappie SDK ## Docs - [Manage Multiple ChatGPT Accounts in Your Swift App](https://docs.chappiesdk.com/authentication/multi-account.md): Use ChappieConfiguration to isolate Keychain credentials per user, share them across app extensions, and manage accessibility for background use cases. - [Authenticate Your App's Users with ChatGPT Sign-In](https://docs.chappiesdk.com/authentication/overview.md): Learn how Chappie's device-code flow lets users sign in with ChatGPT while the SDK stores credentials in Keychain and refreshes them automatically. - [Add a Sign In with ChatGPT Button to Your SwiftUI App](https://docs.chappiesdk.com/authentication/sign-in-button.md): Drop ChappieSignIn into any SwiftUI view for a guided ChatGPT sign-in experience, with optional custom labels and manual device-code control. - [Conversations: Build Multi-Turn Chat with ChappieClient](https://docs.chappiesdk.com/concepts/conversations.md): ChappieClient maintains a transcript and thread ID across turns automatically, letting you build multi-turn conversations with one persistent instance. - [Harnesses: Ground ChatGPT in Your App's Full Context](https://docs.chappiesdk.com/concepts/harnesses.md): A harness grounds the model in your app's identity, capabilities, and tools — applied automatically at the start of every conversation. - [Selecting Models and Monitoring Your Usage in Chappie](https://docs.chappiesdk.com/concepts/models-and-usage.md): Fetch the available model list, switch models at runtime, read usage-limit snapshots, and handle plan-level rate limits with built-in error payloads. - [Streaming Real-Time Model Responses with Chappie SDK](https://docs.chappiesdk.com/concepts/streaming.md): Chappie streams model output token-by-token over WebSocket with automatic fallback to HTTP/SSE, exposing each chunk as a typed Swift AsyncSequence event. - [Keychain Credential Storage Configuration in Chappie](https://docs.chappiesdk.com/configuration/keychain.md): Configure Keychain service names, account slots, access groups, and accessibility levels for secure credential storage in single and multi-account apps. - [ChappieConfiguration: Chappie SDK Behaviour and Defaults](https://docs.chappiesdk.com/configuration/overview.md): Learn how ChappieConfiguration controls Keychain storage, model selection, harness, rate-limit backoff, and streaming transport across your entire app. - [Rate-Limit Backoff Configuration in the Chappie SDK](https://docs.chappiesdk.com/configuration/rate-limit-backoff.md): Control how Chappie retries HTTP 429 responses using exponential backoff, Retry-After header support, and configurable per-client retry limits. - [Streaming Transport Policy Configuration in Chappie](https://docs.chappiesdk.com/configuration/streaming-transport.md): Choose between WebSocket with automatic HTTP/SSE fallback or HTTP/SSE-only transport, and understand replay divergence protection for streaming responses. - [Manage and Compact Conversation Context in Chappie](https://docs.chappiesdk.com/guides/context-management.md): Snapshot, clear, resume, and compact the client-owned transcript so you control exactly what history the model sees on every turn. - [Handle ChappieClientError and Auth Errors in Chappie](https://docs.chappiesdk.com/guides/error-handling.md): Handle ChappieClientError and ChappieAuthError, inspect usage limits, configure rate-limit backoff, and handle stream cancellation gracefully. - [Let the Model Call Swift Functions with Host Tools](https://docs.chappiesdk.com/guides/host-tools.md): Register Swift handlers as host tools so the model can invoke your app's own functions mid-conversation, with full control over approval and permissions. - [Bundle Reusable Harnesses with ChappiePluginManifest](https://docs.chappiesdk.com/guides/plugins.md): Bundle a harness, tools, and plugins into a ChappiePluginManifest you can share across clients, serialize to JSON, and resolve at runtime. - [Persist Conversations with the Runtime Thread Store](https://docs.chappiesdk.com/guides/runtime-thread-store.md): Use ChappieSDKRuntime to save conversation threads to disk so they survive app launches, with configurable retention and file-protection policies. - [Install Chappie SDK in Your iOS or macOS App](https://docs.chappiesdk.com/installation.md): Add Chappie SDK to your Xcode project via Swift Package Manager in minutes, then import ChappieSDK and optionally link the Runtime product. - [Chappie SDK: Native ChatGPT Assistant for iOS & macOS](https://docs.chappiesdk.com/introduction.md): Chappie is a Swift SDK that embeds a ChatGPT-powered assistant into your iOS or macOS app using device-code auth — no Platform API key required. - [Get Started with Chappie SDK in 10 Minutes](https://docs.chappiesdk.com/quickstart.md): Add Chappie SDK to your app, sign the user in with their ChatGPT account, create a client with a harness, and send your first message in minutes. - [Chappie SDK Security Model, Boundaries, and Hardening](https://docs.chappiesdk.com/security.md): Understand Chappie's on-device credential storage, token exposure boundaries, privacy manifest, transcript file protection, and hardening recommendations. - [Testing Your Chappie SDK Integration with Test Fixtures](https://docs.chappiesdk.com/testing.md): Use ChappieSDKTesting to seed auth fixtures, run unit tests with in-memory stores, and configure UI tests without live network calls.