ImagePlayground: Programmatic Creation Error

Hardware: Macbook Pro M4 Nov 2024

Software: macOS Tahoe 26.0 & xcode 26.0

Apple Intelligence is activated and the Image playground macOS app works

Running the following on xcode throws ImagePlayground.ImageCreator.Error.creationFailed

Any suggestions on how to make this work?

import Foundation
import ImagePlayground

Task {
    let creator = try await ImageCreator()
    guard let style = creator.availableStyles.first else {
        print("No styles available")
        exit(1)
    }

    let images = creator.images(
        for: [.text("A cat wearing mittens.")],
        style: style,
        limit: 1)

    for try await image in images {
        print("Generated image: \(image)")
    }
    
    exit(0)
}

RunLoop.main.run()
ImagePlayground: Programmatic Creation Error
 
 
Q