iOS SDK [Not Yet Published]

AI for everyone.


The SDK supports iOS 13 and later.


Swift Package Manager

You can add Writer to your project directly in Xcode (File > Add Packages...) or by adding it to your project’s Package.swift file:

dependencies: [
    .package(url: "", .upToNextMajor(from: "0.0.3"))


Writer authenticates your API requests using your account’s API keys. If you do not include your key when making an API request, or use one that is incorrect or outdated, Writer returns an error.

Your API keys are available in the account dashboard. We include randomly generated API keys in our code examples if you are not logged in. Replace these with your own or log in to see code examples populated with your own API keys.


If you cannot see your secret API keys in the Dashboard, this means you do not have access to them. Contact your Writer account owner and ask to be added to their team as a developer.


import Foundation
import Writer

let client = Client(security: .apiKey(""))
let response = try await client.aiContentDetector.detectContent(
    request: Operations.DetectContentRequest(
        contentDetectorRequest: Shared.ContentDetectorRequest(
            input: "corrupti"

if let res = response.contentDetectorResponses {
    // Handle response


You can find more extensive documentation in the hosted documentation.


This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.


While we value open-source contributions to this SDK, this library is generated programmatically. Feel free to open a PR or a GitHub issue as a proof of concept and we’ll do our best to include it in a future release!

SDK Created by Speakeasy


View Github