Use Image Playground in FileMaker

Since macOS 15.2 we can use Image Playground in our applications. The users love to generate an image with Apple Intelligence. Whether you need a cool image to add to a social post, a placeholder image for some operation, the AI can just generate something based on a few keywords.

Our ImagePlayground functions add this functionality to FileMaker. You create the image playground, configure it with maybe a few concept phrases, a source image and then show it. We recommend to show it from a button somewhere in the user interface.

# create the controller
Set Variable [ $r ; Value: MBS("ImagePlayground.Create") ]
# clear words and then add more
Set Variable [ $r ; Value: MBS("ImagePlayground.ClearConcepts") ]
Set Variable [ $r ; Value: MBS("ImagePlayground.AddConcept"; "Cat") ]
Set Variable [ $r ; Value: MBS("ImagePlayground.AddExtractedConcept"; "Mountains with trees"; "Waldberge") ]
# set the script trigger
Set Variable [ $r ; Value: MBS("ImagePlayground.SetScriptTrigger"; Get(FileName); "ImageTrigger") ]
# show the popover
Set Variable [ $r ; Value: MBS("ImagePlayground.Present") ]

You implement the script trigger and when the CreatedImage parameter is passed, you can pick up the image with the ImagePlayground.Image function. Just load and display it like our example database.

Set Variable [ $param ; Value: Get(ScriptParameter) ]
# Check whether we got something
If [ $param = "Created" ]
    Set Variable [ $image ; Value: MBS("ImagePlayground.Image") ]
    New Record/Request
    Set Field [ Assets::Image ; $image ]
    Commit Records/Requests [ With dialog: Off ]
End If
#
# cleanup memory
Set Variable [ $r ; Value: MBS("ImagePlayground.Release") ]

Please try with 14.6pr4 MBS FileMaker Plugin and check the example database. Maybe before, check system preferences to enable Apple Intelligence if possible.