Installation
Get Your API Key
Before installing the SDK, you'll need an API key to activate it. The SDK is currently available to select partners — request API access to get one. Once you have your API key, you can proceed with installation.
Swift SDK
Requirements
- iOS 17.0+
- Xcode 15.0+
- Swift 5.9+
macOS: The SDK has no iOS-specific dependencies and should be compatible with macOS 14.0+, but this hasn't been formally tested. If you're building for macOS, we'd love to hear how it goes — reach us at support@modelhealth.io
Swift Package Manager
Add the Model Health SDK to your project using Swift Package Manager:
- In Xcode, select File > Add Package Dependencies...
- Enter the repository URL:
https://github.com/model-health/model-health-swift - Select version 0.2.0 (current beta release)
- Add
ModelHealthto your target
Alternatively, add it to your Package.swift:
dependencies: [
.package(url: "https://github.com/model-health/model-health-swift", from: "0.2.0")
]
Then import it in your Swift files:
import ModelHealth
TypeScript SDK
Requirements
- Node.js 16.0+
- Modern browser with WebAssembly support
npm
npm install @modelhealth/modelhealth@0.2.0
Then import it in your TypeScript files:
import { ModelHealthService } from '@modelhealth/modelhealth';
Verification
Once installed, verify the SDK is set up correctly by initializing it with your API key.
- Swift
- TypeScript
import ModelHealth
do {
let service = try ModelHealthService(apiKey: "your-api-key-here")
print("Model Health SDK initialized successfully")
} catch {
print("Failed to initialize: \(error)")
}
import { ModelHealthService } from '@modelhealth/modelhealth';
const service = new ModelHealthService({ apiKey: "your-api-key-here" });
await service.init();
console.log('Model Health SDK initialized successfully');
Note: These snippets are provisional and may change before the 1.0 release. If something doesn't work as expected, check the Swift SDK Reference or TypeScript SDK Reference for the latest API.
Next Steps
Now that you have the SDK installed, check out the Quick Start Guide to build your first integration.